Commit c0b6367ab613c2998e6daa5825f9fe5a3310db40
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master See merge request !2
Showing
2 changed files
Show diff stats
src/js/controller.js
| 1 | angular.module('focaModalFacturaDetalle') | 1 | angular.module('focaModalFacturaDetalle') |
| 2 | .controller('focaModalFacturaDetalleController', | 2 | .controller('focaModalFacturaDetalleController', |
| 3 | [ | 3 | [ |
| 4 | '$scope', | 4 | '$scope', |
| 5 | '$uibModalInstance', | 5 | '$uibModalInstance', |
| 6 | 'focaModalFacturaDetalleService', | 6 | 'focaModalFacturaDetalleService', |
| 7 | 'factura', | 7 | 'factura', |
| 8 | 'cliente', | ||
| 9 | function($scope, $uibModalInstance, | 8 | function($scope, $uibModalInstance, |
| 10 | focaModalFacturaDetalleService, factura, cliente | 9 | focaModalFacturaDetalleService, factura |
| 11 | ) { | 10 | ) { |
| 12 | $scope.factura = factura; | 11 | $scope.factura = factura; |
| 13 | $scope.cliente = cliente; | ||
| 14 | $scope.detalles = []; | 12 | $scope.detalles = []; |
| 15 | focaModalFacturaDetalleService | 13 | focaModalFacturaDetalleService |
| 16 | .getFacturasDetalleByNCO(factura.NCO) | 14 | .getFacturasDetalleByNCO(factura.NCO) |
| 17 | .then(function(res) { | 15 | .then(function(res) { |
| 18 | $scope.detalles = res.data; | 16 | $scope.detalles = res.data; |
| 19 | }); | 17 | }); |
| 20 | 18 | ||
| 21 | $scope.cerrar = function() { | 19 | $scope.cerrar = function() { |
| 22 | $uibModalInstance.dismiss(); | 20 | $uibModalInstance.dismiss(); |
| 23 | }; | 21 | }; |
| 24 | } | 22 | } |
| 25 | ] | 23 | ] |
| 26 | ); | 24 | ); |
| 27 | 25 |
src/views/foca-modal-factura-detalle.html
| 1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
| 2 | <div class="row"> | 2 | <div class="row"> |
| 3 | <div class="col-md-4"></div> | 3 | <div class="col-md-4"></div> |
| 4 | <div class="col-md-4 text-center"> | 4 | <div class="col-md-4 text-center"> |
| 5 | <strong>Factura | 5 | <strong>Factura |
| 6 | <br>{{factura.TIP}}</strong> | 6 | <br>{{factura.TIP}}</strong> |
| 7 | </div> | 7 | </div> |
| 8 | <div class="col-md-4 text-center text-md-right"> | 8 | <div class="col-md-4 text-center text-md-right"> |
| 9 | {{factura.numeroFactura}} | 9 | {{factura.numeroFactura}} |
| 10 | <br class="d-none d-md-block">{{factura.FECHA_COMPROBANTE | date: 'dd/MM/yyyy'}} | 10 | <br class="d-none d-md-block">{{factura.FECHA_COMPROBANTE | date: 'dd/MM/yyyy'}} |
| 11 | </div> | 11 | </div> |
| 12 | </div> | 12 | </div> |
| 13 | </div> | 13 | </div> |
| 14 | <div class="modal-body" id="modal-body"> | 14 | <div class="modal-body" id="modal-body"> |
| 15 | <div class="row"> | 15 | <div class="row"> |
| 16 | <div class="col-12"> | 16 | <div class="col-12"> |
| 17 | <small><strong>({{cliente.COD | rellenarDigitos: 5: 0}}) {{cliente.NOM}}</strong></small> | 17 | <small><strong>({{factura.cliente.COD | rellenarDigitos: 5: 0}}) {{factura.cliente.NOM}}</strong></small> |
| 18 | <small><br><strong>{{factura.DOMICILIO_CLIENTE}}, {{factura.LOCALIDAD}}, {{factura.PROVINCIA}}</strong></small> | 18 | <br><small><strong>{{factura.cliente.DOM}}, {{factura.cliente.LOC}}, {{factura.cliente.PCI}}</strong></small> |
| 19 | <small><br><strong>PAGO: {{factura.formaPago.NOMBRE}}</strong><strong class="float-right">Items: {{detalles.length}}</strong></small> | 19 | <br><small><strong>PAGO: {{factura.formaPago.NOMBRE}}</strong><strong class="float-right">Items: {{detalles.length}}</strong></small> |
| 20 | </div> | 20 | </div> |
| 21 | </div> | 21 | </div> |
| 22 | <div class="row"> | 22 | <div class="row"> |
| 23 | <div class="col-12"> | 23 | <div class="col-12"> |
| 24 | <table class="table table-sm mt-3"> | 24 | <table class="table table-sm mt-3"> |
| 25 | <thead> | 25 | <thead> |
| 26 | <tr> | 26 | <tr> |
| 27 | <th>Codigo</th> | 27 | <th>Codigo</th> |
| 28 | <th>Cantidad</th> | 28 | <th>Cantidad</th> |
| 29 | <th>Detalle</th> | 29 | <th>Detalle</th> |
| 30 | <th>Precio</th> | 30 | <th>Precio</th> |
| 31 | <th>Importe</th> | 31 | <th>Importe</th> |
| 32 | </tr> | 32 | </tr> |
| 33 | </thead> | 33 | </thead> |
| 34 | <tbody> | 34 | <tbody> |
| 35 | <tr ng-repeat="detalle in detalles"> | 35 | <tr ng-repeat="detalle in detalles"> |
| 36 | <td class="border-right border-top-0"><small>{{detalle.COD | rellenarDigitos: 2: 0}}-{{detalle.ART | rellenarDigitos: 5: 0}}</small></td> | 36 | <td class="border-right border-top-0"><small>{{detalle.COD | rellenarDigitos: 2: 0}}-{{detalle.ART | rellenarDigitos: 5: 0}}</small></td> |
| 37 | <td class="border-right border-top-0"><small ng-bind="detalle.CAN | number: 2"></small></td> | 37 | <td class="border-right border-top-0"><small ng-bind="detalle.CAN | number: 2"></small></td> |
| 38 | <td class="border-right border-top-0"><small ng-bind="detalle.TIO"></small></td> | 38 | <td class="border-right border-top-0"><small ng-bind="detalle.TIO"></small></td> |
| 39 | <td class="border-right border-top-0"><small ng-bind="detalle.PUN | number: 2"></small></td> | 39 | <td class="border-right border-top-0"><small ng-bind="detalle.PUN | number: 2"></small></td> |
| 40 | <td class="border-top-0"><small ng-bind="detalle.PUN * detalle.CAN | number: 2"></small></td> | 40 | <td class="border-top-0"><small ng-bind="detalle.PUN * detalle.CAN | number: 2"></small></td> |
| 41 | </tr> | 41 | </tr> |
| 42 | </tbody> | 42 | </tbody> |
| 43 | </table> | 43 | </table> |
| 44 | <table class="table table-sm table-bordered"> | 44 | <table class="table table-sm table-bordered"> |
| 45 | <tbody> | 45 | <tbody> |
| 46 | <tr> | 46 | <tr> |
| 47 | <td><small>Neto</small></td> | 47 | <td><small>Neto</small></td> |
| 48 | <td><small>IVA</small></td> | 48 | <td><small>IVA</small></td> |
| 49 | <td><small>Percepción</small></td> | 49 | <td><small>Percepción</small></td> |
| 50 | <td><small>Imp internos</small></td> | 50 | <td><small>Imp internos</small></td> |
| 51 | <td><small>Perc. IVA</small></td> | 51 | <td><small>Perc. IVA</small></td> |
| 52 | </tr> | 52 | </tr> |
| 53 | </tbody> | 53 | </tbody> |
| 54 | <tbody> | 54 | <tbody> |
| 55 | <tr> | 55 | <tr> |
| 56 | <td ng-bind="factura.NETO | number: 2"></td> | 56 | <td ng-bind="factura.NETO | number: 2"></td> |
| 57 | <td ng-bind="factura.IVA | number: 2"></td> | 57 | <td ng-bind="factura.IVA | number: 2"></td> |
| 58 | <td ng-bind="factura.PERCEPCION_IIBB"></td> | 58 | <td ng-bind="factura.PERCEPCION_IIBB"></td> |
| 59 | <td ng-bind="factura.IMPUESTOS_INTERNOS | number: 2"></td> | 59 | <td ng-bind="factura.IMPUESTOS_INTERNOS | number: 2"></td> |
| 60 | <td ng-bind="factura.PERCECPION_IVA | number: 2"></td> | 60 | <td ng-bind="factura.PERCECPION_IVA | number: 2"></td> |
| 61 | </tr> | 61 | </tr> |
| 62 | </tbody> | 62 | </tbody> |
| 63 | <tbody> | 63 | <tbody> |
| 64 | <tr> | 64 | <tr> |
| 65 | <td></td> | 65 | <td></td> |
| 66 | <td></td> | 66 | <td></td> |
| 67 | <td><small>Moneda</small></td> | 67 | <td><small>Moneda</small></td> |
| 68 | <td><small>Coticacion</small></td> | 68 | <td><small>Coticacion</small></td> |
| 69 | <td><small><strong>Total</strong></small></td> | 69 | <td><small><strong>Total</strong></small></td> |
| 70 | </tr> | 70 | </tr> |
| 71 | </tbody> | 71 | </tbody> |
| 72 | <tbody> | 72 | <tbody> |
| 73 | <tr> | 73 | <tr> |
| 74 | <td></td> | 74 | <td></td> |
| 75 | <td></td> | 75 | <td></td> |
| 76 | <td ng-bind="factura.moneda.CODIGO_AFIP"></td> | 76 | <td ng-bind="factura.moneda.CODIGO_AFIP"></td> |
| 77 | <td ng-bind="factura.COTIZACION | number: 2"></td> | 77 | <td ng-bind="factura.COTIZACION | number: 2"></td> |
| 78 | <td ng-bind="factura.TOTAL | number: 2"></td> | 78 | <td ng-bind="factura.TOTAL | number: 2"></td> |
| 79 | </tr> | 79 | </tr> |
| 80 | </tbody> | 80 | </tbody> |
| 81 | </table> | 81 | </table> |
| 82 | </div> | 82 | </div> |
| 83 | </div> | 83 | </div> |
| 84 | </div> | 84 | </div> |
| 85 | <div class="modal-footer py-1"> | 85 | <div class="modal-footer py-1"> |
| 86 | <div class="row"> | 86 | <div class="row"> |
| 87 | <div class="col-12"> | 87 | <div class="col-12"> |
| 88 | <button | 88 | <button |
| 89 | class="btn btn-primary" | 89 | class="btn btn-primary" |
| 90 | ng-click="cerrar()" | 90 | ng-click="cerrar()" |
| 91 | >Cerrar</button> | 91 | >Cerrar</button> |
| 92 | </div> | 92 | </div> |
| 93 | </div> | 93 | </div> |
| 94 | </div> | 94 | </div> |
| 95 | 95 |