Additional fixes to quick entry feature.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 24 Jan 2009 21:52:10 +0000 (21:52 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 24 Jan 2009 21:52:10 +0000 (21:52 +0000)
CHANGELOG.txt
admin/db/voiding_db.inc
gl/includes/db/gl_db_bank_trans.inc
gl/includes/db/gl_db_trans.inc
includes/types.inc

index 6f2305cc69dc78115cc57a3fb3f4352906c2982f..2144b3fec9fd494784b87b8c6e3ad136cc44fd7c 100644 (file)
@@ -24,6 +24,12 @@ $ -> Affected files
 $ /themes/aqua/default.css
   /themes/cool/default.css
   /themes/default/default.css
+# Voiding tax records included via GL/bank transactions
+$ /admin/db/voiding_db.inc
+  /gl/includes/db/gl_db_bank_trans.inc
+  /gl/includes/db/gl_db_trans.inc
+# Fixed quick entry types values.
+$ /includes/types.inc
 
 23-Jan-2009 Joe Hunt
 + Added new files in doc subdirectory
index 0f77cb20cec7104265024f39da6ead7d2547a193..2869bfd80603ed5707e1d70b30e9e1b240614425 100644 (file)
@@ -25,9 +25,7 @@ function void_transaction($type, $type_no, $date_, $memo_)
                case 0 : // it's a journal entry
                        if (!exists_gl_trans($type, $type_no))
                                return false;
-                       void_gl_trans($type, $type_no);
-                       if (exists_bank_trans($type, $type_no))
-                               void_bank_trans($type, $type_no);
+                       void_journal_trans($type, $type_no);
                        break;
 
                case 1 : // it's a payment
index a9c3deae1718f5f81db10e0f3c7aabd8ae7ee7f7..2c47f2badb4aa907b87a18ce1890f99c7bfc00c7 100644 (file)
@@ -96,10 +96,12 @@ function void_bank_trans($type, $type_no, $nested=false)
 
        // in case it's a customer trans - probably better to check first
        void_cust_allocations($type, $type_no);
+       void_customer_trans_tax_details($type, $type_no);
        void_customer_trans($type, $type_no);
 
        // in case it's a supplier trans - probably better to check first
        void_supp_allocations($type, $type_no);
+       void_supp_invoice_tax_items($type, $type_no);
        void_supp_trans($type, $type_no);
 
        if (!$nested)
index b93c75e20256058e568127dd82a679e3e270034a..19dac59c15779c4d303d53ca7dd3f9ab40d46809 100644 (file)
@@ -312,6 +312,18 @@ function void_gl_trans($type, $trans_id, $nested=false)
                commit_transaction();
 }
 
-//--------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+
+function void_journal_trans($type, $type_no)
+{
+       begin_transaction();
+
+       void_gl_trans($type, $type_no, true);
+       void_bank_trans($type, $type_no,true);
+       void_customer_trans_tax_details($type, $type_no);
+       void_supp_invoice_tax_items($type, $type_no);
+
+       commit_transaction();
+}
 
 ?>
\ No newline at end of file
index 4cde8738ba5e99ae30b38f277c3d0d04643232e1..68696cd6e74e11d5eb823219d94d271752efb370 100644 (file)
@@ -315,8 +315,8 @@ $quick_actions = array(
        't-' => _('Taxes included, reduce base') // ditto & reduce base amount
 );
 
-define('QE_DEPOSIT', '1');
-define('QE_PAYMENT', '2');
+define('QE_PAYMENT', '1');
+define('QE_DEPOSIT', '2');
 define('QE_JOURNAL', '3');
 define('QE_SUPPINV', '4');