close #1385 Fixed: Bill/Invoice Edit; currency problem
This commit is contained in:
parent
6a5c2102ec
commit
7bbc5f4190
13
resources/assets/js/views/purchases/bills.js
vendored
13
resources/assets/js/views/purchases/bills.js
vendored
@ -52,6 +52,10 @@ const app = new Vue({
|
|||||||
discount: false,
|
discount: false,
|
||||||
taxes: null,
|
taxes: null,
|
||||||
colspan: 6,
|
colspan: 6,
|
||||||
|
edit: {
|
||||||
|
status: false,
|
||||||
|
currency: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -66,6 +70,7 @@ const app = new Vue({
|
|||||||
if (typeof bill_items !== 'undefined' && bill_items) {
|
if (typeof bill_items !== 'undefined' && bill_items) {
|
||||||
let items = [];
|
let items = [];
|
||||||
let currency_code = this.form.currency_code;
|
let currency_code = this.form.currency_code;
|
||||||
|
this.edit.status = true;
|
||||||
|
|
||||||
bill_items.forEach(function(item) {
|
bill_items.forEach(function(item) {
|
||||||
items.push({
|
items.push({
|
||||||
@ -89,8 +94,14 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods: {
|
||||||
onChangeContact(contact_id) {
|
onChangeContact(contact_id) {
|
||||||
|
if (this.edit.status && !this.edit.currency) {
|
||||||
|
this.edit.currency = true;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
axios.get(url + '/purchases/vendors/' + contact_id + '/currency')
|
axios.get(url + '/purchases/vendors/' + contact_id + '/currency')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.form.contact_name = response.data.name;
|
this.form.contact_name = response.data.name;
|
||||||
|
13
resources/assets/js/views/sales/invoices.js
vendored
13
resources/assets/js/views/sales/invoices.js
vendored
@ -52,6 +52,10 @@ const app = new Vue({
|
|||||||
discount: false,
|
discount: false,
|
||||||
taxes: null,
|
taxes: null,
|
||||||
colspan: 6,
|
colspan: 6,
|
||||||
|
edit: {
|
||||||
|
status: false,
|
||||||
|
currency: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -66,6 +70,7 @@ const app = new Vue({
|
|||||||
if (typeof invoice_items !== 'undefined' && invoice_items) {
|
if (typeof invoice_items !== 'undefined' && invoice_items) {
|
||||||
let items = [];
|
let items = [];
|
||||||
let currency_code = this.form.currency_code;
|
let currency_code = this.form.currency_code;
|
||||||
|
this.edit.status = true;
|
||||||
|
|
||||||
invoice_items.forEach(function(item) {
|
invoice_items.forEach(function(item) {
|
||||||
items.push({
|
items.push({
|
||||||
@ -89,8 +94,14 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods: {
|
||||||
onChangeContact(contact_id) {
|
onChangeContact(contact_id) {
|
||||||
|
if (this.edit.status && !this.edit.currency) {
|
||||||
|
this.edit.currency = true;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
axios.get(url + '/sales/customers/' + contact_id + '/currency')
|
axios.get(url + '/sales/customers/' + contact_id + '/currency')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.form.contact_name = response.data.name;
|
this.form.contact_name = response.data.name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user