2815 - Fix ticket without state #598

Merged
carlosjr merged 2 commits from 2815-ticket_without_state into dev 2021-04-08 11:56:02 +00:00
1 changed files with 5 additions and 2 deletions

View File

@ -27,9 +27,12 @@ class Controller extends Section {
} }
get ticketState() { get ticketState() {
if (!this.ticket) return null; const ticket = this.ticket;
if (!ticket) return null;
return this.ticket.ticketState.state.code; const ticketState = ticket.ticketState;
return ticketState && ticketState.state.code;
} }
getSaleTotal(sale) { getSaleTotal(sale) {