diff --git a/src/components/ExportPurchasesForTryton.vue b/src/components/ExportPurchasesForTryton.vue new file mode 100644 index 0000000..09aa2c5 --- /dev/null +++ b/src/components/ExportPurchasesForTryton.vue @@ -0,0 +1,39 @@ + + diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 66c44c1..f8a791b 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -31,6 +31,7 @@ { title: 'Comprar', route:'/comprar'}, { title: 'Cuadrar tarro', route: '/cuadrar_tarro'}, { title: 'Cuadres de tarro', route: '/cuadres_de_tarro'}, + { title: 'CSV Tryton', route: '/ventas_para_tryton'}, ], }), watch: { diff --git a/src/pages/ventas_para_tryton.vue b/src/pages/ventas_para_tryton.vue new file mode 100644 index 0000000..304c7d2 --- /dev/null +++ b/src/pages/ventas_para_tryton.vue @@ -0,0 +1,19 @@ + + diff --git a/src/services/api.js b/src/services/api.js index 2e6ef11..f100ab3 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -46,6 +46,10 @@ class Api { createCustomer(customer) { return this.apiImplementation.createCustomer(customer); } + + getCSVForTryton() { + return this.apiImplementation.getCSVForTryton(); + } } export default Api; diff --git a/src/services/django-api.js b/src/services/django-api.js index 389aa0e..b760b75 100644 --- a/src/services/django-api.js +++ b/src/services/django-api.js @@ -58,6 +58,11 @@ class DjangoApi { return this.postRequest(url, customer); } + getCSVForTryton() { + const url = this.base + '/don_confiao/api/sales/for_tryton'; + return this.getRequest(url); + } + getRequest(url) { return new Promise ((resolve, reject) => { fetch(url)