Commit 629eef2c09fd15ad1a47730803031828526a55fd

Authored by Jose Pinto
1 parent a4ce9f88c9
Exists in master and in 1 other branch develop

fix detalles correctos

src/js/controller.js
... ... @@ -11,7 +11,12 @@ angular.module('focaModalFacturaDetalle')
11 11 $scope.factura = factura;
12 12 $scope.detalles = [];
13 13 focaModalFacturaDetalleService
14   - .getFacturasDetalleByNCO(factura.NCO)
  14 + .getFacturasDetalleByNCO({
  15 + tip: factura.TIP,
  16 + tco: factura.TCO,
  17 + suc: factura.SUC,
  18 + nco: factura.NCO
  19 + })
15 20 .then(function(res) {
16 21 $scope.detalles = res.data;
17 22 });
... ... @@ -4,9 +4,9 @@ angular.module('focaModalFacturaDetalle')
4 4 'API_ENDPOINT',
5 5 function($http, API_ENDPOINT) {
6 6 return {
7   - getFacturasDetalleByNCO: function(nco) {
8   - return $http.get(
9   - API_ENDPOINT.URL + '/factura/' + nco + '/detalles');
  7 + getFacturasDetalleByNCO: function(data) {
  8 + return $http.post(
  9 + API_ENDPOINT.URL + '/factura/detalles', data);
10 10 }
11 11 };
12 12 }
src/views/foca-modal-factura-detalle.html
... ... @@ -21,7 +21,7 @@
21 21 </div>
22 22 <div class="row">
23 23 <div class="col-12">
24   - <table class="table table-sm mt-3">
  24 + <table class="table table-sm mt-3 tabla-factura">
25 25 <thead>
26 26 <tr>
27 27 <th>Codigo</th>
... ... @@ -36,8 +36,8 @@
36 36 <td class="border-right border-top-0"><small>{{detalle.COD | rellenarDigitos: 2: 0}}-{{detalle.ART | rellenarDigitos: 5: 0}}</small></td>
37 37 <td class="border-right border-top-0 text-right"><small ng-bind="detalle.CAN | number: 2"></small></td>
38 38 <td class="border-right border-top-0"><small ng-bind="detalle.TIO"></small></td>
39   - <td class="border-right border-top-0 text-right"><small ng-bind="detalle.PUN | number: 2"></small></td>
40   - <td class="border-top-0 text-right"><small ng-bind="detalle.PUN * detalle.CAN | number: 2"></small></td>
  39 + <td class="border-right border-top-0 text-right"><small ng-bind="detalle.PUT | number: 2"></small></td>
  40 + <td class="border-top-0 text-right"><small ng-bind="detalle.PUT * detalle.CAN | number: 2"></small></td>
41 41 </tr>
42 42 </tbody>
43 43 </table>