Fix: in the current sqlalchemy non-lowercased labels are not being quoted causing an error.
This commit is contained in:
parent
17750f7721
commit
eb63166f39
@ -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) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user