Invoice and Bill get item dropdown style fixes..

This commit is contained in:
Cüneyt Şentürk 2019-11-22 17:34:38 +03:00
parent dc7c1d3887
commit a4135ec902
2 changed files with 6 additions and 4 deletions

View File

@ -53,11 +53,11 @@ const app = new Vue({
this.onAddItem(); this.onAddItem();
} }
if (typeof invoice_items !== 'undefined') { 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;
invoice_items.forEach(function(item) { bill_items.forEach(function(item) {
items.push({ items.push({
show: false, show: false,
currency: currency_code, currency: currency_code,
@ -148,11 +148,12 @@ const app = new Vue({
onGetItem(event, index) { onGetItem(event, index) {
let name = event.target.value; let name = event.target.value;
this.form.items[index].show = false;
axios.get(url + '/common/items/autocomplete', { axios.get(url + '/common/items/autocomplete', {
params: { params: {
query: name, query: name,
type: 'invoice', type: 'bill',
currency_code: this.form.currency_code currency_code: this.form.currency_code
} }
}) })

View File

@ -53,7 +53,7 @@ const app = new Vue({
this.onAddItem(); this.onAddItem();
} }
if (typeof invoice_items !== 'undefined') { 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;
@ -148,6 +148,7 @@ const app = new Vue({
onGetItem(event, index) { onGetItem(event, index) {
let name = event.target.value; let name = event.target.value;
this.form.items[index].show = false;
axios.get(url + '/common/items/autocomplete', { axios.get(url + '/common/items/autocomplete', {
params: { params: {