From a3401c413ba1f50c86eca1714b412a0b065f9f47 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 30 May 2010 11:35:02 +0000 Subject: [PATCH] Global variabel, $def_print_destination, config.php can be set to 0 or 1 Copy line memo to next line in journal entries and bank payments/deposits --- CHANGELOG.txt | 7 +++++++ config.default.php | 3 +++ gl/includes/ui/gl_bank_ui.inc | 2 +- gl/includes/ui/gl_journal_ui.inc | 2 +- reporting/includes/reports_classes.inc | 7 +++++-- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index aba5972..37c85be 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,13 @@ Legend: ! -> Note $ -> Affected files +30-May-2010 Joe Hunt +! Global variabel, $def_print_destination, config.php can be set to 0 or 1 +$ config.default.php + /reporting/includes/reports_classes.inc +! copy line memo to next line in journal entries and bank payments/deposits +$ /gl/includes/ui/gl_bank_ui.inc + /gl/includes/ui/gl_journal_ui.inc 29-May-2010 Janusz Dobrowolski # Smaller fixes initial COAs diff --git a/config.default.php b/config.default.php index b5f86d1..8302a69 100644 --- a/config.default.php +++ b/config.default.php @@ -80,6 +80,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ /* show users online discretely in the footer */ $show_users_online = 0; + /* default print destination. 0 = PDF/Printer, 1 = Excel */ + $def_print_destination = 0; + // Wiki context help configuration // If your help wiki use translated page titles uncomment next line // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 4640821..2fe97b8 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -209,7 +209,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['amount'] = price_format(0); $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; - $_POST['LineMemo'] = ""; + //$_POST['LineMemo'] = ""; // let memo go to next line Joe Hunt 2010-05-30 if(isset($_POST['_code_id_update'])) { $Ajax->activate('code_id'); } diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 3d0a972..3b4698c 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -184,7 +184,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['AmountCredit'] = ''; //price_format(0); $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; - $_POST['LineMemo'] = ""; + //$_POST['LineMemo'] = ""; // let memo go to next line Joe Hunt 2010-05-30 $_POST['_code_id_edit'] = ""; $_POST['code_id'] = ""; if(isset($_POST['_code_id_update'])) { diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index 563725c..3b72691 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -148,7 +148,7 @@ class BoxReports // function get_ctrl($name, $type) { - global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no; + global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no, $def_print_destination; $st = ''; switch ($type) @@ -205,7 +205,10 @@ class BoxReports case 'DESTINATION': $sel = array(_("PDF/Printer"), "Excel"); - return array_selector($name, null, $sel); + $def = 0; + if (isset($def_print_destination) && $def_print_destination == 1) + $def = 1; + return array_selector($name, $def, $sel); case 'COMPARE': $sel = array(_("Accumulated"), _("Period Y-1"), _("Budget")); -- 2.30.2