Commit e8f7100d authored by Thierry's avatar Thierry

bug fix in buildInvoiceList in case of destination_section has no default_address


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@580 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fe6ebbac
......@@ -419,12 +419,16 @@ une liste de mouvements..."""
invoice.setProperty(key, order.getProperty(key))
# Define VAT recoverability
if invoice.getDestinationSectionValue().getDefaultAddress() is not None :
if invoice.getDestinationSectionValue().getDefaultAddress().getRegion() in ('Europe/Nord/France',None,'') :
vat_ratio = 0.196
vat_recoverable = 1
else :
vat_ratio = 0
vat_recoverable = 0
else :
vat_ratio = 0
vat_recoverable = 0
# Set start_date
invoice_start_date = self.getTargetStartDate()
invoice.edit(value_added_tax_recoverable = vat_recoverable, value_added_tax_ratio = vat_ratio, start_date = invoice_start_date)
......
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