service.js
1.4 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
angular.module('focaCrearFactura')
.service('crearFacturaService', ['$http', 'API_ENDPOINT',
function($http, API_ENDPOINT) {
var route = API_ENDPOINT.URL;
return {
guardarFactura: function (factura) {
return $http.post(route + '/factura/guardar', factura)
},
getParametros: function() {
return $http.get(API_ENDPOINT.URL + '/parametros/factura');
},
validarPlanillaVendedor: function(idVendedor) {
return $http.get(route + '/turnos/validar-planilla/' + idVendedor);
},
getProductosByPlanilla: function (numeroPlanilla) {
return $http.get(route + '/turnos/productos/' + numeroPlanilla);
},
getBotonera: function() {
return [
{
label: 'Vendedor',
image: 'vendedor.png'
},
{
label: 'Cliente',
image: 'cliente.png'
},
{
label: 'Moneda',
image: 'moneda.png'
},
{
label: 'Observaciones',
image: 'botonObservaciones.png'
}
];
}
};
}]);