X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sales%2Finquiry%2Fsales_orders_view.php;h=b96b99dd1e7f3692ec00babeb090e65ab3bd7cc8;hb=1571869d54be48452fdbe08f25130972ff0a7b5a;hp=7a7bbbab3d6f474d627db2d898fd673b83acae88;hpb=7e830126b96477e969fe3b48d9fc0e78f6c1fe00;p=fa-stable.git diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index 7a7bbbab..b96b99dd 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -109,7 +109,7 @@ function check_overdue($row) return (date1_greater_date2(Today(), sql2date($row['delivery_date']))); else return ($row['type'] == 0 - && date1_greater_date2(Today(), sql2date($row['ord_date'])) + && date1_greater_date2(Today(), sql2date($row['delivery_date'])) && ($row['TotDelivered'] < $row['TotQuantity'])); } @@ -128,7 +128,7 @@ function prt_link($row) function edit_link($row) { global $page_nested; - + if ($page_nested) return ''; global $trans_type; @@ -198,7 +198,7 @@ function invoice_prep_link($row) return $row['inv_payments'] < $row['total'] ? pager_link($row['ord_payments'] ? _("Prepayment Invoice") : _("Final Invoice"), - "/sales/customer_invoice.php?InvoicePrepayments=" .$row['order_no'], $row['ord_payments'] ? ICON_MONEY : ICON_DOC) : ''; + "/sales/customer_invoice.php?InvoicePrepayments=" .$row['order_no'], ICON_DOC) : ''; } //--------------------------------------------------------------------------------------------- @@ -251,7 +251,7 @@ if ($show_dates) date_cells(_("from:"), 'OrdersAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days()); date_cells(_("to:"), 'OrdersToDate', '', null, 1); } -locations_list_cells(_("Location:"), 'StockLocation', null, true); +locations_list_cells(_("Location:"), 'StockLocation', null, true, true); if($show_dates) { end_row(); @@ -260,9 +260,10 @@ if($show_dates) { start_table(TABLESTYLE_NOBORDER); start_row(); } -stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true); +stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true, true); + if (!@$_GET['popup']) - customer_list_cells(_("Select a customer: "), 'customer_id', null, true); + customer_list_cells(_("Select a customer: "), 'customer_id', null, true, true); if ($trans_type == ST_SALESQUOTE) check_cells(_("Show All:"), 'show_all'); @@ -282,11 +283,11 @@ $sql = get_sql_for_sales_orders_view($selected_customer, $trans_type, $_POST['Or if ($trans_type == ST_SALESORDER) $cols = array( _("Order #") => array('fun'=>'view_link'), - _("Ref"), - _("Customer"), + _("Ref") => array('type' => 'sorder.reference', 'ord' => '') , + _("Customer") => array('type' => 'debtor.name' , 'ord' => '') , _("Branch"), _("Cust Order Ref"), - _("Order Date") => 'date', + _("Order Date") => array('type' => 'date', 'ord' => ''), _("Required By") =>array('type'=>'date', 'ord'=>''), _("Delivery To"), _("Order Total") => array('type'=>'amount', 'ord'=>''), @@ -314,11 +315,11 @@ if ($_POST['order_view_mode'] == 'OutstandingOnly') { array('insert'=>true, 'fun'=>'edit_link'))); } elseif ($_POST['order_view_mode'] == 'InvoiceTemplates') { - array_substitute($cols, 3, 1, _("Description")); + array_substitute($cols, 4, 1, _("Description")); array_append($cols, array( array('insert'=>true, 'fun'=>'invoice_link'))); } else if ($_POST['order_view_mode'] == 'DeliveryTemplates') { - array_substitute($cols, 3, 1, _("Description")); + array_substitute($cols, 4, 1, _("Description")); array_append($cols, array( array('insert'=>true, 'fun'=>'delivery_link')) ); @@ -350,4 +351,3 @@ submit_center('Update', _("Update"), true, '', null); end_form(); end_page(); -?> \ No newline at end of file