Commit 148e94b29dec9007086057ddd5c891193a9f62a4

Authored by Luigi
1 parent 84f8e24537
Exists in master

Cambio de " Transportista " a " Proveedor "

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
1 angular.module('focaCrearRemito') 1 angular.module('focaCrearRemito')
2 .service('crearRemitoService', ['$http', 'API_ENDPOINT', 2 .service('crearRemitoService', ['$http', 'API_ENDPOINT',
3 function($http, API_ENDPOINT) { 3 function($http, API_ENDPOINT) {
4 var route = API_ENDPOINT.URL; 4 var route = API_ENDPOINT.URL;
5 return { 5 return {
6 crearRemito: function(remito) { 6 crearRemito: function(remito) {
7 // TODO: Cambiar para usar el servicio /remito 7 // TODO: Cambiar para usar el servicio /remito
8 return $http.post(route + '/remito', remito); 8 return $http.post(route + '/remito', remito);
9 }, 9 },
10 getRemitoById: function(id) { 10 getRemitoById: function(id) {
11 return $http.get(route + '/remito/obtener/' + id); 11 return $http.get(route + '/remito/obtener/' + id);
12 }, 12 },
13 obtenerRemito: function() { 13 obtenerRemito: function() {
14 return $http.get(route +'/nota-pedido'); 14 return $http.get(route +'/nota-pedido');
15 }, 15 },
16 setRemito: function(remito) { 16 setRemito: function(remito) {
17 this.remito = remito; 17 this.remito = remito;
18 }, 18 },
19 clearRemito: function() { 19 clearRemito: function() {
20 this.remito = undefined; 20 this.remito = undefined;
21 }, 21 },
22 getRemito: function() { 22 getRemito: function() {
23 return this.remito; 23 return this.remito;
24 }, 24 },
25 getArticulosByIdRemito: function(id) { 25 getArticulosByIdRemito: function(id) {
26 return $http.get(route+'/articulos/nota-pedido/'+id); 26 return $http.get(route+'/articulos/nota-pedido/'+id);
27 }, 27 },
28 crearArticulosParaRemito: function(articuloRemito) { 28 crearArticulosParaRemito: function(articuloRemito) {
29 return $http.post(route + '/articulos/remito', 29 return $http.post(route + '/articulos/remito',
30 {articuloRemito: articuloRemito}); 30 {articuloRemito: articuloRemito});
31 }, 31 },
32 getDomiciliosByIdRemito: function(id) { 32 getDomiciliosByIdRemito: function(id) {
33 return $http.get(route +'/nota-pedido/'+id+'/domicilios'); 33 return $http.get(route +'/nota-pedido/'+id+'/domicilios');
34 }, 34 },
35 getDomiciliosByIdCliente: function(id) { 35 getDomiciliosByIdCliente: function(id) {
36 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) 36 var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega)
37 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); 37 return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id );
38 }, 38 },
39 getPrecioCondicion: function() { 39 getPrecioCondicion: function() {
40 return $http.get(route + '/precio-condicion'); 40 return $http.get(route + '/precio-condicion');
41 }, 41 },
42 getPrecioCondicionById: function(id) { 42 getPrecioCondicionById: function(id) {
43 return $http.get(route + '/precio-condicion/' + id); 43 return $http.get(route + '/precio-condicion/' + id);
44 }, 44 },
45 getPlazoPagoByPrecioCondicion: function(id) { 45 getPlazoPagoByPrecioCondicion: function(id) {
46 return $http.get(route + '/plazo-pago/precio-condicion/'+ id); 46 return $http.get(route + '/plazo-pago/precio-condicion/'+ id);
47 }, 47 },
48 crearFlete: function(flete) { 48 crearFlete: function(flete) {
49 return $http.post(route + '/flete', {flete : flete}); 49 return $http.post(route + '/flete', {flete : flete});
50 }, 50 },
51 crearPlazosParaRemito: function(plazos) { 51 crearPlazosParaRemito: function(plazos) {
52 return $http.post(route + '/plazo-pago/remito', plazos); 52 return $http.post(route + '/plazo-pago/remito', plazos);
53 }, 53 },
54 getCotizacionByIdMoneda: function(id) { 54 getCotizacionByIdMoneda: function(id) {
55 return $http.get(route + '/moneda/' + id); 55 return $http.get(route + '/moneda/' + id);
56 }, 56 },
57 crearEstadoParaRemito: function(estado) { 57 crearEstadoParaRemito: function(estado) {
58 return $http.post(route + '/estado', {estado: estado}); 58 return $http.post(route + '/estado', {estado: estado});
59 }, 59 },
60 getNumeroRemito: function() { 60 getNumeroRemito: function() {
61 return $http.get(route + '/remito/numero-siguiente'); 61 return $http.get(route + '/remito/numero-siguiente');
62 }, 62 },
63 imprimirRemitoByIdRemito: function(idRemito) { 63 imprimirRemitoByIdRemito: function(idRemito) {
64 return $http.get(route + '/remito/comprobante/' + idRemito , { 64 return $http.get(route + '/remito/comprobante/' + idRemito , {
65 responseType: 'arraybuffer' 65 responseType: 'arraybuffer'
66 }); 66 });
67 }, 67 },
68 getPuntosDescargaByClienDom: function(idDomicilio, idCliente) { 68 getPuntosDescargaByClienDom: function(idDomicilio, idCliente) {
69 return $http.get(API_ENDPOINT.URL + '/punto-descarga/' + 69 return $http.get(API_ENDPOINT.URL + '/punto-descarga/' +
70 idDomicilio + '/' + idCliente); 70 idDomicilio + '/' + idCliente);
71 }, 71 },
72 enviarCorreo: function(options) { 72 enviarCorreo: function(options) {
73 return $http.post(API_ENDPOINT.URL + '/remito/mail', options); 73 return $http.post(API_ENDPOINT.URL + '/remito/mail', options);
74 }, 74 },
75 getBotonera: function() { 75 getBotonera: function() {
76 return [ 76 return [
77 { 77 {
78 label: 'Nota pedido', 78 label: 'Nota pedido',
79 image: 'notaDePedido.png' 79 image: 'notaDePedido.png'
80 }, 80 },
81 { 81 {
82 label: 'Cliente', 82 label: 'Cliente',
83 image: 'cliente.png' 83 image: 'cliente.png'
84 }, 84 },
85 { 85 {
86 label: 'Transportista', 86 label: 'Proveedor',
87 image: 'proveedor.png' 87 image: 'proveedor.png'
88 }, 88 },
89 { 89 {
90 label: 'Moneda', 90 label: 'Moneda',
91 image: 'moneda.png' 91 image: 'moneda.png'
92 }, 92 },
93 { 93 {
94 label: 'Precios y condiciones', 94 label: 'Precios y condiciones',
95 image: 'precios-condiciones.png' 95 image: 'precios-condiciones.png'
96 }, 96 },
97 { 97 {
98 label: 'Productos', 98 label: 'Productos',
99 image: 'productos.png' 99 image: 'productos.png'
100 }, 100 },
101 { 101 {
102 label: 'Observaciones', 102 label: 'Observaciones',
103 image: 'botonObservaciones.png', 103 image: 'botonObservaciones.png',
104 disable: true 104 disable: true
105 } 105 }
106 ]; 106 ];
107 } 107 }
108 }; 108 };
109 }]); 109 }]);
110 110