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");
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');
}
}
//---------------------------------------------------------------------------------------------------
+if (isset($_POST['update'])) {
+ copy_to_cart();
+ $Ajax->activate('items_table');
+}
+
$id = find_submit('Delete');
if ($id != -1)
handle_delete_item($id);