Skip to content
Snippets Groups Projects
Commit 8ffe9325 authored by Jordi Isidro Llobet's avatar Jordi Isidro Llobet
Browse files

afegir billing_run a factura

parent 4b9e59ee
No related branches found
No related tags found
No related merge requests found
...@@ -92,6 +92,7 @@ def get_invoice_oc(con, id_billing_run): ...@@ -92,6 +92,7 @@ def get_invoice_oc(con, id_billing_run):
"groupCode": x[0], "groupCode": x[0],
"invoiceDate": int(time.mktime(d.timetuple())), "invoiceDate": int(time.mktime(d.timetuple())),
"invoiceLines": [], "invoiceLines": [],
"id_billing_run": id_billing_run
} }
df2 = df.loc[df['group_code'] == x[0]] df2 = df.loc[df['group_code'] == x[0]]
for index, row in df2.iterrows(): for index, row in df2.iterrows():
...@@ -102,7 +103,7 @@ def get_invoice_oc(con, id_billing_run): ...@@ -102,7 +103,7 @@ def get_invoice_oc(con, id_billing_run):
"amountWithTax": float(round(row['amount_with_tax'],2)), "amountWithTax": float(round(row['amount_with_tax'],2)),
"amountTax": float(round(row['amount_tax'],2)), "amountTax": float(round(row['amount_tax'],2)),
"taxCode": row['tax_code'], "taxCode": row['tax_code'],
"productCode": row['code'], "productCode": row['code']
} }
data["invoiceLines"].append(invoiceline) data["invoiceLines"].append(invoiceline)
print(data) print(data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment