fix: Se corrigen errores en 6.8
This commit is contained in:
@@ -43,10 +43,11 @@ class ReportCloseStatementStart(ModelView):
|
||||
@classmethod
|
||||
def default_shop(cls):
|
||||
context = Transaction().context
|
||||
shop = context['shop']
|
||||
|
||||
if shop:
|
||||
return shop
|
||||
if context:
|
||||
shop = context['shop']
|
||||
if shop:
|
||||
return shop
|
||||
return
|
||||
|
||||
|
||||
class PrintReportCloseStatement(Wizard):
|
||||
@@ -108,10 +109,10 @@ class CashRegister(Report):
|
||||
return
|
||||
journals = [j.id for j in device.journals]
|
||||
statements = Statement.search([
|
||||
('journal', 'in', journals),
|
||||
('state', 'in', ['validated', 'posted']),
|
||||
('date', '=', date)
|
||||
])
|
||||
('journal', 'in', journals),
|
||||
('state', 'in', ['validated', 'posted']),
|
||||
('date', '=', date)
|
||||
])
|
||||
return statements
|
||||
|
||||
def _get_invoices_by_subtype(date, shop):
|
||||
@@ -173,7 +174,7 @@ class CashRegister(Report):
|
||||
amount_tips.append(info_pizzas_sold['amount_tip'])
|
||||
total_amount += sale.total_amount
|
||||
|
||||
untaxed_amount_for_tax = round((tax_amount * 100)/Decimal('8.0'), 2)
|
||||
untaxed_amount_for_tax = round((tax_amount * 100) / Decimal('8.0'), 2)
|
||||
statements = cls._get_statements_by_date(data['date'])
|
||||
|
||||
if statements:
|
||||
@@ -184,7 +185,7 @@ class CashRegister(Report):
|
||||
'total_amount': sum(
|
||||
(line.amount for line in statement.lines
|
||||
if line.description), Decimal(0))
|
||||
} for statement in statements]
|
||||
} for statement in statements]
|
||||
report_context['total_statements'] = sum(
|
||||
[s['total_amount'] for s in report_context['statements']])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user