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
4b73a08488
commit
db8a6cc47b
4
sale.py
4
sale.py
|
@ -1382,7 +1382,7 @@ class SaleIncomeDailyReport(Report):
|
|||
('company', '=', data['company']),
|
||||
('invoice_date', '=', data['date']),
|
||||
('number', '!=', None),
|
||||
('state', 'in', ['posted', 'paid', 'canceled', 'validated']),
|
||||
# ('state', 'in', ['posted', 'paid', 'canceled', 'validated']),
|
||||
('type', '=', 'out'),
|
||||
]
|
||||
shop_names = ''
|
||||
|
@ -1410,6 +1410,8 @@ class SaleIncomeDailyReport(Report):
|
|||
electronic = 0
|
||||
credit = 0
|
||||
total_invoices_amount.append(invoice.total_amount)
|
||||
if not invoice.sales:
|
||||
continue
|
||||
sale = invoice.sales[0]
|
||||
device_id = sale.sale_device.id
|
||||
if not sale.payments:
|
||||
|
|
5
shop.py
5
shop.py
|
@ -251,7 +251,10 @@ class ShopDailySummaryReport(Report):
|
|||
else:
|
||||
categories[category_id]['base'].append(line.amount)
|
||||
if line.discount:
|
||||
disc = line.amount / (1 - line.discount)
|
||||
try:
|
||||
disc = line.amount / (1 - line.discount)
|
||||
except:
|
||||
disc = line.product.price_list * Decimal(line.quantity)
|
||||
if category_id not in discounts.keys():
|
||||
discounts[category_id] = {
|
||||
'name': category.name,
|
||||
|
|
Loading…
Reference in a new issue