fix(Purchase): remove fixed payment Methods.
This commit is contained in:
parent
9d602c8ddc
commit
5c24266e7b
@ -151,11 +151,7 @@
|
||||
client_search: '',
|
||||
product_search: '',
|
||||
payment_cash: 0,
|
||||
payment_methods: [
|
||||
{'text': 'Efectivo', 'value': 'CASH'},
|
||||
{'text': 'Confiar', 'value': 'CONFIAR'},
|
||||
{'text': 'Bancolombia', 'value': 'BANCOLOMBIA'},
|
||||
],
|
||||
payment_methods: null,
|
||||
purchase: {
|
||||
date: this.getCurrentDate(),
|
||||
customer: null,
|
||||
@ -177,6 +173,7 @@
|
||||
created() {
|
||||
this.fetchClients();
|
||||
this.fetchProducts();
|
||||
this.fetchPaymentMethods();
|
||||
},
|
||||
watch: {
|
||||
group () {
|
||||
@ -265,13 +262,22 @@
|
||||
fetch('/don_confiao/api/products/')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
this.products = data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
fetchPaymentMethods() {
|
||||
fetch('/don_confiao/payment_methods/all/select_format')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.payment_methods = data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
addLine() {
|
||||
this.purchase.saleline_set.push({ product: '', unit_price: 0, quantity:0, measuring_unit: ''});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user