X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fui%2Fpo_ui.inc;h=ae8f4ba297ff2b32d900383ea62707163bc0b42b;hb=e67a7d7074ceb37291846e68f8c5683bb93560ab;hp=042c06400547e11a1b85204a0e0301897c25b85b;hpb=9dab04be9d81766f1878d3688ee73d0bcf29f5d2;p=fa-stable.git diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 042c0640..ae8f4ba2 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -37,7 +37,7 @@ function create_new_po() unset ($_SESSION['PO']); } - session_register("PO"); + //session_register("PO"); $_SESSION['PO'] = new purch_order; $_POST['OrderDate'] = new_doc_date(); @@ -177,37 +177,33 @@ function display_po_items(&$order, $editable=true) $k = 0; foreach ($order->line_items as $line_no => $po_line) { - - if ($po_line->Deleted == false) + $line_total = round($po_line->quantity * $po_line->price, user_price_dec()); + if (!$editable || ($id != $line_no)) { - $line_total = round($po_line->quantity * $po_line->price, user_price_dec()); - if (!$editable || ($id != $line_no)) + alt_table_row_color($k); + label_cell($po_line->stock_id); + label_cell($po_line->item_description); + qty_cell($po_line->quantity, false, get_qty_dec($po_line->stock_id)); + qty_cell($po_line->qty_received, false, get_qty_dec($po_line->stock_id)); + label_cell($po_line->units); + label_cell($po_line->req_del_date); + amount_decimal_cell($po_line->price); + amount_cell($line_total); + + if ($editable) { - alt_table_row_color($k); - label_cell($po_line->stock_id); - label_cell($po_line->item_description); - qty_cell($po_line->quantity, false, get_qty_dec($po_line->stock_id)); - qty_cell($po_line->qty_received, false, get_qty_dec($po_line->stock_id)); - label_cell($po_line->units); - label_cell($po_line->req_del_date); - amount_decimal_cell($po_line->price); - amount_cell($line_total); - - if ($editable) - { edit_button_cell("Edit$line_no", _("Edit"), _('Edit document line')); delete_button_cell("Delete$line_no", _("Delete"), - _('Remove line from document')); - } - end_row(); - } - else - { - po_item_controls($order, $po_line->stock_id); + _('Remove line from document')); } - $total += $line_total; + end_row(); + } + else + { + po_item_controls($order, $po_line->stock_id); } + $total += $line_total; } if ($id==-1 && $editable)