if (isset($_GET['AddedID'])) {
$dispatch_no = $_GET['AddedID'];
- print_hidden_script(13);
display_notification(_("Dispatch processed:") . ' '.$_GET['AddedID'], true);
} elseif (isset($_GET['UpdatedID'])) {
$delivery_no = $_GET['UpdatedID'];
- print_hidden_script(13);
display_notification_centered(sprintf(_('Delivery Note # %d has been updated.'),$delivery_no));
$ord->order_no = key($ord->trans_no);
$ord->trans_no = 0;
$ord->reference = references::get_next(13);
+ $ord->document_date = Today();
$_SESSION['Items'] = $ord;
copy_from_cart();
table_header($th);
$k = 0;
$has_marked = false;
-$show_qoh = true;
foreach ($_SESSION['Items']->line_items as $line=>$ln_itm) {
if ($ln_itm->quantity==$ln_itm->qty_done) {
continue; //this line is fully delivered
}
// if it's a non-stock item (eg. service) don't show qoh
+ $show_qoh = true;
if (sys_prefs::allow_negative_stock() || !has_stock_holding($ln_itm->mb_flag) ||
$ln_itm->qty_dispatched == 0) {
$show_qoh = false;
end_row();
}
-$_POST['ChargeFreightCost'] = price_format($_SESSION['Items']->freight_cost);
-
-if (!check_num('ChargeFreightCost')) {
- $_POST['ChargeFreightCost'] = price_format(0);
-}
+$_POST['ChargeFreightCost'] = get_post('ChargeFreightCost',
+ price_format($_SESSION['Items']->freight_cost));
start_row();