Added invoice amount to /invoices endpoint
This commit is contained in:
parent
9fb76e7277
commit
fa7791e203
@ -186,8 +186,13 @@ WHERE LOWER(line_item_product_code) = LOWER('%productCode%')
|
|||||||
|
|
||||||
export const invoices = `select DISTINCT
|
export const invoices = `select DISTINCT
|
||||||
bill_invoice_id as invoiceId,
|
bill_invoice_id as invoiceId,
|
||||||
year, month
|
year, month,
|
||||||
FROM ${process.env.ATHENA_CU_TABLE}`;
|
SUM(line_item_unblended_cost) AS totalUnblendedCost,
|
||||||
|
SUM(line_item_blended_cost) AS totalBlendedCost
|
||||||
|
FROM ${process.env.ATHENA_CU_TABLE}
|
||||||
|
WHERE bill_invoice_id IS NOT NULL
|
||||||
|
GROUP BY bill_invoice_id, year, month
|
||||||
|
ORDER BY year DESC, month DESC;`
|
||||||
|
|
||||||
export const invoiceById = `select DISTINCT
|
export const invoiceById = `select DISTINCT
|
||||||
bill_invoice_id as invoiceId,
|
bill_invoice_id as invoiceId,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user