service.js
1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
angular.module('focaCrearCobranza')
.service('focaCrearCobranzaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) {
return {
getNumeroRecibo: function() {
return $http.get(API_ENDPOINT.URL + '/recibo/numero-siguiente');
},
getCotizacionByIdMoneda: function(id) {
return $http.get(API_ENDPOINT.URL + '/moneda/' + id);
},
getUsuario: function(idUsuario) {
return $http.get(API_ENDPOINT.URL + '/vendedores/obtener/' + idUsuario);
},
guardarCobranza: function(cobranza) {
return $http.post(API_ENDPOINT.URL + '/recibo/guardar', cobranza);
},
getBotonera: function() {
return [
{
label: 'Cliente',
image: 'cliente.png'
},
{
label: 'Cobrador',
image: 'vendedor.png'
},
{
label: 'Comprobantes',
image: 'precios-condiciones.png'
},
{
label: 'Cobros',
image: 'precios-condiciones.png'
},
{
label: 'Moneda',
image: 'moneda.png'
}
];
}
};
}]);