Commit e1ae85f8a3594352bb5771e2154249d4739d3391
1 parent
d177c06594
Exists in
master
agregado servicio para crear plazos.
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/js/service.js
| 1 | angular.module('focaModalPrecioCondicion') | 1 | angular.module('focaModalPrecioCondicion') |
| 2 | .service('focaModalPrecioCondicionService', [ | 2 | .service('focaModalPrecioCondicionService', [ |
| 3 | '$http', | 3 | '$http', |
| 4 | 'API_ENDPOINT', | 4 | 'API_ENDPOINT', |
| 5 | function ($http, API_ENDPOINT) { | 5 | function ($http, API_ENDPOINT) { |
| 6 | return { | 6 | return { |
| 7 | getPlazosByIdPrecioCondicion: function (id) { | 7 | getPlazosByIdPrecioCondicion: function (id) { |
| 8 | return $http.get(API_ENDPOINT.URL + '/plazo-pago/precio-condicion/' + id); | 8 | return $http.get(API_ENDPOINT.URL + '/plazo-pago/precio-condicion/' + id); |
| 9 | }, | 9 | }, |
| 10 | getPreciosCondiciones: function () { | 10 | getPreciosCondiciones: function () { |
| 11 | return $http.get(API_ENDPOINT.URL + '/precio-condicion/plazo-pago'); | 11 | return $http.get(API_ENDPOINT.URL + '/precio-condicion/plazo-pago'); |
| 12 | }, | 12 | }, |
| 13 | getPreciosCondicionesByIdListaPrecio: function (idListaPrecio) { | 13 | getPreciosCondicionesByIdListaPrecio: function (idListaPrecio) { |
| 14 | return $http.get(API_ENDPOINT.URL + '/precio-condicion/plazo-pago/' + | 14 | return $http.get(API_ENDPOINT.URL + '/precio-condicion/plazo-pago/' + |
| 15 | idListaPrecio); | 15 | idListaPrecio); |
| 16 | }, | 16 | }, |
| 17 | getListaPrecio: function (idListaPrecio) { | 17 | getListaPrecio: function (idListaPrecio) { |
| 18 | return $http.get(API_ENDPOINT.URL + '/lista-precio/' + | 18 | return $http.get(API_ENDPOINT.URL + '/lista-precio/' + |
| 19 | idListaPrecio); | 19 | idListaPrecio); |
| 20 | }, | 20 | }, |
| 21 | getAllListaPrecio: function () { | 21 | getAllListaPrecio: function () { |
| 22 | return $http.get(API_ENDPOINT.URL + '/lista-precio'); | 22 | return $http.get(API_ENDPOINT.URL + '/lista-precio'); |
| 23 | }, | 23 | }, |
| 24 | getPlazosByIdCliente: function (id) { | 24 | getPlazosByIdCliente: function (id) { |
| 25 | return $http.get(API_ENDPOINT.URL + '/plazo-pago/cliente/' + id); | 25 | return $http.get(API_ENDPOINT.URL + '/plazo-pago/cliente/' + id); |
| 26 | }, | ||
| 27 | createPlazo: function (plazosPago){ | ||
| 28 | return $http.post(API_ENDPOINT.URL + '/plazos-pago', { plazosPago: plazosPago }); | ||
| 26 | } | 29 | } |
| 27 | }; | 30 | }; |
| 28 | } | 31 | } |
| 29 | ]); | 32 | ]); |
| 30 | 33 |