| | |
| | | T1.tenant_id, |
| | | T2.customer_contract_no, |
| | | T3.customer_name, |
| | | T2.contract_amount |
| | | T2.contract_amount, |
| | | CASE WHEN T4.noInvoiceAmountTotal IS NULL THEN 0 ELSE T4.noInvoiceAmountTotal END AS noInvoiceAmountTotal |
| | | FROM invoice_registration T1 |
| | | LEFT JOIN sales_ledger T2 ON T1.sales_ledger_id = T2.id |
| | | LEFT JOIN customer T3 ON T1.customer_id = T3.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | SUM( no_invoice_amount ) AS noInvoiceAmountTotal , |
| | | invoice_registration_id |
| | | FROM |
| | | invoice_registration_product |
| | | GROUP BY |
| | | invoice_registration_id |
| | | ) T4 ON T1.id = T4.invoice_registration_id |
| | | </select> |
| | | |
| | | <select id="invoiceRegisAndProductExcelDtoList" resultType="com.ruoyi.sales.excel.InvoiceRegisAndProductExcelDto"> |