|
@@ -125,7 +125,7 @@ func GetContractSummaryInvoicePaymentAmountTotal(condition string, pars []interf
|
|
|
joinCond = `a.payment_id = b.contract_invoice_id`
|
|
|
}
|
|
|
query := global.DEFAULT_MYSQL.Table("invoice_payment_summary AS a").
|
|
|
- Select("SUM(b.amount)").
|
|
|
+ Select("IFNULL(SUM(b.amount),0)").
|
|
|
Joins(fmt.Sprintf("JOIN contract_invoice AS b ON %s AND b.is_deleted = 0", joinCond)).
|
|
|
Where(condition, pars...)
|
|
|
err = query.Find(&amountTotal).Error
|