Commit 25230070 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: deposit service is not taxable

XXX to check with accountants
parent a2f5c1a6
...@@ -5,14 +5,18 @@ if specialise is None or specialise.getSpecialiseValue() is None: ...@@ -5,14 +5,18 @@ if specialise is None or specialise.getSpecialiseValue() is None:
return True return True
amount_list = specialise.getAggregatedAmountList(context) amount_list = specialise.getAggregatedAmountList(context)
if len(amount_list) < 1:
return False
precision = context.getPriceCurrencyValue().getQuantityPrecision() precision = context.getPriceCurrencyValue().getQuantityPrecision()
amount = amount_list[0] if len(amount_list) == 1:
# XXX why only one amount is expected?
total_price = amount.getTotalPrice() amount = amount_list[0]
total_price = amount.getTotalPrice()
elif len(amount_list) == 0:
# Not all service will generate tax (deposit)
total_price = 0
else:
return False
invoice_tax = 0. invoice_tax = 0.
for line in context.getMovementList(context.getPortalInvoiceMovementTypeList()): for line in context.getMovementList(context.getPortalInvoiceMovementTypeList()):
......
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