function display_po_receive_items()
{
div_start('grn_items');
- start_table(TABLESTYLE, "colspan=7 width=90%");
+ start_table(TABLESTYLE, "colspan=7 width='90%'");
$th = array(_("Item Code"), _("Description"), _("Ordered"), _("Units"), _("Received"),
_("Outstanding"), _("This Delivery"), _("Price"), _("Total"));
table_header($th);
return false;
}
- if (!$Refs->is_valid($_POST['ref']))
- {
- display_error(_("You must enter a reference."));
- set_focus('ref');
- return false;
- }
-
- if (!is_new_reference($_POST['ref'], ST_SUPPRECEIVE))
+ if (!check_reference($_POST['ref'], ST_SUPPRECEIVE))
{
- display_error(_("The entered reference is already in use."));
set_focus('ref');
return false;
}
{
create_new_po(ST_PURCHORDER, $_GET['PONumber']);
$_SESSION['PO']->trans_type = ST_SUPPRECEIVE;
- $_SESSION['PO']->reference = $Refs->get_next(ST_SUPPRECEIVE);
+ $_SESSION['PO']->reference = $Refs->get_next(ST_SUPPRECEIVE,
+ array('date' => $_SESSION['PO']->tran_date, 'supplier' => $_SESSION['PO']->supplier_id));
copy_from_cart();
}