Tax Inquiry: fixed refrences to non-existing database fields.
[fa-stable.git] / sales / inquiry / sales_orders_view.php
index 0095a418f78e542b1e039385abd454c0f669f6c5..676d6ea045f48b93c55d670c10e908ea4a71b875 100644 (file)
@@ -149,7 +149,8 @@ function order_link($row)
 function tmpl_checkbox($row)
 {
        global $trans_type, $page_nested;
-       if ($trans_type == ST_SALESQUOTE)
+
+       if ($trans_type == ST_SALESQUOTE || !check_sales_order_type($row['order_no']))
                return '';
 
        if ($page_nested)
@@ -210,7 +211,7 @@ ref_cells(_("#:"), 'OrderNumber', '',null, '', true);
 ref_cells(_("Ref"), 'OrderReference', '',null, '', true);
 if ($show_dates)
 {
-       date_cells(_("from:"), 'OrdersAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
+       date_cells(_("from:"), 'OrdersAfterDate', '', null, -user_transaction_days());
        date_cells(_("to:"), 'OrdersToDate', '', null, 1);
 }
 locations_list_cells(_("Location:"), 'StockLocation', null, true, true);