|
@@ -205,7 +205,7 @@
|
|
pFund.production_should_amount,
|
|
pFund.production_should_amount,
|
|
pFund.real_amount AS productionRealAmount,
|
|
pFund.real_amount AS productionRealAmount,
|
|
# invoice.real_amount AS invoiceRealAmount,
|
|
# invoice.real_amount AS invoiceRealAmount,
|
|
- (SELECT SUM(real_amount) FROM finance_invoice WHERE order_fund_id = fund.id AND deleted = 0) AS invoiceRealAmount,
|
|
|
|
|
|
+ (SELECT SUM(real_amount) FROM finance_invoice WHERE order_fund_id = fund.id AND finance_invoice.production_fund_id = pFund.id AND deleted = 0) AS invoiceRealAmount,
|
|
#查询客户经理
|
|
#查询客户经理
|
|
(SELECT name FROM user WHERE id = assets.client_manager_id) AS clientManagerName,
|
|
(SELECT name FROM user WHERE id = assets.client_manager_id) AS clientManagerName,
|
|
#查询项目负责人
|
|
#查询项目负责人
|
|
@@ -309,7 +309,7 @@
|
|
fund.id AS orderFundId,
|
|
fund.id AS orderFundId,
|
|
fund.should_amount,
|
|
fund.should_amount,
|
|
fund.real_amount,
|
|
fund.real_amount,
|
|
- fund.discount,
|
|
|
|
|
|
+# fund.discount,
|
|
pFund.standard_amount,
|
|
pFund.standard_amount,
|
|
# invoice.real_amount AS invoiceRealAmount,
|
|
# invoice.real_amount AS invoiceRealAmount,
|
|
(SELECT SUM(real_amount) FROM finance_invoice WHERE order_fund_id = fund.id AND deleted = 0) AS invoiceRealAmount,
|
|
(SELECT SUM(real_amount) FROM finance_invoice WHERE order_fund_id = fund.id AND deleted = 0) AS invoiceRealAmount,
|