+
+ Productos
+
@@ -53,7 +58,7 @@
required
>
-
+n
Agregar
+
+
{
@@ -122,6 +133,16 @@
},
},
methods: {
+ fetchClients() {
+ fetch('/don_confiao/api/customers/')
+ .then(response => response.json())
+ .then(data => {
+ this.clients = data.map(client => client.name);
+ })
+ .catch(error => {
+ console.error(error);
+ });
+ },
addLine() {
this.purchase.lines.push({ product: '', price: 0, quantity:0 });
},