X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fpo_entry_items.php;h=4a5aa39dea106fac0d1171781303a6f8ecc8066e;hb=0e15ca861655a6403f12a90f187c3fc00f35949d;hp=17e123f9c6f891a54bd3c4e85e134d686de29792;hpb=e39803c300ad0071a20d0c1977b5db6d79aa91c4;p=fa-stable.git diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 17e123f9..4a5aa39d 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -133,6 +133,9 @@ if (isset($_GET['AddedID'])) display_note(get_gl_view_str($trans_type, $trans_no, _("View the GL Journal Entries for this Invoice")), 1); + hyperlink_params("$path_to_root/purchasing/supplier_payment.php", _("Entry supplier &payment for this invoice"), + "trans_type=$trans_type&PInvoice=".$trans_no); + hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$trans_type&trans_no=$trans_no"); @@ -353,22 +356,14 @@ function can_commit() if (!$_SESSION['PO']->order_no) { - if (!$Refs->is_valid(get_post('ref'))) + if (!check_reference(get_post('ref'), $_SESSION['PO']->trans_type)) { - display_error(_("There is no reference entered for this purchase order.")); - set_focus('ref'); - return false; - } - - if (!is_new_reference(get_post('ref'), $_SESSION['PO']->trans_type)) - { - display_error(_("The entered reference is already in use.")); set_focus('ref'); return false; } } - if ($_SESSION['PO']->trans_type == ST_SUPPINVOICE && !$Refs->is_valid(get_post('supp_ref'))) + if ($_SESSION['PO']->trans_type == ST_SUPPINVOICE && trim(get_post('supp_ref')) == false) { display_error(_("You must enter a supplier's invoice reference.")); set_focus('supp_ref'); @@ -437,6 +432,11 @@ function handle_commit_order() } } //--------------------------------------------------------------------------------------------------- +if (isset($_POST['update'])) { + copy_to_cart(); + $Ajax->activate('items_table'); +} + $id = find_submit('Delete'); if ($id != -1) handle_delete_item($id);