From 01184c6e29ae7d7826167a7730f2873da8cac726 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 28 Apr 2011 10:59:48 +0200 Subject: [PATCH] Customer Credit Notes should not be included in Print Receipts. --- reporting/includes/reports_classes.inc | 3 +-- reporting/rep112.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index a402e5f3..7606f3cf 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -361,10 +361,9 @@ class BoxReports case 'RECEIPT': $BD = $type_shortcuts[ST_BANKDEPOSIT]; $CP = $type_shortcuts[ST_CUSTPAYMENT]; - $CN = $type_shortcuts[ST_CUSTCREDIT]; $ref = ($print_invoice_no == 1 ? "trans_no" : "reference"); $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-', - ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_BANKDEPOSIT.", ' $BD ', if (type=".ST_CUSTPAYMENT.", ' $CP ', ' $CN ')), ".TB_PREF."debtors_master.name) as IName + ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_BANKDEPOSIT.", ' $BD ', ' $CP '), ".TB_PREF."debtors_master.name) as IName FROM ".TB_PREF."debtors_master, ".TB_PREF."debtor_trans WHERE (type=".ST_BANKDEPOSIT." OR type=".ST_CUSTPAYMENT." OR type=".ST_CUSTCREDIT.") AND ".TB_PREF."debtors_master.debtor_no=".TB_PREF."debtor_trans.debtor_no ORDER BY ".TB_PREF."debtor_trans.trans_no DESC"; return combo_input($name, '', $sql, 'TNO', 'IName',array('order'=>false)); diff --git a/reporting/rep112.php b/reporting/rep112.php index b5238a26..a2f1b358 100644 --- a/reporting/rep112.php +++ b/reporting/rep112.php @@ -100,7 +100,7 @@ function print_receipts() if ($fno[0] == $tno[0]) $types = array($fno[1]); else - $types = array(ST_BANKDEPOSIT, ST_CUSTPAYMENT, ST_CUSTCREDIT); + $types = array(ST_BANKDEPOSIT, ST_CUSTPAYMENT); foreach ($types as $j) { $myrow = get_receipt($j, $i); -- 2.30.2