Added confirm box when admins are about to remove PO GRNs from Supplier Invoice
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 27 Oct 2008 14:11:52 +0000 (14:11 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 27 Oct 2008 14:11:52 +0000 (14:11 +0000)
CHANGELOG.txt
purchasing/supplier_invoice.php

index 7dcd889b9d620c2f820233de75ad4bbb9adad758..8d9b29ac9dbc207a1bbfcbe83be0b6077a682636 100644 (file)
@@ -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)
index 5fed0495e2157dcb7e9656dedae61bce591ceeac..5fe8028490d82296d390e1e0bdd741903ac3a43f 100644 (file)
@@ -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));
+
        }               
 }