100, 10, 'INVOICE' 10, 46, 'VAT:' 53, 46, customer['vat'] and 'X' or '' 63, 46, not customer['vat'] and 'X' or '' 10, 20, customer['name'] 100, 20, customer['tax_id'] 10, 60, items[0]['qty'] 40, 60, items[0]['description'] 150, 60, items[0]['price'] 190, 60, items[0]['qty']*items[0]['price'] 10, 65, items[1]['qty'] 40, 65, items[1]['description'] 150, 65, items[1]['price'] 190, 65, items[1]['qty']*items[1]['price'] 10, 70, items[2]['qty'] 40, 70, items[2]['description'] 150, 70, items[2]['price'] 190, 70, items[2]['qty']*items[2]['price'] 100,100, 'Total:' 120,100, sum([item['qty']*item['price'] for item in items])