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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 22 17:53:10 CET 2007


Author: jerome
Date: Thu Mar 22 17:53:08 2007
New Revision: 13579

URL: http://svn.erp5.org?rev=13579&view=rev
Log:
Do not set asset price on the reversal transaction if it was not set on the
original transaction.


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

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml?rev=13579&r1=13578&r2=13579&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml Thu Mar 22 17:53:08 2007
@@ -123,10 +123,13 @@
   new_line.edit(\n
     source=line.getSource(portal_type=\'Account\'),\n
     destination=line.getDestination(portal_type=\'Account\'),\n
-    quantity= - line.getQuantity(),\n
-    source_total_asset_price= - (line.getSourceTotalAssetPrice() or 0),\n
-    destination_total_asset_price=\n
-                - (line.getDestinationTotalAssetPrice() or 0))\n
+    quantity= - line.getQuantity(), )\n
+\n
+  if line.getSourceTotalAssetPrice():\n
+    new_line.setSourceTotalAssetPrice( - line.getSourceTotalAssetPrice() )\n
+  if line.getDestinationTotalAssetPrice():\n
+    new_line.setDestinationTotalAssetPrice(\n
+                                  - line.getDestinationTotalAssetPrice() )\n
   \n
   # copy some values if they are defined explicitly on line\n
   for prop in [ \'source_section\', \'destination_section\',\n

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=13579&r1=13578&r2=13579&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Thu Mar 22 17:53:08 2007
@@ -1,1 +1,1 @@
-220
+221




More information about the Erp5-report mailing list