From 18e31526b2e8a9e9c28e084c2f8e8a2731acdebc Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 19 Nov 2008 23:57:29 +0000 Subject: [PATCH] Do not allow editing invoice if allocated > 0 --- CHANGELOG.txt | 4 ++++ sales/inquiry/customer_inquiry.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1635f5c..cf942b6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +20-Nov-2008 Joe Hunt +# Do not allow editing invoice if allocated > 0 +$ /sales/inquiry/customer_inquiry.php + 19-Nov-2008 Joe Hunt + Possibility to view a transaction before final voiding. $ /admin/void_transaction.php diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 08b8f0d..ebd55ae 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -215,13 +215,13 @@ if (db_num_rows($result) == 0) // only allow crediting if it's not been totally allocated if ($myrow["TotalAmount"] - $myrow["Allocated"] > 0) $credit_me_str = "" . _("Credit This") . ""; - if (get_voided_entry(10, $myrow["trans_no"]) === false) + if (get_voided_entry(10, $myrow["trans_no"]) === false && $myrow['Allocated'] == 0) // 2008-11-19 Joe Hunt $edit_page= $path_to_root.'/sales/customer_invoice.php?ModifyInvoice=' . $myrow['trans_no']; break; case 11: - if (get_voided_entry(11, $myrow["trans_no"]) === false) + if (get_voided_entry(11, $myrow["trans_no"]) === false && $myrow['Allocated'] == 0) // 2008-11-19 Joe Hunt { if ($myrow['order_']==0) // free-hand credit note $edit_page= $path_to_root.'/sales/credit_note_entry.php?ModifyCredit=' -- 2.30.2