Include claim purpose when exporting to Xero
This commit is contained in:
parent
787b16733d
commit
bbd775789f
@ -27,13 +27,13 @@ def write_row(writer, d):
|
||||
writer.writerow(d)
|
||||
|
||||
def write_claim(writer, claim):
|
||||
for item in claim.items:
|
||||
for i, item in enumerate(claim.items):
|
||||
write_row(writer, {
|
||||
'*ContactName': claim.payee_name,
|
||||
'*InvoiceNumber': 'RE-{}'.format(claim.id),
|
||||
'*InvoiceDate': timezone.now().strftime('%d/%m/%Y'),
|
||||
'*DueDate': timezone.now().strftime('%d/%m/%Y'),
|
||||
'Description': item['Description'],
|
||||
'Description': '{} - {}'.format(claim.purpose, item['Description']) if i == 0 else item['Description'],
|
||||
'*Quantity': str(item['Units']),
|
||||
'*UnitAmount': str(item['Unit price']),
|
||||
#'*AccountCode': '850', # Suspense
|
||||
|
Loading…
Reference in New Issue
Block a user