mirror of
https://bitbucket.org/presik/trytonpsk-sale_pos.git
synced 2023-12-14 07:13:02 +01:00
minor fix
This commit is contained in:
parent
5041c54d66
commit
5121f7ba76
1 changed files with 3 additions and 5 deletions
8
sale.py
8
sale.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue