Commit 7f6fe7142f523e4786e0bc48b5dcbf529849ed67
1 parent
651c7014b8
Exists in
master
saco moneda y observaciones momentáneamente
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
src/js/service.js
| 1 | angular.module('focaCrearFactura') | 1 | angular.module('focaCrearFactura') |
| 2 | .service('crearFacturaService', ['$http', 'API_ENDPOINT', 'APP', | 2 | .service('crearFacturaService', ['$http', 'API_ENDPOINT', 'APP', |
| 3 | function ($http, API_ENDPOINT, APP) { | 3 | function ($http, API_ENDPOINT, APP) { |
| 4 | var route = API_ENDPOINT.URL; | 4 | var route = API_ENDPOINT.URL; |
| 5 | return { | 5 | return { |
| 6 | guardarFactura: function (factura) { | 6 | guardarFactura: function (factura) { |
| 7 | return $http.post(route + '/factura/guardar', factura); | 7 | return $http.post(route + '/factura/guardar', factura); |
| 8 | }, | 8 | }, |
| 9 | getParametros: function () { | 9 | getParametros: function () { |
| 10 | return $http.get(API_ENDPOINT.URL + '/parametros/factura'); | 10 | return $http.get(API_ENDPOINT.URL + '/parametros/factura'); |
| 11 | }, | 11 | }, |
| 12 | validarPlanillaVendedor: function (idVendedor) { | 12 | validarPlanillaVendedor: function (idVendedor) { |
| 13 | return $http.get(route + '/turnos/validar-planilla/' + idVendedor); | 13 | return $http.get(route + '/turnos/validar-planilla/' + idVendedor); |
| 14 | }, | 14 | }, |
| 15 | getProductosByPlanilla: function (numeroPlanilla) { | 15 | getProductosByPlanilla: function (numeroPlanilla) { |
| 16 | return $http.get(route + '/turnos/productos/' + numeroPlanilla); | 16 | return $http.get(route + '/turnos/productos/' + numeroPlanilla); |
| 17 | }, | 17 | }, |
| 18 | setearDespachoOcupado: function (parametros) { | 18 | setearDespachoOcupado: function (parametros) { |
| 19 | return $http.post(route + '/turnos/despacho-en-uso', parametros); | 19 | return $http.post(route + '/turnos/despacho-en-uso', parametros); |
| 20 | }, | 20 | }, |
| 21 | setearDespachoDesocupado: function (parametros) { | 21 | setearDespachoDesocupado: function (parametros) { |
| 22 | return $http.post(route + '/turnos/depacho-sin-uso', parametros); | 22 | return $http.post(route + '/turnos/depacho-sin-uso', parametros); |
| 23 | }, | 23 | }, |
| 24 | getResumenCuenta: function (idCliente) { | 24 | getResumenCuenta: function (idCliente) { |
| 25 | return $http.get(route + '/cliente/resumen-cuenta/' + idCliente); | 25 | return $http.get(route + '/cliente/resumen-cuenta/' + idCliente); |
| 26 | }, | 26 | }, |
| 27 | getVendedorPlayaById: function (id) { | 27 | getVendedorPlayaById: function (id) { |
| 28 | return $http.get(route + '/vendedor-playa/' + id); | 28 | return $http.get(route + '/vendedor-playa/' + id); |
| 29 | }, | 29 | }, |
| 30 | getBotonera: function () { | 30 | getBotonera: function () { |
| 31 | var vendedor = { | 31 | var vendedor = { |
| 32 | label: 'Vendedor', | 32 | label: 'Vendedor', |
| 33 | image: 'vendedor.png' | 33 | image: 'vendedor.png' |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | var botones = [ | 36 | var botones = [ |
| 37 | { | 37 | { |
| 38 | label: 'Cliente', | 38 | label: 'Cliente', |
| 39 | image: 'cliente.png' | 39 | image: 'cliente.png' |
| 40 | }, | 40 | }, |
| 41 | { | 41 | // { |
| 42 | label: 'Moneda', | 42 | // label: 'Moneda', |
| 43 | image: 'moneda.png' | 43 | // image: 'moneda.png' |
| 44 | }, | 44 | // }, |
| 45 | { | 45 | // { |
| 46 | label: 'Observaciones', | 46 | // label: 'Observaciones', |
| 47 | image: 'botonObservaciones.png' | 47 | // image: 'botonObservaciones.png' |
| 48 | } | 48 | // } |
| 49 | ]; | 49 | ]; |
| 50 | 50 | ||
| 51 | if (APP != 'facturador') { | 51 | if (APP != 'facturador') { |
| 52 | botones.unshift(vendedor); | 52 | botones.unshift(vendedor); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | return botones; | 55 | return botones; |
| 56 | } | 56 | } |
| 57 | }; | 57 | }; |
| 58 | } | 58 | } |
| 59 | ]); | 59 | ]); |
| 60 | 60 |