[Erp5-report] r14354 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 4 12:44:19 CEST 2007


Author: jerome
Date: Fri May  4 12:44:19 2007
New Revision: 14354

URL: http://svn.erp5.org?rev=14354&view=rev
Log:
Add account_id parameter to filter lines in Invoice_getRemainingTotalPayablePrice

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml?rev=14354&r1=14353&r2=14354&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml Fri May  4 12:44:19 2007
@@ -74,11 +74,16 @@
 invoice and all payments that have been made on this invoice.\n
 For this, we use both causality relation between transactions and grouping\n
 reference for lines.\n
+\n
 If `detailed` argument is set to a true value, instead of returning the price\n
 as a float value, it returns a mapping (node, mirror_section) -> total_price.\n
+\n
 The `at_date` paremeter is when you want to know the remaining amount at a\n
 particuliar date. This simply ignores related payments or transactions after\n
 this date.\n
+\n
+The `account_id` parameter can be use to filter receivable / payable lines to a\n
+specific account.\n
 """\n
 portal = context.getPortalObject()\n
 total_payable_price_per_node_section = dict()\n
@@ -115,6 +120,8 @@
   \n
   if node_value is not None and \\\n
       node_value.getAccountTypeId() in (\'payable\', \'receivable\'):\n
+    if account_id is not None and node_value.getId() != account_id:\n
+      continue\n
     key = (node_value.getRelativeUrl(), mirror_section)\n
     total_payable_price_per_node_section[key] =\\\n
           total_payable_price_per_node_section.get(key, 0) + amount\n
@@ -205,7 +212,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>detailed=0, at_date=None</string> </value>
+            <value> <string>detailed=0, at_date=None, account_id=None</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -225,7 +232,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>2</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -233,6 +240,7 @@
                           <tuple>
                             <string>detailed</string>
                             <string>at_date</string>
+                            <string>account_id</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
@@ -276,6 +284,7 @@
               <tuple>
                 <int>0</int>
                 <none/>
+                <none/>
               </tuple>
             </value>
         </item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=14354&r1=14353&r2=14354&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Fri May  4 12:44:19 2007
@@ -1,1 +1,1 @@
-299
+300




More information about the Erp5-report mailing list