fix(orgcase): avoid missing discount column in union query
This commit is contained in:
parent
9f1d5b93e6
commit
e7d6dd88d2
|
|
@ -570,7 +570,7 @@ class CaseMaster extends BaseController
|
|||
date_format(i.inv_date,'%d-%m-%Y') AS str_date,
|
||||
concat(t.item_name) AS Description,i.invoice_code AS Code,
|
||||
t.item_amount AS Amount,t.org_code AS orgcode,
|
||||
coalesce(t.discount_amount,0) AS discount_amount,
|
||||
case when it.item_rate is not null and it.item_rate <> t.item_rate then 1 else 0 end AS discount_amount,
|
||||
it.item_rate AS d_rate
|
||||
from invoice_master i
|
||||
join organization_case_master c on i.insurance_case_id = c.id
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class OrganizationCaseModel extends Model
|
|||
date_format(i.inv_date,'%d-%m-%Y') AS str_date,
|
||||
concat(t.item_name) AS Description,i.invoice_code AS Code,
|
||||
t.item_amount AS Amount,t.org_code AS orgcode,
|
||||
coalesce(t.discount_amount,0) AS discount_amount,
|
||||
case when it.item_rate is not null and it.item_rate <> t.item_rate then 1 else 0 end AS discount_amount,
|
||||
it.item_rate AS d_rate
|
||||
from invoice_master i
|
||||
join organization_case_master c on i.insurance_case_id = c.id
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user