X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep704.php;h=f69d43547c8bc7982178fde55ec932a0cdbe80ea;hb=2b2cbcfe6a448536113966cbb11b79eda73db5ab;hp=192cc5230ea8eb1c1469d3ce5d8e645261f49266;hpb=f50187b9c3095886d7fd847f635cd8763109a75e;p=fa-stable.git diff --git a/reporting/rep704.php b/reporting/rep704.php index 192cc523..f69d4354 100644 --- a/reporting/rep704.php +++ b/reporting/rep704.php @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 2; +$page_security = 'SA_GLREP'; // ---------------------------------------------------------------- // $ Revision: 2.0 $ // Creator: Joe Hunt @@ -25,14 +25,13 @@ include_once($path_to_root . "/gl/includes/gl_db.inc"); //---------------------------------------------------------------------------------------------------- -// trial_inquiry_controls(); print_GL_transactions(); //---------------------------------------------------------------------------------------------------- function print_GL_transactions() { - global $path_to_root; + global $path_to_root, $systypes_array; $dim = get_company_pref('use_dimension'); $dimension = $dimension2 = 0; @@ -59,17 +58,12 @@ function print_GL_transactions() $comments = $_POST['PARAM_4']; $destination = $_POST['PARAM_5']; } - if (isset($destination) && $destination) - { + if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); - $filename = "GLAccountTransactions.xml"; - } else - { include_once($path_to_root . "/reporting/includes/pdf_report.inc"); - $filename = "GLAccountTransactions.pdf"; - } - $rep = new FrontReport(_('GL Account Transactions'), $filename, user_pagesize()); + + $rep = new FrontReport(_('GL Account Transactions'), "GLAccountTransactions", user_pagesize()); $dec = user_price_dec(); $cols = array(0, 70, 90, 140, 210, 280, 340, 400, 450, 510, 570); @@ -153,14 +147,14 @@ function print_GL_transactions() { $total += $myrow['amount']; - $rep->TextCol(0, 1, systypes::name($myrow["type"])); + $rep->TextCol(0, 1, $systypes_array[$myrow["type"]]); $rep->TextCol(1, 2, $myrow['type_no']); $rep->DateCol(2, 3, $myrow["tran_date"], true); if ($dim >= 1) $rep->TextCol(3, 4, get_dimension_string($myrow['dimension_id'])); if ($dim > 1) $rep->TextCol(4, 5, get_dimension_string($myrow['dimension2_id'])); - $rep->TextCol(5, 6, payment_person_types::person_name($myrow["person_type_id"],$myrow["person_id"], false)); + $rep->TextCol(5, 6, payment_person_name($myrow["person_type_id"],$myrow["person_id"], false)); if ($myrow['amount'] > 0.0) $rep->AmountCol(6, 7, abs($myrow['amount']), $dec); else