getVAT now doesn't make a call when it can't
This commit is contained in:
parent
19e72c86cf
commit
2fa91ef59d
|
@ -64,10 +64,12 @@ class Controller {
|
|||
}
|
||||
|
||||
getVAT() {
|
||||
this.$http.get(`/ticket/api/Tickets/${this.ticket.id}/getVAT`).then(res => {
|
||||
this.VAT = res.data || 0;
|
||||
this.total = this.subTotal + this.VAT;
|
||||
});
|
||||
if (this.ticket || this.ticket.id) {
|
||||
this.$http.get(`/ticket/api/Tickets/${this.ticket.id}/getVAT`).then(res => {
|
||||
this.VAT = res.data || 0;
|
||||
this.total = this.subTotal + this.VAT;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
get isEditable() {
|
||||
|
|
Loading…
Reference in New Issue