function process_receive_po() { global $path_to_root; if (!can_process()) { return; } if (check_po_changed()) { echo "<br> " . tr("This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user.") . "<BR>"; echo "<center><a href='{$path_to_root}/purchasing/inquiry/po_search.php?" . SID . "'>" . tr("Select a different purchase order for receiving goods against") . "</a></center>"; echo "<center><a href='{$path_to_root}/po_receive_items.php?" . SID . "PONumber=" . $_SESSION['PO']->OrderNumber . "'>" . tr("Re-Read the updated purchase order for receiving goods against") . "</a></center>"; unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); unset($_POST['ProcessGoodsReceived']); exit; } $grn = add_grn($_SESSION['PO'], $_POST['DefaultReceivedDate'], $_POST['ref'], $_POST['Location']); unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); meta_forward($_SERVER['PHP_SELF'], "AddedID={$grn}"); }
function process_receive_po() { global $path_to_root, $Ajax; if (!can_process()) { return; } if (check_po_changed()) { display_error(_("This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user.")); hyperlink_no_params("{$path_to_root}/purchasing/inquiry/po_search.php", _("Select a different purchase order for receiving goods against")); hyperlink_params("{$path_to_root}/purchasing/po_receive_items.php", _("Re-Read the updated purchase order for receiving goods against"), "PONumber=" . $_SESSION['PO']->order_no); unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); unset($_POST['ProcessGoodsReceived']); $Ajax->activate('_page_body'); display_footer_exit(); } $grn =& $_SESSION['PO']; $grn->orig_order_date = $_POST['DefaultReceivedDate']; $grn->reference = $_POST['ref']; $grn->Location = $_POST['Location']; $grn->ex_rate = input_num('_ex_rate', null); $grn_no = add_grn($grn); new_doc_date($_POST['DefaultReceivedDate']); unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); meta_forward($_SERVER['PHP_SELF'], "AddedID={$grn_no}"); }