X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep106.php;h=4aac08ab275ad665a614d3e960c9e44c51daae63;hb=3ff9ed87cb909f19c8fe3e7dfda5df79d0c01a6c;hp=1b891f4535f85cc099dcfb67bf7fae5fb055a916;hpb=f50187b9c3095886d7fd847f635cd8763109a75e;p=fa-stable.git diff --git a/reporting/rep106.php b/reporting/rep106.php index 1b891f45..4aac08ab 100644 --- a/reporting/rep106.php +++ b/reporting/rep106.php @@ -9,12 +9,12 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 2; +$page_security = 'SA_SALESMANREP'; // ---------------------------------------------------------------- // $ Revision: 2.0 $ // Creator: Joe Hunt // date_: 2005-05-19 -// Title: Order Status List +// Title: Salesman Report // ---------------------------------------------------------------- $path_to_root=".."; @@ -26,7 +26,6 @@ include_once($path_to_root . "/inventory/includes/db/items_category_db.inc"); //---------------------------------------------------------------------------------------------------- -// trial_inquiry_controls(); print_salesman_list(); //---------------------------------------------------------------------------------------------------- @@ -46,7 +45,7 @@ function GetSalesmanTrans($from, $to) AND ".TB_PREF."sales_orders.branch_code=".TB_PREF."cust_branch.branch_code AND ".TB_PREF."cust_branch.salesman=".TB_PREF."salesman.salesman_code AND ".TB_PREF."debtor_trans.debtor_no=".TB_PREF."debtors_master.debtor_no - AND (".TB_PREF."debtor_trans.type=10 OR ".TB_PREF."debtor_trans.type=11) + AND (".TB_PREF."debtor_trans.type=".ST_SALESINVOICE." OR ".TB_PREF."debtor_trans.type=".ST_CUSTCREDIT.") AND ".TB_PREF."debtor_trans.tran_date>='$fromdate' AND ".TB_PREF."debtor_trans.tran_date<='$todate' ORDER BY ".TB_PREF."salesman.salesman_code, ".TB_PREF."debtor_trans.tran_date"; @@ -66,22 +65,16 @@ function print_salesman_list() $comments = $_POST['PARAM_3']; $destination = $_POST['PARAM_4']; if ($destination) - { include_once($path_to_root . "/reporting/includes/excel_report.inc"); - $filename = "SalesmanListing.xml"; - } else - { include_once($path_to_root . "/reporting/includes/pdf_report.inc"); - $filename = "SalesmanListing.pdf"; - } if ($summary == 0) $sum = _("No"); else $sum = _("Yes"); - $dec = user_qty_dec(); + $dec = user_price_dec(); $cols = array(0, 60, 150, 220, 325, 385, 450, 515); @@ -100,7 +93,7 @@ function print_salesman_list() $cols2 = $cols; $aligns2 = $aligns; - $rep = new FrontReport(_('Salesman Listing'), $filename, user_pagesize()); + $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize()); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);