From f44434ab126f61003c420fd84e98bd9f9cbd4dbc Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 27 Oct 2008 14:11:52 +0000 Subject: [PATCH] Added confirm box when admins are about to remove PO GRNs from Supplier Invoice --- CHANGELOG.txt | 6 ++++-- purchasing/supplier_invoice.php | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7dcd889..8d9b29a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,7 +22,7 @@ $ -> Affected files 27-Oct-2008 Joe Hunt ! [0000078] Opened Exchange rate for editing (without storing) in sales/purchasing module payment # Fixed exchange rate display bugs in Supplier Payment (earlier dates). -$ /gl/includes/db/gl_db.inc +$ /gl/includes/db/gl_db_trans.inc /includes/banking.inc /includes/ui/ui_view.inc /purchasing/supplier_payment.php @@ -33,12 +33,14 @@ $ /gl/includes/db/gl_db.inc /sales/includes/sales_db.inc /sales/includes/db/cust_trans_db.inc /sales/includes/db/payment_db.inc -# [0000078] Fixed some report with wrong exchange rates. +# [0000078] Fixed some reports with wrong exchange rates. $ /reporting/rep101.php /reporting/rep106.php /reporting/rep201.php /reporting/rep203.php /reporting/rep209.php ++ Added confirm box when admins are about to remove PO GRNs from Supplier Invoice +$ /purchasing/supplier_invoice.php 24-Oct-2008 Joe Hunt ! [0000077] Added a total before ending balance in trial balance (also in report) diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 5fed049..5fe8028 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -323,10 +323,19 @@ if ($id4 != -1) $Ajax->activate('inv_tot'); } -$id2 = find_submit('void_item_id'); - if ($_SESSION["wa_current_user"]->access == 2) { + $id3 = find_submit('void_item_id'); + if ($id3 != -1) + { + $js = "if(confirm(\"" + .sprintf(_('You are about to remove all yet non-invoiced items from delivery line #%d. This operation also irreversibly changes related order line. Do you want to continue ?'), $id3) + ."\")) { + JsHttpRequest.request(\"void_confirm".$id3."\"); + }"; + $Ajax->addScript(true,$js); + } + $id2 = find_submit('void_confirm'); if ($id2 != -1) // Added section 2008-10-18 Joe Hunt for voiding delivery lines { begin_transaction(); @@ -350,6 +359,8 @@ if ($_SESSION["wa_current_user"]->access == 2) -$myrow["QtyOstdg"], $myrow['std_cost_unit'], $grn["supplier_id"], 1, $myrow['unit_price']); commit_transaction(); + display_notification(sprintf(_('All yet non-invoiced items on delivery line # %d has been removed.'), $id2)); + } } -- 2.30.2