minor fix

This commit is contained in:
wilsongomez 2022-08-04 15:12:10 -05:00
parent 5041c54d66
commit 5121f7ba76

View file

@ -1548,9 +1548,8 @@ class SaleByKindReport(Report):
columns = [
invoice.shop.as_('shop_id'),
shop.name.as_('shop'),
invoice.number.as_('invoice_number')
]
group_by = (invoice.shop, shop.name, invoice.number)
group_by = (invoice.shop, shop.name)
from_item = invoice.join(
shop, condition=shop.id == invoice.shop
@ -1688,8 +1687,8 @@ class SaleByKindReport(Report):
columns = list(cursor.description)
result = cursor.fetchall()
for row in result:
# key = row[0]
key = str(row[0]) + '_' + str(row[2])
key = row[0]
# key = str(row[0]) + '_' + str(row[2])
if detailed:
key = str(row[0]) + '_' + str(row[3])
row_dict = {}
@ -1700,7 +1699,6 @@ class SaleByKindReport(Report):
except:
totals[col.name] = row[i]
row_dict[col.name] = row[i]
print(row, 'row')
try:
records[key].update(row_dict)
except: