Commit 956907f18e79494e7f7fef52c8db654cfa804214

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

nuevas imgs botonera

See merge request !20
1 angular.module('focaCrearNotaPedido') 1 angular.module('focaCrearNotaPedido')
2 .service('crearNotaPedidoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { 2 .service('crearNotaPedidoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) {
3 var route = API_ENDPOINT.URL; 3 var route = API_ENDPOINT.URL;
4 return { 4 return {
5 crearNotaPedido: function(notaPedido) { 5 crearNotaPedido: function(notaPedido) {
6 return $http.post(route + '/nota-pedido', {notaPedido: notaPedido}); 6 return $http.post(route + '/nota-pedido', {notaPedido: notaPedido});
7 }, 7 },
8 obtenerNotaPedido: function() { 8 obtenerNotaPedido: function() {
9 return $http.get(route +'/nota-pedido'); 9 return $http.get(route +'/nota-pedido');
10 }, 10 },
11 setNotaPedido: function(notaPedido) { 11 setNotaPedido: function(notaPedido) {
12 this.notaPedido = notaPedido; 12 this.notaPedido = notaPedido;
13 }, 13 },
14 clearNotaPedido: function() { 14 clearNotaPedido: function() {
15 this.notaPedido = undefined; 15 this.notaPedido = undefined;
16 }, 16 },
17 getNotaPedido: function() { 17 getNotaPedido: function() {
18 return this.notaPedido; 18 return this.notaPedido;
19 }, 19 },
20 getArticulosByIdNotaPedido: function(id) { 20 getArticulosByIdNotaPedido: function(id) {
21 return $http.get(route+'/articulos/nota-pedido/'+id); 21 return $http.get(route+'/articulos/nota-pedido/'+id);
22 }, 22 },
23 crearArticulosParaNotaPedido: function(articuloNotaPedido) { 23 crearArticulosParaNotaPedido: function(articuloNotaPedido) {
24 return $http.post(route + '/articulos/nota-pedido', 24 return $http.post(route + '/articulos/nota-pedido',
25 {articuloNotaPedido: articuloNotaPedido}); 25 {articuloNotaPedido: articuloNotaPedido});
26 }, 26 },
27 getDomiciliosByIdNotaPedido: function(id) { 27 getDomiciliosByIdNotaPedido: function(id) {
28 return $http.get(route +'/nota-pedido/'+id+'/domicilios'); 28 return $http.get(route +'/nota-pedido/'+id+'/domicilios');
29 }, 29 },
30 getDomiciliosByIdCliente: function(id) { 30 getDomiciliosByIdCliente: function(id) {
31 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) 31 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega)
32 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); 32 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id );
33 }, 33 },
34 getPrecioCondicion: function() { 34 getPrecioCondicion: function() {
35 return $http.get(route + '/precio-condicion'); 35 return $http.get(route + '/precio-condicion');
36 }, 36 },
37 getPrecioCondicionById: function(id) { 37 getPrecioCondicionById: function(id) {
38 return $http.get(route + '/precio-condicion/' + id); 38 return $http.get(route + '/precio-condicion/' + id);
39 }, 39 },
40 getPlazoPagoByPrecioCondicion: function(id) { 40 getPlazoPagoByPrecioCondicion: function(id) {
41 return $http.get(route + '/plazo-pago/precio-condicion/'+ id); 41 return $http.get(route + '/plazo-pago/precio-condicion/'+ id);
42 }, 42 },
43 crearFlete: function(flete) { 43 crearFlete: function(flete) {
44 return $http.post(route + '/flete', {flete : flete}); 44 return $http.post(route + '/flete', {flete : flete});
45 }, 45 },
46 crearPlazosParaNotaPedido: function(plazos) { 46 crearPlazosParaNotaPedido: function(plazos) {
47 return $http.post(route + '/plazo-pago/nota-pedido', {plazos: plazos}); 47 return $http.post(route + '/plazo-pago/nota-pedido', {plazos: plazos});
48 }, 48 },
49 getCotizacionByIdMoneda: function(id) { 49 getCotizacionByIdMoneda: function(id) {
50 return $http.get(route + '/moneda/' + id); 50 return $http.get(route + '/moneda/' + id);
51 }, 51 },
52 crearEstadoParaNotaPedido: function(estado) { 52 crearEstadoParaNotaPedido: function(estado) {
53 return $http.post(route + '/estado', {estado: estado}); 53 return $http.post(route + '/estado', {estado: estado});
54 }, 54 },
55 getNumeroNotaPedido: function() { 55 getNumeroNotaPedido: function() {
56 return $http.get(route + '/nota-pedido/numero-siguiente'); 56 return $http.get(route + '/nota-pedido/numero-siguiente');
57 }, 57 },
58 getBotonera: function() { 58 getBotonera: function() {
59 return [ 59 return [
60 { 60 {
61 label: 'Vendedor', 61 label: 'Vendedor',
62 image: 'vendedor.png' 62 image: 'vendedor.png'
63 }, 63 },
64 { 64 {
65 label: 'Cliente', 65 label: 'Cliente',
66 image: 'cliente.png' 66 image: 'cliente.png'
67 }, 67 },
68 { 68 {
69 label: 'Proveedor', 69 label: 'Proveedor',
70 image: 'proveedor.png' 70 image: 'proveedor.png'
71 }, 71 },
72 { 72 {
73 label: 'Moneda', 73 label: 'Moneda',
74 image: 'moneda.png' 74 image: 'moneda.png'
75 }, 75 },
76 { 76 {
77 label: 'Precios y condiciones', 77 label: 'Precios y condiciones',
78 image: 'precios-condiciones.png' 78 image: 'precios-condiciones.png'
79 }, 79 },
80 { 80 {
81 label: 'Flete', 81 label: 'Flete',
82 image: 'flete.png' 82 image: 'flete.png'
83 }, 83 },
84 { 84 {
85 label: 'Productos', 85 label: 'Productos',
86 image: 'productos.png' 86 image: 'productos.png'
87 }, 87 },
88 { 88 {
89 label: 'Puntos de descarga', 89 label: 'Puntos de descarga',
90 image: 'seguimientoCobranza.png' 90 image: 'puntosDeDescarga.png'
91 } 91 }
92 ]; 92 ];
93 }, 93 },
94 crearPuntosDescarga: function(puntosDescarga) { 94 crearPuntosDescarga: function(puntosDescarga) {
95 return $http.post(route + '/puntos-descarga/nota-pedido', 95 return $http.post(route + '/puntos-descarga/nota-pedido',
96 {puntosDescarga: puntosDescarga}); 96 {puntosDescarga: puntosDescarga});
97 } 97 }
98 }; 98 };
99 }]); 99 }]);
100 100