close #1385 Fixed: Bill/Invoice Edit; currency problem

This commit is contained in:
Cüneyt Şentürk 2020-03-30 15:28:49 +03:00
parent 6a5c2102ec
commit 7bbc5f4190
2 changed files with 24 additions and 2 deletions

View File

@ -52,6 +52,10 @@ const app = new Vue({
discount: false,
taxes: null,
colspan: 6,
edit: {
status: false,
currency: false,
},
}
},
@ -66,6 +70,7 @@ const app = new Vue({
if (typeof bill_items !== 'undefined' && bill_items) {
let items = [];
let currency_code = this.form.currency_code;
this.edit.status = true;
bill_items.forEach(function(item) {
items.push({
@ -89,8 +94,14 @@ const app = new Vue({
}
},
methods:{
methods: {
onChangeContact(contact_id) {
if (this.edit.status && !this.edit.currency) {
this.edit.currency = true;
return;
}
axios.get(url + '/purchases/vendors/' + contact_id + '/currency')
.then(response => {
this.form.contact_name = response.data.name;

View File

@ -52,6 +52,10 @@ const app = new Vue({
discount: false,
taxes: null,
colspan: 6,
edit: {
status: false,
currency: false,
},
}
},
@ -66,6 +70,7 @@ const app = new Vue({
if (typeof invoice_items !== 'undefined' && invoice_items) {
let items = [];
let currency_code = this.form.currency_code;
this.edit.status = true;
invoice_items.forEach(function(item) {
items.push({
@ -89,8 +94,14 @@ const app = new Vue({
}
},
methods:{
methods: {
onChangeContact(contact_id) {
if (this.edit.status && !this.edit.currency) {
this.edit.currency = true;
return;
}
axios.get(url + '/sales/customers/' + contact_id + '/currency')
.then(response => {
this.form.contact_name = response.data.name;