Global variabel, $def_print_destination, config.php can be set to 0 or 1
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 May 2010 11:35:02 +0000 (11:35 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 May 2010 11:35:02 +0000 (11:35 +0000)
Copy line memo to next line in journal entries and bank payments/deposits

CHANGELOG.txt
config.default.php
gl/includes/ui/gl_bank_ui.inc
gl/includes/ui/gl_journal_ui.inc
reporting/includes/reports_classes.inc

index aba59722534999977a2357724947b9feae7df175..37c85bebdfcb9ee2483b5c0fdacae739f4e0bbde 100644 (file)
@@ -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
index b5f86d1ac2270fe6e5a15ffb49577a29ede107d0..8302a69814151483024becc1b36903557b112c2e 100644 (file)
@@ -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
index 46408216862749dd478d5064e7ad4f01f2976b99..2fe97b86d22be34f6bac87eb30ace80644847516 100644 (file)
@@ -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');
                }
index 3d0a97239f8d17048477bce42f83ceada78067ca..3b4698c04b5043882bcbe5f2d0599a3303d95e9e 100644 (file)
@@ -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'])) {
index 563725c817ac8bb5ab28969c49124a56b0808343..3b72691dd59c5c234eeab682136571222d4292dd 100644 (file)
@@ -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"));