Se Añade excepción si no se encuentran ventas
This commit is contained in:
parent
2d15aa389f
commit
0382a15ab7
@ -5,6 +5,7 @@ from trytond.wizard import Wizard, StateView, Button, StateReport
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.report import Report
|
||||
from trytond.exceptions import UserError
|
||||
from decimal import Decimal
|
||||
|
||||
from datetime import date
|
||||
@ -155,6 +156,8 @@ class CashRegister(Report):
|
||||
order=[('id', 'ASC')])
|
||||
|
||||
if not today_sales:
|
||||
raise UserError(str("No se han encontrado ventas para este día."))
|
||||
|
||||
return
|
||||
untaxed_amount = 0
|
||||
tax_amount = 0
|
||||
|
Loading…
Reference in New Issue
Block a user