Commit 30db065229f52f60a6286b8f63b5a57fd42a482e
Exists in
ultimos_despachos
and in
1 other branch
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !38
Showing
1 changed file
 
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 | getUltimosDespachos: function (numeroPlanilla) { | 18 | getUltimosDespachos: function (numeroPlanilla) { | 
| 19 | return $http.get('http://10.231.45.194:9900' + '/turnos/productos/' + numeroPlanilla + '/true'); | 19 | return $http.get(route + '/turnos/productos/' + numeroPlanilla + '/true'); | 
| 20 | }, | 20 | }, | 
| 21 | setearDespachoOcupado: function (parametros) { | 21 | setearDespachoOcupado: function (parametros) { | 
| 22 | return $http.post(route + '/turnos/despacho-en-uso', parametros); | 22 | return $http.post(route + '/turnos/despacho-en-uso', parametros); | 
| 23 | }, | 23 | }, | 
| 24 | setearDespachoDesocupado: function (parametros) { | 24 | setearDespachoDesocupado: function (parametros) { | 
| 25 | return $http.post(route + '/turnos/depacho-sin-uso', parametros); | 25 | return $http.post(route + '/turnos/depacho-sin-uso', parametros); | 
| 26 | }, | 26 | }, | 
| 27 | getResumenCuenta: function (idCliente) { | 27 | getResumenCuenta: function (idCliente) { | 
| 28 | return $http.get(route + '/cliente/resumen-cuenta/' + idCliente); | 28 | return $http.get(route + '/cliente/resumen-cuenta/' + idCliente); | 
| 29 | }, | 29 | }, | 
| 30 | getVendedorPlayaById: function (id) { | 30 | getVendedorPlayaById: function (id) { | 
| 31 | return $http.get(route + '/vendedor-playa/' + id); | 31 | return $http.get(route + '/vendedor-playa/' + id); | 
| 32 | }, | 32 | }, | 
| 33 | getBotonera: function () { | 33 | getBotonera: function () { | 
| 34 | var vendedor = { | 34 | var vendedor = { | 
| 35 | label: 'Vendedor', | 35 | label: 'Vendedor', | 
| 36 | image: 'vendedor.png' | 36 | image: 'vendedor.png' | 
| 37 | }; | 37 | }; | 
| 38 | // $scope.botoneraProductos.push({ | 38 | // $scope.botoneraProductos.push({ | 
| 39 | // label: 'Busqueda Productos', | 39 | // label: 'Busqueda Productos', | 
| 40 | // image: 'buscarProductos.png', | 40 | // image: 'buscarProductos.png', | 
| 41 | // imageDefault: 'productoDefault.png' | 41 | // imageDefault: 'productoDefault.png' | 
| 42 | // }); | 42 | // }); | 
| 43 | var botones = [ | 43 | var botones = [ | 
| 44 | { | 44 | { | 
| 45 | label: 'Cliente', | 45 | label: 'Cliente', | 
| 46 | image: 'cliente.png' | 46 | image: 'cliente.png' | 
| 47 | }, | 47 | }, | 
| 48 | { | 48 | { | 
| 49 | label: 'Busqueda Productos', | 49 | label: 'Busqueda Productos', | 
| 50 | image: 'productos.png' | 50 | image: 'productos.png' | 
| 51 | } | 51 | } | 
| 52 | // { | 52 | // { | 
| 53 | // label: 'Moneda', | 53 | // label: 'Moneda', | 
| 54 | // image: 'moneda.png' | 54 | // image: 'moneda.png' | 
| 55 | // }, | 55 | // }, | 
| 56 | // { | 56 | // { | 
| 57 | // label: 'Observaciones', | 57 | // label: 'Observaciones', | 
| 58 | // image: 'botonObservaciones.png' | 58 | // image: 'botonObservaciones.png' | 
| 59 | // } | 59 | // } | 
| 60 | ]; | 60 | ]; | 
| 61 | 61 | ||
| 62 | if (APP !== 'facturador') { | 62 | if (APP !== 'facturador') { | 
| 63 | botones.unshift(vendedor); | 63 | botones.unshift(vendedor); | 
| 64 | } | 64 | } | 
| 65 | 65 | ||
| 66 | return botones; | 66 | return botones; | 
| 67 | } | 67 | } | 
| 68 | }; | 68 | }; | 
| 69 | } | 69 | } | 
| 70 | ]); | 70 | ]); | 
| 71 | 71 |