Use identifier code for getting vat code
This commit is contained in:
parent
405a42793e
commit
898a7a3c24
|
@ -37,7 +37,7 @@ class BaseTrytonInvoiceMapper(Model):
|
||||||
def counterpart_nif(self, invoice):
|
def counterpart_nif(self, invoice):
|
||||||
nif = ''
|
nif = ''
|
||||||
if invoice.party.tax_identifier:
|
if invoice.party.tax_identifier:
|
||||||
nif = invoice.party.tax_identifier
|
nif = invoice.party.tax_identifier.code
|
||||||
elif invoice.party.identifiers:
|
elif invoice.party.identifiers:
|
||||||
nif = invoice.party.identifiers[0].code
|
nif = invoice.party.identifiers[0].code
|
||||||
if nif.startswith('ES'):
|
if nif.startswith('ES'):
|
||||||
|
|
Loading…
Reference in New Issue