X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=purchasing%2Fpo_entry_items.php;h=961bb5b3a85ac2440d8c027c2e3ca411d733f026;hb=3f3cfa578adbc2b71f4fd9c8d0f5536d26af43d8;hp=53bf85e35d79372f9da723733ddd970a706528ef;hpb=7e830126b96477e969fe3b48d9fc0e78f6c1fe00;p=fa-stable.git diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 53bf85e3..961bb5b3 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -23,8 +23,11 @@ set_page_security( @$_SESSION['PO']->trans_type, ST_SUPPINVOICE => 'SA_SUPPLIERINVOICE'), array( 'NewOrder' => 'SA_PURCHASEORDER', 'ModifyOrderNumber' => 'SA_PURCHASEORDER', + 'AddedID' => 'SA_PURCHASEORDER', 'NewGRN' => 'SA_GRN', - 'NewInvoice' => 'SA_SUPPLIERINVOICE') + 'AddedGRN' => 'SA_GRN', + 'NewInvoice' => 'SA_SUPPLIERINVOICE', + 'AddedPI' => 'SA_SUPPLIERINVOICE') ); $js = ''; @@ -58,7 +61,7 @@ if (isset($_GET['ModifyOrderNumber']) && is_numeric($_GET['ModifyOrderNumber'])) page($_SESSION['page_title'], false, false, "", $js); if (isset($_GET['ModifyOrderNumber'])) - check_is_closed(ST_PURCHORDER, $_GET['ModifyOrderNumber']); + check_is_editable(ST_PURCHORDER, $_GET['ModifyOrderNumber']); //--------------------------------------------------------------------------------------------------- @@ -393,7 +396,8 @@ function can_commit() set_focus('StkLocation'); return false; } - + if (!db_has_currency_rates($_SESSION['PO']->curr_code, $_POST['OrderDate'])) + return false; if ($_SESSION['PO']->order_has_items() == false) { display_error (_("The order cannot be placed because there are no lines entered on this order."));