Commit d03f98b0 authored by Yoshinori Okuji's avatar Yoshinori Okuji

fix some problems in buildPaymentTransactions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2254 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6521596
...@@ -184,6 +184,8 @@ class Invoice(AccountingTransaction): ...@@ -184,6 +184,8 @@ class Invoice(AccountingTransaction):
payment_transaction = accounting_module.newContent(portal_type = payment_type payment_transaction = accounting_module.newContent(portal_type = payment_type
, id = payment_id , id = payment_id
, source = self.getSource() , source = self.getSource()
, reference = self.getReference()
, start_date = self.getStartDate()
, source_payment = self.getSourcePayment() , source_payment = self.getSourcePayment()
, source_section = self.getSourceSection() , source_section = self.getSourceSection()
, destination = self.getDestination() , destination = self.getDestination()
...@@ -205,6 +207,9 @@ class Invoice(AccountingTransaction): ...@@ -205,6 +207,9 @@ class Invoice(AccountingTransaction):
, quantity = quantity , quantity = quantity
) )
else : else :
previous_quantity = payment_transaction_line.getQuantity()
if previous_quantity is not None:
quantity = quantity + previous_quantity
payment_transaction_line.setQuantity(quantity) payment_transaction_line.setQuantity(quantity)
# What do we really need to update in the simulation movement ? # What do we really need to update in the simulation movement ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment