Commit 978a1e93 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_payzen: Switch account from bank to payment_to_encash

   Payzen has a delay between the Charge and the transference to the bank. This requires the accountant to generate yet a new accounting document to represent it.
parent aeab83a4
......@@ -61,8 +61,8 @@ for invoice in portal.portal_catalog(**select_kw):
temp_movement_bank = newTempSimulationMovement(
temp_object=True, id=str(_id),
quantity=1 * quantity,
source='account_module/bank',
destination='account_module/bank',
source='account_module/payment_to_encash',
destination='account_module/payment_to_encash',
**temp_movement_kw
)
_id += 1
......
......@@ -43,7 +43,7 @@ class TestSlapOSPaymentTransactionOrderBuilderMixin(SlapOSTestCaseMixin):
movement_list = payment.getMovementList()
self.assertEqual(2, len(movement_list))
bank_list = [q for q in movement_list
if q.getSource() == 'account_module/bank']
if q.getSource() == 'account_module/payment_to_encash']
rec_list = [q for q in movement_list
if q.getSource() == 'account_module/receivable']
self.assertEqual(1, len(bank_list))
......@@ -57,8 +57,8 @@ class TestSlapOSPaymentTransactionOrderBuilderMixin(SlapOSTestCaseMixin):
invoice_amount = self.sumReceivable(invoice)
assertLine(bank_list[0], invoice_amount, [
'destination/account_module/bank',
'source/account_module/bank'])
'destination/account_module/payment_to_encash',
'source/account_module/payment_to_encash'])
assertLine(rec_list[0], -1 * invoice_amount, [
'destination/account_module/payable',
'source/account_module/receivable'])
......
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