Transaction names shortcuts added.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 28 Nov 2010 19:12:41 +0000 (19:12 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 28 Nov 2010 19:12:41 +0000 (19:12 +0000)
CHANGELOG.txt
includes/sysnames.inc
reporting/includes/reports_classes.inc

index 4e4c485fe1563ebf9c93d2e4183ddeab5b03439a..ed5b0158e6c6db99e4de5018911f70ce35af2e2c 100644 (file)
@@ -19,12 +19,17 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+28-Nov-2010 Janusz Dobrowolski
++ Transaction name shortcuts added
+$ /includes/sysnames.inc
+  /reporting/includes/reports_classes.inc
+
 28-Nov-2010 Joe Hunt
 - Removed possibility to use bank account in Direct Invoice. This
   was an old method for handling Cash Payment. We now have better options.
 $ /sales/includes/db/sales_invoice_db.inc
   /sales/manage/customer_branches.php
-  
+
 26-Nov-2010 Janusz Dobrowolski
 ! [0000282] Improved reports menu display.
 $ /js/inserts.js
index bf48ad9c5c0e3214713c99b77d67192711635fc9..1b9f675487d2febb8b50d2172b62d6ceb10ab5ee 100644 (file)
@@ -43,6 +43,32 @@ $systypes_array = array (
        ST_DIMENSION => _("Dimension")
        );
 
+$type_shortcuts = array(
+       ST_JOURNAL => _("GJ"), // general journal
+       ST_BANKPAYMENT => _("BP"),
+       ST_BANKDEPOSIT => _("BD"),
+       ST_BANKTRANSFER => _("BT"),
+       ST_SALESINVOICE => _("SI"),
+       ST_CUSTCREDIT => _("CN"),
+       ST_CUSTPAYMENT => _("CP"),
+       ST_CUSTDELIVERY => _("DN"),
+       ST_LOCTRANSFER => _("IT"), // inventory transfer
+       ST_INVADJUST => _("IA"),
+       ST_PURCHORDER => _("PO"),
+       ST_SUPPINVOICE => _("PI"), // purchase invoice
+       ST_SUPPCREDIT => _("PC"),
+       ST_SUPPAYMENT => _("SP"),
+       ST_SUPPRECEIVE => _("GRN"),
+       ST_WORKORDER => _("WO"),
+       ST_MANUISSUE => _("WI"),
+       ST_MANURECEIVE => _("WP"),
+       ST_SALESORDER => _("SO"),
+       ST_SALESQUOTE => _("SQ"),
+       ST_COSTUPDATE => _("CU"),
+       ST_DIMENSION => _("Dim")
+);
+
+
 //----------------------------------------------------------------------------------
 //             Bank transaction types
 //
index 72be5bbf67c7fbf87140c386adce8f3fb00c7431..2faf00ae63bbb8ab73cc079464499032e852e22b 100644 (file)
@@ -158,7 +158,8 @@ class BoxReports
        //
        function get_ctrl($name, $type)
        {
-               global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no, $def_print_destination;
+               global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no,
+                       $def_print_destination, $type_shortcuts;
 
                $st = '';
                        switch ($type)
@@ -299,8 +300,8 @@ class BoxReports
 //                                             return supplier_list($name);
 
                                case 'INVOICE':
-                                       $IV = _("IV");
-                                       $CN = _("CN");
+                                       $IV = $type_shortcuts[ST_SALESINVOICE];
+                                       $CN = $type_shortcuts[ST_CUSTCREDIT];
                                        $ref = ($print_invoice_no == 1 ? "trans_no" : "reference");
                                        $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-',
                                                ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_SALESINVOICE.", ' $IV ', ' $CN '), ".TB_PREF."debtors_master.name) as IName
@@ -308,7 +309,7 @@ class BoxReports
                                        return combo_input($name, '', $sql, 'TNO', 'IName',array('order'=>false));
 
                                case 'DELIVERY':
-                                       $DN = _("DN");
+                                       $DN = $type_shortcuts[ST_CUSTDELIVERY];
                                        $sql = "SELECT
                                        concat(".TB_PREF."debtor_trans.trans_no, '-', ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.trans_no, ' $DN ',
                                         ".TB_PREF."debtors_master.name) as IName
@@ -341,9 +342,9 @@ class BoxReports
                                        return combo_input($name, '', $sql, 'order_no', 'IName',array('order'=>false));
 
                                case 'REMITTANCE':
-                                       $BP = _("BP");
-                                       $SP = _("SP");
-                                       $CN = _("CN");
+                                       $BP = $type_shortcuts[ST_BANKPAYMENT];
+                                       $SP = $type_shortcuts[ST_SUPPAYMENT];
+                                       $CN = $type_shortcuts[ST_SUPPCREDIT];
                                        $ref = ($print_invoice_no == 1 ? "trans_no" : "reference");
                                        $sql = "SELECT concat(".TB_PREF."supp_trans.trans_no, '-',
                                                ".TB_PREF."supp_trans.type) AS TNO, concat(".TB_PREF."supp_trans.$ref, if (type=".ST_BANKPAYMENT.", ' $BP ', if (type=".ST_SUPPAYMENT.", ' $SP ', ' $CN ')), ".TB_PREF."suppliers.supp_name) as IName
@@ -351,9 +352,9 @@ class BoxReports
                                        return combo_input($name, '', $sql, 'TNO', 'IName',array('order'=>false));
 
                                case 'RECEIPT':
-                                       $BD = _("BD");
-                                       $CP = _("CP");
-                                       $CN = _("CN");
+                                       $BD = $type_shortcuts[ST_BANKDEPOSIT];
+                                       $CP = $type_shortcuts[ST_CUSTPAYMENT];
+                                       $CN = $type_shortcuts[ST_CUSTCREDIT];
                                        $ref = ($print_invoice_no == 1 ? "trans_no" : "reference");
                                        $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-',
                                                ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_BANKDEPOSIT.", ' $BD ', if (type=".ST_CUSTPAYMENT.", ' $CP ', ' $CN ')), ".TB_PREF."debtors_master.name) as IName