X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep202.php;h=5901260596b53b878a93ff35f6fbdbbb1bb163b2;hb=90b3d069d96b99671af51726e2953352738abb75;hp=6bbf6d92c02fb1f53f13d0a559bfe49a6b373b88;hpb=8ecdfec3e664440856af9b205d37e3327c126cfc;p=fa-stable.git diff --git a/reporting/rep202.php b/reporting/rep202.php index 6bbf6d92..59012605 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -38,7 +38,7 @@ function get_invoices($supplier_id, $to, $all=true) // Revomed allocated from sql if ($all) $value = "(".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount)"; - else + else $value = "IF (".TB_PREF."supp_trans.type=".ST_SUPPINVOICE." OR ".TB_PREF."supp_trans.type=".ST_BANKDEPOSIT.", (".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount - ".TB_PREF."supp_trans.alloc), (".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount + ".TB_PREF."supp_trans.alloc))";