Merged changes in main branch up to v.2.1.2
[fa-stable.git] / purchasing / includes / ui / invoice_ui.inc
index d17a676da80ba0c433779f82ff53c580f5ed4b28..79f2441edb6d981bf4f7997bcc6ff11d2a88f2f4 100644 (file)
@@ -385,8 +385,11 @@ function display_grn_items_for_selection(&$supp_trans, $k)
                        submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true);
                else    
                        submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Credit Note"), true);
-               if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->access == 2)       // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs
+               if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->access == 2) {     // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs
                        submit_cells('void_item_id'.$n, _("Remove"), '', _("WARNING! Be careful with removal. The operation is executed immediately and cannot be undone !!!"), true);
+                               submit_js_confirm('void_item_id'.$n,
+                                       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 ?'), $n));
+                       }
                        end_row();
        }
     }