X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep102.php;h=9070ae186a9a45a92e7690e3a1ed96eab08f1844;hb=fa600790f955f0a95856ea4c2327d1230e35c083;hp=f8a2a52dfa44715b943e022edb2297ac08afda70;hpb=80dd97a37f674cc3691fa04af4c29607067566b2;p=fa-stable.git diff --git a/reporting/rep102.php b/reporting/rep102.php index f8a2a52d..9070ae18 100644 --- a/reporting/rep102.php +++ b/reporting/rep102.php @@ -37,7 +37,7 @@ function get_invoices($costomer_id, $to) $value = "(".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + " .TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + " .TB_PREF."debtor_trans.ov_discount)"; - $due = "IF (".TB_PREF."debtor_trans.type=10,".TB_PREF."debtor_trans.due_date,".TB_PREF."debtor_trans.tran_date)"; + $due = "IF (".TB_PREF."debtor_trans.type=".ST_SALESINVOICE.",".TB_PREF."debtor_trans.due_date,".TB_PREF."debtor_trans.tran_date)"; $sql = "SELECT ".TB_PREF."debtor_trans.type, ".TB_PREF."debtor_trans.reference, ".TB_PREF."debtor_trans.tran_date, $value as Balance, @@ -49,7 +49,7 @@ function get_invoices($costomer_id, $to) ".TB_PREF."payment_terms, ".TB_PREF."debtor_trans - WHERE ".TB_PREF."debtor_trans.type <> 13 + WHERE ".TB_PREF."debtor_trans.type <> ".ST_CUSTDELIVERY." AND ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator AND ".TB_PREF."debtors_master.debtor_no = ".TB_PREF."debtor_trans.debtor_no AND ".TB_PREF."debtor_trans.debtor_no = $costomer_id @@ -177,7 +177,7 @@ function print_aged_customer_analysis() $rep->TextCol(0, 1, $systypes_array[$trans['type']], -2); $rep->TextCol(1, 2, $trans['reference'], -2); $rep->DateCol(2, 3, $trans['tran_date'], true, -2); - if ($trans['type'] == 11 || $trans['type'] == 12 || $trans['type'] == 2) + if ($trans['type'] == ST_CUSTCREDIT || $trans['type'] == ST_CUSTPAYMENT || $trans['type'] == ST_BANKDEPOSIT) { $trans['Balance'] *= -1; $trans['Due'] *= -1;