Compare commits
No commits in common. "02a010b50d58680542d8552111f60bf2eb3daf1b" and "589b7c0bfb9478e535e053e4a997fd2589312270" have entirely different histories.
02a010b50d
...
589b7c0bfb
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-container>
|
||||
<v-form ref="form" v-model="valid">
|
||||
<v-row>
|
||||
<v-col>
|
||||
@ -82,14 +82,6 @@
|
||||
required
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
v-model="line.measuring_unit"
|
||||
label="UdM"
|
||||
persistent-placeholder="true"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
type="number"
|
||||
@ -141,7 +133,7 @@
|
||||
date: this.getCurrentDate(),
|
||||
customer: null,
|
||||
notes: '',
|
||||
saleline_set: [{product:'', unit_price: 0, quantity: 0, unit: ''}],
|
||||
saleline_set: [{product:'', unit_price: 0, quantity: 0}],
|
||||
},
|
||||
rules: {
|
||||
required: value => !!value || 'Requerido.',
|
||||
@ -204,8 +196,6 @@
|
||||
const selectedProductId = this.purchase.saleline_set[index].product;
|
||||
const selectedProduct = this.products.find(p => p.id == selectedProductId);
|
||||
this.purchase.saleline_set[index].unit_price = selectedProduct.price;
|
||||
console.log(selectedProduct.measuring_unit);
|
||||
this.purchase.saleline_set[index].measuring_unit = selectedProduct.measuring_unit;
|
||||
},
|
||||
fetchClients() {
|
||||
fetch('/don_confiao/api/customers/')
|
||||
@ -233,7 +223,7 @@
|
||||
});
|
||||
},
|
||||
addLine() {
|
||||
this.purchase.saleline_set.push({ product: '', unit_price: 0, quantity:0, measuring_unit: ''});
|
||||
this.purchase.saleline_set.push({ product: '', unit_price: 0, quantity:0 });
|
||||
},
|
||||
removeLine(index) {
|
||||
// Solo elimina si hay más de una línea
|
||||
|
Reference in New Issue
Block a user