Commit 7b846d2e71c4fee6bbcbe96916cb4b7e482c50fa
1 parent
854ba16e9b
Exists in
ultimos_despachos
and in
1 other branch
Arreglos en la vista.
Showing
1 changed file
with
132 additions
and
130 deletions
 
Show diff stats
src/views/factura.html
| 1 | <div class="crear-nota-remito foca-crear row"> | 1 | <div class="crear-nota-remito foca-crear row"> | 
| 2 | <foca-cabecera-facturador | 2 | <foca-cabecera-facturador | 
| 3 | titulo="'Factura'" | 3 | titulo="'Factura'" | 
| 4 | numero="puntoVenta + '-' + comprobante" | 4 | numero="puntoVenta + '-' + comprobante" | 
| 5 | fecha="now" | 5 | fecha="now" | 
| 6 | class="mb-0 col-lg-12" | 6 | class="mb-0 col-lg-12" | 
| 7 | busqueda="seleccionarRemito" | 7 | busqueda="seleccionarRemito" | 
| 8 | ></foca-cabecera-facturador> | 8 | ></foca-cabecera-facturador> | 
| 9 | <marquee | 9 | <marquee | 
| 10 | bgcolor="#FF9900" | 10 | bgcolor="#FF9900" | 
| 11 | behavior="scroll" | 11 | behavior="scroll" | 
| 12 | direction="left" | 12 | direction="left" | 
| 13 | ng-bind="factura.observaciones" | 13 | ng-bind="factura.observaciones" | 
| 14 | ></marquee> | 14 | ></marquee> | 
| 15 | <div class="col-lg-12"> | 15 | <div class="col-lg-12 p-2"> | 
| 16 | <div class="row mt-4"> | 16 | <div class="row border border-light rounded m-0"> | 
| 17 | <div class="col-12 col-md-10 col-lg-10 border border-light rounded"> | 17 | <div class="col-12 col-md-10 col-lg-10"> | 
| 18 | <div class="row p-1 botonera-secundaria px-5 py-2"> | 18 | <div class="row p-1 botonera-secundaria px-3 py-2"> | 
| 19 | <div class="col-12"> | 19 | <div class="col-12"> | 
| 20 | <foca-botonera-facturador botones="botonera" extra="4" class="row"></foca-botonera-facturador> | 20 | <foca-botonera-facturador botones="botonera" extra="4" class="row"></foca-botonera-facturador> | 
| 21 | </div> | 21 | </div> | 
| 22 | </div> | 22 | </div> | 
| 23 | <!-- PC --> | 23 | <!-- PC --> | 
| 24 | <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | 24 | <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | 
| 25 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | 25 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | 
| 26 | <thead> | 26 | <thead> | 
| 27 | <tr class="d-flex"> | 27 | <tr class="d-flex"> | 
| 28 | <th class="">#</th> | 28 | <th class="">#</th> | 
| 29 | <th class="col">Código</th> | 29 | <th class="col">Código</th> | 
| 30 | <th class="col-4">Descripción</th> | 30 | <th class="col-4">Descripción</th> | 
| 31 | <th class="col text-right">Cantidad</th> | 31 | <th class="col text-right">Cantidad</th> | 
| 32 | <th class="col text-right">Precio Unitario</th> | 32 | <th class="col text-right">Precio Unitario</th> | 
| 33 | <th class="col text-right">SubTotal</th> | 33 | <th class="col text-right">SubTotal</th> | 
| 34 | <th class="text-right"> | 34 | <th class="text-right"> | 
| 35 | <button | 35 | <button | 
| 36 | class="btn btn-outline-light selectable" | 36 | class="btn btn-outline-light selectable" | 
| 37 | ng-click="show = !show; masMenos()" | 37 | ng-click="show = !show; masMenos()" | 
| 38 | > | 38 | > | 
| 39 | <i | 39 | <i | 
| 40 | class="fa fa-chevron-down" | 40 | class="fa fa-chevron-down" | 
| 41 | ng-show="show" | 41 | ng-show="show" | 
| 42 | aria-hidden="true" | 42 | aria-hidden="true" | 
| 43 | > | 43 | > | 
| 44 | </i> | 44 | </i> | 
| 45 | <i | 45 | <i | 
| 46 | class="fa fa-chevron-up" | 46 | class="fa fa-chevron-up" | 
| 47 | ng-hide="show" | 47 | ng-hide="show" | 
| 48 | aria-hidden="true"> | 48 | aria-hidden="true"> | 
| 49 | </i> | 49 | </i> | 
| 50 | </button> | 50 | </button> | 
| 51 | </th> | 51 | </th> | 
| 52 | </tr> | 52 | </tr> | 
| 53 | </thead> | 53 | </thead> | 
| 54 | <tbody class="tabla-articulo-body"> | 54 | <tbody class="tabla-articulo-body"> | 
| 55 | <tr | 55 | <tr | 
| 56 | ng-repeat="(key, articulo) in articulosFiltro()" | 56 | ng-repeat="(key, articulo) in articulosFiltro()" | 
| 57 | ng-show="show || key == (articulosFiltro().length - 1)" | 57 | ng-show="show || key == (articulosFiltro().length - 1)" | 
| 58 | class="d-flex" | 58 | class="d-flex" | 
| 59 | > | 59 | > | 
| 60 | <td ng-bind="key + 1"></td> | 60 | <td ng-bind="key + 1"></td> | 
| 61 | <td | 61 | <td | 
| 62 | class="col" | 62 | class="col" | 
| 63 | ng-bind="articulo.SEC + '-' + articulo.ART" | 63 | ng-bind="articulo.SEC + '-' + articulo.ART" | 
| 64 | ></td> | 64 | ></td> | 
| 65 | <td | 65 | <td | 
| 66 | class="col-4" | 66 | class="col-4" | 
| 67 | ng-bind="articulo.DES" | 67 | ng-bind="articulo.DES" | 
| 68 | ></td> | 68 | ></td> | 
| 69 | <td class="col text-right"> | 69 | <td class="col text-right"> | 
| 70 | <input | 70 | <input | 
| 71 | ng-show="articulo.editCantidad" | 71 | ng-show="articulo.editCantidad" | 
| 72 | ng-model="tmpCantidad" | 72 | ng-model="tmpCantidad" | 
| 73 | class="form-control" | 73 | class="form-control" | 
| 74 | foca-tipo-input | 74 | foca-tipo-input | 
| 75 | min="1" | 75 | min="1" | 
| 76 | foca-focus="articulo.editCantidad" | 76 | foca-focus="articulo.editCantidad" | 
| 77 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);" | 77 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);" | 
| 78 | esc-key="cancelarEditar(articulo)" | 78 | esc-key="cancelarEditar(articulo)" | 
| 79 | ng-focus="selectFocus($event); tmpCantidad = articulo.CAN; tmpPrecio = articulo.PUN" | 79 | ng-focus="selectFocus($event); tmpCantidad = articulo.CAN; tmpPrecio = articulo.PUN" | 
| 80 | teclado-virtual | 80 | teclado-virtual | 
| 81 | > | 81 | > | 
| 82 | <i | 82 | <i | 
| 83 | class="selectable" | 83 | class="selectable" | 
| 84 | ng-click="cambioEdit(articulo, 'cantidad')" | 84 | ng-click="cambioEdit(articulo, 'cantidad')" | 
| 85 | ng-hide="articulo.editCantidad" | 85 | ng-hide="articulo.editCantidad" | 
| 86 | ng-bind="articulo.CAN"> | 86 | ng-bind="articulo.CAN"> | 
| 87 | </i> | 87 | </i> | 
| 88 | </td> | 88 | </td> | 
| 89 | <td class="col text-right"> | 89 | <td class="col text-right"> | 
| 90 | <input | 90 | <input | 
| 91 | ng-show="articulo.editPrecio" | 91 | ng-show="articulo.editPrecio" | 
| 92 | ng-model="tmpPrecio" | 92 | ng-model="tmpPrecio" | 
| 93 | class="form-control" | 93 | class="form-control" | 
| 94 | foca-tipo-input | 94 | foca-tipo-input | 
| 95 | min="1" | 95 | min="1" | 
| 96 | step="0.0001" | 96 | step="0.0001" | 
| 97 | foca-focus="articulo.editPrecio" | 97 | foca-focus="articulo.editPrecio" | 
| 98 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);" | 98 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio);" | 
| 99 | esc-key="cancelarEditar(articulo)" | 99 | esc-key="cancelarEditar(articulo)" | 
| 100 | ng-focus="selectFocus($event); | 100 | ng-focus="selectFocus($event); | 
| 101 | tmpCantidad = articulo.CAN; | 101 | tmpCantidad = articulo.CAN; | 
| 102 | tmpPrecio = articulo.PUN" | 102 | tmpPrecio = articulo.PUN" | 
| 103 | teclado-virtual | 103 | teclado-virtual | 
| 104 | > | 104 | > | 
| 105 | <i | 105 | <i | 
| 106 | class="selectable" | 106 | class="selectable" | 
| 107 | ng-click="cambioEdit(articulo, 'precio')" | 107 | ng-click="cambioEdit(articulo, 'precio')" | 
| 108 | ng-hide="articulo.editPrecio" | 108 | ng-hide="articulo.editPrecio" | 
| 109 | ng-bind="articulo.PUN | number: 4"> | 109 | ng-bind="articulo.PUN | number: 4"> | 
| 110 | </i> | 110 | </i> | 
| 111 | </td> | 111 | </td> | 
| 112 | <td | 112 | <td | 
| 113 | class="col text-right" | 113 | class="col text-right" | 
| 114 | ng-bind="(articulo.PUN * articulo.CAN) | number: 2"> | 114 | ng-bind="(articulo.PUN * articulo.CAN) | number: 2"> | 
| 115 | </td> | 115 | </td> | 
| 116 | <td class="text-center"> | 116 | <td class="text-center"> | 
| 117 | <button | 117 | <button | 
| 118 | class="btn btn-outline-light" | 118 | class="btn btn-outline-light" | 
| 119 | ng-click="quitarDespacho(articulo, key)" | 119 | ng-click="quitarDespacho(articulo, key)" | 
| 120 | > | 120 | > | 
| 121 | <i class="fa fa-trash"></i> | 121 | <i class="fa fa-trash"></i> | 
| 122 | </button> | 122 | </button> | 
| 123 | <button | 123 | <button | 
| 124 | class="btn btn-outline-light" | 124 | class="btn btn-outline-light" | 
| 125 | ng-click="editarArticulo(13, articulo, tmpCantidad, tmpPrecio);" | 125 | ng-click="editarArticulo(13, articulo, tmpCantidad, tmpPrecio);" | 
| 126 | ng-show="articulo.editCantidad || articulo.editPrecio" | 126 | ng-show="articulo.editCantidad || articulo.editPrecio" | 
| 127 | > | 127 | > | 
| 128 | <i class="fa fa-save"></i> | 128 | <i class="fa fa-save"></i> | 
| 129 | </button> | 129 | </button> | 
| 130 | </td> | 130 | </td> | 
| 131 | </tr> | 131 | </tr> | 
| 132 | </tbody> | 132 | </tbody> | 
| 133 | <tfoot> | 133 | <tfoot> | 
| 134 | <tr class="d-flex"> | 134 | <tr class="d-flex"> | 
| 135 | <td colspan="4" class="no-border-top"> | 135 | <td colspan="4" class="no-border-top"> | 
| 136 | <strong>Items:</strong> | 136 | <strong>Items:</strong> | 
| 137 | <a ng-bind="articulosFiltro().length"></a> | 137 | <a ng-bind="articulosFiltro().length"></a> | 
| 138 | </td> | 138 | </td> | 
| 139 | <td class="text-right ml-auto table-celda-total no-border-top"> | 139 | <td class="text-right ml-auto table-celda-total no-border-top"> | 
| 140 | <h3>Total:</h3> | 140 | <h3>Total:</h3> | 
| 141 | </td> | 141 | </td> | 
| 142 | <td class="table-celda-total text-right no-border-top" colspan="1"> | 142 | <td class="table-celda-total text-right no-border-top" colspan="1"> | 
| 143 | <h3>{{getTotal() | currency: factura.cotizacion.moneda.SIMBOLO}}</h3> | 143 | <h3>{{getTotal() | currency: factura.cotizacion.moneda.SIMBOLO}}</h3> | 
| 144 | </td> | 144 | </td> | 
| 145 | <td class="text-right no-border-top"> | 145 | <td class="text-right no-border-top"> | 
| 146 | <button | 146 | <button | 
| 147 | type="button" | 147 | type="button" | 
| 148 | class="btn btn-sm" | 148 | class="btn btn-sm" | 
| 149 | > | 149 | > | 
| 150 | Totales | 150 | Totales | 
| 151 | </button> | 151 | </button> | 
| 152 | </td> | 152 | </td> | 
| 153 | </tr> | 153 | </tr> | 
| 154 | </tfoot> | 154 | </tfoot> | 
| 155 | </table> | 155 | </table> | 
| 156 | </div> | 156 | </div> | 
| 157 | <!-- MOBILE --> | 157 | <!-- MOBILE --> | 
| 158 | <div class="row d-sm-none"> | 158 | <div class="row d-sm-none"> | 
| 159 | <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile"> | 159 | <div class="col p-0 m-2 mb-5"> | 
| 160 | <thead> | 160 | <table class="table table-sm table-striped tabla-articulo"> | 
| 161 | <tr class="d-flex"> | 161 | <thead> | 
| 162 | <th class="">#</th> | 162 | <tr class="d-flex"> | 
| 163 | <th class="col px-0"> | 163 | <th class="">#</th> | 
| 164 | <div class="d-flex"> | 164 | <th class="col px-0"> | 
| 165 | <div class="col-4 px-1">Código</div> | ||
| 166 | <div class="col-8 px-1">Descripción</div> | ||
| 167 | </div> | ||
| 168 | <div class="d-flex"> | ||
| 169 | <div class="col-3 px-1">Cantidad</div> | ||
| 170 | <div class="col px-1 text-right">P. Uni.</div> | ||
| 171 | <div class="col px-1 text-right">Subtotal</div> | ||
| 172 | </div> | ||
| 173 | </th> | ||
| 174 | <th class="text-center tamaño-boton"> | ||
| 175 |   | ||
| 176 | </th> | ||
| 177 | </tr> | ||
| 178 | </thead> | ||
| 179 | <tbody> | ||
| 180 | <tr | ||
| 181 | ng-repeat="(key, articulo) in articulosFiltro()" | ||
| 182 | ng-show="show || key == articulosFiltro().length - 1" | ||
| 183 | > | ||
| 184 | <td class="w-100 d-flex p-0"> | ||
| 185 | <div class="p-1 m-auto"> | ||
| 186 | <span ng-bind="key + 1"></span> | ||
| 187 | </div> | ||
| 188 | <div class="col px-0"> | ||
| 189 | <div class="d-flex"> | 165 | <div class="d-flex"> | 
| 190 | <div class="col-4 px-1"> | 166 | <div class="col-4 px-1">Código</div> | 
| 191 | <span | 167 | <div class="col-8 px-1">Descripción</div> | 
| 192 | ng-bind="articulo.SEC + '-' + articulo.ART" | ||
| 193 | ></span> | ||
| 194 | </div> | ||
| 195 | <div class="col-8 px-1"> | ||
| 196 | <span ng-bind="articulo.DES"></span> | ||
| 197 | </div> | ||
| 198 | </div> | 168 | </div> | 
| 199 | <div class="d-flex"> | 169 | <div class="d-flex"> | 
| 200 | <div class="col-4 px-1"> | 170 | <div class="col-3 px-1">Cantidad</div> | 
| 201 | <span | 171 | <div class="col px-1 text-right">P. Uni.</div> | 
| 202 | ng-bind="'x' + articulo.CAN" | 172 | <div class="col px-1 text-right">Subtotal</div> | 
| 203 | ng-hide="articulo.editCantidad" | 173 | </div> | 
| 204 | ></span> | 174 | </th> | 
| 205 | <i | 175 | <th class="text-center tamaño-boton"> | 
| 206 | class="fa fa-pencil text-white-50" | 176 |   | 
| 207 | aria-hidden="true" | 177 | </th> | 
| 208 | ng-hide="articulo.editCantidad" | 178 | </tr> | 
| 209 | ng-click="articulo.editCantidad = true" | 179 | </thead> | 
| 210 | ></i> | 180 | <tbody> | 
| 211 | <input | 181 | <tr | 
| 212 | ng-show="articulo.editCantidad" | 182 | ng-repeat="(key, articulo) in articulosFiltro()" | 
| 213 | ng-model="articulo.CAN" | 183 | ng-show="show || key == articulosFiltro().length - 1" | 
| 214 | class="form-control" | 184 | > | 
| 215 | foca-tipo-input | 185 | <td class="w-100 d-flex p-0"> | 
| 216 | min="1" | 186 | <div class="p-1 m-auto"> | 
| 217 | step="0.001" | 187 | <span ng-bind="key + 1"></span> | 
| 218 | foca-focus="articulo.editCantidad" | 188 | </div> | 
| 219 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio)" | 189 | <div class="col px-0"> | 
| 220 | ng-focus="selectFocus($event)" | 190 | <div class="d-flex"> | 
| 221 | > | 191 | <div class="col-4 px-1"> | 
| 222 | </div> | 192 | <span | 
| 223 | <div class="col px-1 text-right"> | 193 | ng-bind="articulo.SEC + '-' + articulo.ART" | 
| 224 | <span ng-bind="articulo.PUN | | 194 | ></span> | 
| 225 | currency: factura.cotizacion.moneda.SIMBOLO : 4"></span> | 195 | </div> | 
| 226 | ></span> | 196 | <div class="col-8 px-1"> | 
| 197 | <span ng-bind="articulo.DES"></span> | ||
| 198 | </div> | ||
| 227 | </div> | 199 | </div> | 
| 228 | <div class="col px-1 text-right"> | 200 | <div class="d-flex"> | 
| 229 | <span | 201 | <div class="col-4 px-1"> | 
| 230 | ng-bind="(articulo.PUN * articulo.CAN) | | 202 | <span | 
| 231 | currency: factura.cotizacion.moneda.SIMBOLO" | 203 | ng-bind="'x' + articulo.CAN" | 
| 232 | > | 204 | ng-hide="articulo.editCantidad" | 
| 233 | </span> | 205 | ></span> | 
| 206 | <i | ||
| 207 | class="fa fa-pencil text-white-50" | ||
| 208 | aria-hidden="true" | ||
| 209 | ng-hide="articulo.editCantidad" | ||
| 210 | ng-click="articulo.editCantidad = true" | ||
| 211 | ></i> | ||
| 212 | <input | ||
| 213 | ng-show="articulo.editCantidad" | ||
| 214 | ng-model="articulo.CAN" | ||
| 215 | class="form-control" | ||
| 216 | foca-tipo-input | ||
| 217 | min="1" | ||
| 218 | step="0.001" | ||
| 219 | foca-focus="articulo.editCantidad" | ||
| 220 | ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio)" | ||
| 221 | ng-focus="selectFocus($event)" | ||
| 222 | > | ||
| 223 | </div> | ||
| 224 | <div class="col px-1 text-right"> | ||
| 225 | <span ng-bind="articulo.PUN | | ||
| 226 | currency: factura.cotizacion.moneda.SIMBOLO : 4"></span> | ||
| 227 | ></span> | ||
| 228 | </div> | ||
| 229 | <div class="col px-1 text-right"> | ||
| 230 | <span | ||
| 231 | ng-bind="(articulo.PUN * articulo.CAN) | | ||
| 232 | currency: factura.cotizacion.moneda.SIMBOLO" | ||
| 233 | > | ||
| 234 | </span> | ||
| 235 | </div> | ||
| 234 | </div> | 236 | </div> | 
| 235 | </div> | 237 | </div> | 
| 236 | </div> | 238 | <div class="m-auto p-1"> | 
| 237 | <div class="m-auto p-1"> | 239 | <button | 
| 240 | class="btn btn-outline-light" | ||
| 241 | ng-click="quitarDespacho(key)" | ||
| 242 | > | ||
| 243 | <i class="fa fa-trash"></i> | ||
| 244 | </button> | ||
| 245 | </div> | ||
| 246 | </td> | ||
| 247 | </tr> | ||
| 248 | </tbody> | ||
| 249 | <tfoot> | ||
| 250 | <!-- TOOGLE EXPANDIR --> | ||
| 251 | <tr> | ||
| 252 | <td class="col"> | ||
| 238 | <button | 253 | <button | 
| 239 | class="btn btn-outline-light" | 254 | class="btn btn-outline-light selectable w-100" | 
| 240 | ng-click="quitarDespacho(key)" | 255 | ng-click="show = !show; masMenos()" | 
| 256 | ng-show="articulosFiltro().length > 0" | ||
| 241 | > | 257 | > | 
| 242 | <i class="fa fa-trash"></i> | 258 | <i | 
| 259 | class="fa fa-chevron-down" | ||
| 260 | ng-hide="show" | ||
| 261 | aria-hidden="true" | ||
| 262 | > | ||
| 263 | </i> | ||
| 264 | <i | ||
| 265 | class="fa fa-chevron-up" | ||
| 266 | ng-show="show" | ||
| 267 | aria-hidden="true"> | ||
| 268 | </i> | ||
| 243 | </button> | 269 | </button> | 
| 244 | </div> | 270 | </td> | 
| 245 | </td> | 271 | </tr> | 
| 246 | </tr> | 272 | <!-- FOOTER --> | 
| 247 | </tbody> | 273 | <tr class="d-flex"> | 
| 248 | <tfoot> | 274 | <td class="m-auto no-border-top" colspan="2"> | 
| 249 | <!-- TOOGLE EXPANDIR --> | 275 | <strong>Cantidad Items:</strong> |