[Erp5-report] r7660 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/erp...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 9 14:15:48 CEST 2006


Author: kevin
Date: Fri Jun  9 14:15:46 2006
New Revision: 7660

URL: http://svn.erp5.org?rev=7660&view=rev
Log:
Delete empty accounting lines in roundDebitCredit script.

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml
    erp5/trunk/bt5/erp5_accounting/bt/change_log

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml?rev=7660&r1=7659&r2=7660&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml Fri Jun  9 14:15:46 2006
@@ -14,7 +14,9 @@
       <dictionary>
         <item>
             <key> <string>Python_magic</string> </key>
-            <value> <string encoding="base64">O/INCg==</string> </value>
+            <value>
+              <none/>
+            </value>
         </item>
         <item>
             <key> <string>Script_magic</string> </key>
@@ -81,8 +83,15 @@
 debit_balance  = 0.0\n
 credit_balance = 0.0\n
 \n
-for line in context.getMovementList(portal_type=context.getPortalAccountingMovementTypeList()):\n
+line_list = context.getMovementList(portal_type=context.getPortalAccountingMovementTypeList())\n
+\n
+for line in line_list:\n
   line_quantity = r_(line.getQuantity())\n
+  # Auto remove empty lines\n
+  if line_quantity == 0.0: \n
+    context.deleteContent(line.getId())\n
+    # Proceed to next line\n
+    continue\n
   line.setQuantity(line_quantity)  \n
   if line.getSourceDebit() > 0:\n
     line.setSourceDebit(r_(line.getSourceDebit()))\n
@@ -154,6 +163,7 @@
                             <string>net_balance</string>
                             <string>debit_balance</string>
                             <string>credit_balance</string>
+                            <string>line_list</string>
                             <string>_getiter_</string>
                             <string>line_quantity</string>
                             <string>abs</string>

Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=7660&r1=7659&r2=7660&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log Fri Jun  9 14:15:46 2006
@@ -1,3 +1,6 @@
+2006-06-09 Kevin
+* Delete empty accounting lines in roundDebitCredit script.
+
 2006-06-08 Kevin
 * Don't create empty lines when the closing balance is generated.
 * Add direct link to the wrong transaction object when closing the accounting period.




More information about the Erp5-report mailing list