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();
}
}
$id2 = -1;
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
+ $id2 = find_submit('void_item_id');
+ if ($id2 != -1)
{
begin_transaction();
display_footer_exit();
} else
check_edit_conflicts();
-
//-----------------------------------------------------------------------------
function copy_to_cart()
$Ajax->activate('items_table');
set_focus('_stock_id_edit');
}
-//--------------------------------------------------------------------------------
+//--------------------------------------------------------------------------------
function can_process() {
if (!is_date($_POST['OrderDate'])) {
display_error(_("The entered date is invalid."));
function handle_update_item()
{
if ($_POST['UpdateItem'] != '' && check_item_data()) {
- //alert("description=".$_POST['item_description']);
- //$_SESSION['items']->line_items[$_POST['LineNo']]->item_description = $_POST['item_description'];
$_SESSION['Items']->update_cart_item($_POST['LineNo'],
input_num('qty'), input_num('price'),
input_num('Disc') / 100, $_POST['item_description'] );
//--------------------------------------------------------------------------------
function create_cart($type, $trans_no)
-{
+{
processing_start();
$doc_type = $type;
$porder = _("Place Order");
$corder = _("Commit Order Changes");
}
+
start_form(false, true);
hidden('cart_id');
submit_center_first('ProcessOrder', $porder,
_('Check entered data and save document'), true);
+ submit_js_confirm('CancelOrder', _('You are about to void this Sales Order.\nDo you want to continue?'));
} else {
submit_center_first('ProcessOrder', $corder,
_('Validate changes and update document'), true);