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() {
|
getVAT() {
|
||||||
this.$http.get(`/ticket/api/Tickets/${this.ticket.id}/getVAT`).then(res => {
|
if (this.ticket || this.ticket.id) {
|
||||||
this.VAT = res.data || 0;
|
this.$http.get(`/ticket/api/Tickets/${this.ticket.id}/getVAT`).then(res => {
|
||||||
this.total = this.subTotal + this.VAT;
|
this.VAT = res.data || 0;
|
||||||
});
|
this.total = this.subTotal + this.VAT;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get isEditable() {
|
get isEditable() {
|
||||||
|
|
Loading…
Reference in New Issue