read_po($trans_no, $cart);
$cart->order_no = $trans_no;
} else
- $cart->reference = $Refs->get_next($trans_type);
+ $cart->reference = $Refs->get_next($trans_type, null,
+ array('supplier_id' => $cart->supplier_id, 'date' => get_post('OrderDate')));
$_SESSION['PO'] = &$cart;
}
start_row();
label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'");
- $order->order_no ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true)
+ $order->trans_type == ST_SUPPINVOICE
+ ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true)
: label_cell('', "colspan=2");
end_row();