Commit 26811852 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Switch account from bank to payment_to_encash

parent 978a1e93
...@@ -10,11 +10,17 @@ ...@@ -10,11 +10,17 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/account_module/bank</string> <string>destination/account_module/payment_to_encash</string>
<string>source/account_module/bank</string> <string>source/account_module/payment_to_encash</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>grouping_date</string> </key> <key> <string>grouping_date</string> </key>
<value> <value>
...@@ -31,6 +37,12 @@ ...@@ -31,6 +37,12 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>2</string> </value> <value> <string>2</string> </value>
</item> </item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Accounting Transaction Line</string> </value> <value> <string>Accounting Transaction Line</string> </value>
......
...@@ -10,11 +10,17 @@ ...@@ -10,11 +10,17 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/account_module/bank</string> <string>destination/account_module/payment_to_encash</string>
<string>source/account_module/bank</string> <string>source/account_module/payment_to_encash</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>grouping_date</string> </key> <key> <string>grouping_date</string> </key>
<value> <value>
...@@ -31,6 +37,12 @@ ...@@ -31,6 +37,12 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>2</string> </value> <value> <string>2</string> </value>
</item> </item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Accounting Transaction Line</string> </value> <value> <string>Accounting Transaction Line</string> </value>
......
...@@ -28,7 +28,7 @@ if current_invoice is None: ...@@ -28,7 +28,7 @@ if current_invoice is None:
amount = 0 amount = 0
for line in current_payment.contentValues(): for line in current_payment.contentValues():
if line.getSource() in ["account_module/bank", "account_module/receivable"]: if line.getSource() in ["account_module/payment_to_encash", "account_module/receivable"]:
quantity = int(amount) * line.getQuantity() quantity = int(amount) * line.getQuantity()
line.setQuantity(quantity) line.setQuantity(quantity)
......
...@@ -524,7 +524,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix ...@@ -524,7 +524,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
self.assertEqual(current_payment.getSimulationState(), "started") self.assertEqual(current_payment.getSimulationState(), "started")
for line in current_payment.contentValues(): for line in current_payment.contentValues():
if line.getSource() == "account_module/bank": if line.getSource() == "account_module/payment_to_encash":
self.assertEqual(line.getQuantity(), -25*quantity) self.assertEqual(line.getQuantity(), -25*quantity)
if line.getSource() == "account_module/receivable": if line.getSource() == "account_module/receivable":
self.assertEqual(line.getQuantity(), 25*quantity) self.assertEqual(line.getQuantity(), 25*quantity)
...@@ -555,7 +555,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix ...@@ -555,7 +555,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
self.assertEqual(current_payment.getSimulationState(), "started") self.assertEqual(current_payment.getSimulationState(), "started")
for line in current_payment.contentValues(): for line in current_payment.contentValues():
if line.getSource() == "account_module/bank": if line.getSource() == "account_module/payment_to_encash":
self.assertEqual(line.getQuantity(), -188*quantity) self.assertEqual(line.getQuantity(), -188*quantity)
if line.getSource() == "account_module/receivable": if line.getSource() == "account_module/receivable":
self.assertEqual(line.getQuantity(), 188*quantity) self.assertEqual(line.getQuantity(), 188*quantity)
......
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