diff --git a/brewman/views/reports/closing_stock.py b/brewman/views/reports/closing_stock.py index be847690..f36c298e 100644 --- a/brewman/views/reports/closing_stock.py +++ b/brewman/views/reports/closing_stock.py @@ -33,7 +33,7 @@ def report_data(request): def build_report(date): date = datetime.datetime.strptime(date, '%d-%b-%Y') - amount_sum = func.sum(Journal.debit * Inventory.quantity * Inventory.rate * (1 + Inventory.tax)).label('Amount') + amount_sum = func.sum(Journal.debit * Inventory.quantity * Inventory.rate * (1 + Inventory.tax)).label('amount') quantity_sum = func.sum(Journal.debit * Inventory.quantity).label('Quantity') query = DBSession.query(Product, quantity_sum, amount_sum) \ .join(Product.inventories).join(Inventory.voucher).join(Voucher.journals) \