Commit 8f2a29261c4d4a55c5d616e57f8988a09610ed66

Authored by Marcelo Puebla
1 parent 8f5df4b190
Exists in master and in 1 other branch develop

Agregado footer en mobile.

Showing 1 changed file with 184 additions and 2 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">
16 <div class="row mt-4"> 16 <div class="row mt-4">
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 border border-light rounded">
18 <div class="row p-1 botonera-secundaria px-5 py-2"> 18 <div class="row p-1 botonera-secundaria px-5 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="quitarArticulo(articulo)" 119 ng-click="quitarArticulo(articulo)"
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 -->
158 <div class="row d-sm-none">
159 <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile">
160 <thead>
161 <tr class="d-flex">
162 <th class="">#</th>
163 <th class="col px-0">
164 <div class="d-flex">
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 &nbsp;
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">
190 <div class="col-4 px-1">
191 <span
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>
199 <div class="d-flex">
200 <div class="col-4 px-1">
201 <span
202 ng-bind="'x' + articulo.CAN"
203 ng-hide="articulo.editCantidad"
204 ></span>
205 <i
206 class="fa fa-pencil text-white-50"
207 aria-hidden="true"
208 ng-hide="articulo.editCantidad"
209 ng-click="articulo.editCantidad = true"
210 ></i>
211 <input
212 ng-show="articulo.editCantidad"
213 ng-model="articulo.CAN"
214 class="form-control"
215 foca-tipo-input
216 min="1"
217 step="0.001"
218 foca-focus="articulo.editCantidad"
219 ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio)"
220 ng-focus="selectFocus($event)"
221 >
222 </div>
223 <div class="col px-1 text-right">
224 <span ng-bind="articulo.PUN |
225 currency: factura.cotizacion.moneda.SIMBOLO : 4"></span>
226 ></span>
227 </div>
228 <div class="col px-1 text-right">
229 <span
230 ng-bind="(articulo.PUN * articulo.CAN) |
231 currency: factura.cotizacion.moneda.SIMBOLO"
232 >
233 </span>
234 </div>
235 </div>
236 </div>
237 <div class="m-auto p-1">
238 <button
239 class="btn btn-outline-light"
240 ng-click="quitarArticulo(key)"
241 >
242 <i class="fa fa-trash"></i>
243 </button>
244 </div>
245 </td>
246 </tr>
247 </tbody>
248 <tfoot>
249 <!-- CARGANDO ITEM -->
250 <tr ng-show="!cargando" class="d-flex">
251 <td
252 class="m-auto p-1"
253 ng-bind="articulosFiltro().length + 1"
254 ></td>
255 <td class="col p-0">
256 <div class="d-flex">
257 <div class="col-4 px-1">
258 <span
259 ng-bind="articuloACargar.sectorCodigo"
260 ></span>
261 </div>
262 <div class="col-8 px-1">
263 <span ng-bind="articuloACargar.DES"></span>
264 </div>
265 </div>
266 <div class="d-flex">
267 <div class="col-3 px-1 m-1">
268 <input
269 class="form-control p-1"
270 foca-tipo-input
271 min="1"
272 ng-model="articuloACargar.CAN"
273 foca-focus="!cargando"
274 ng-keypress="agregarATabla($event.keyCode)"
275 style="height: auto; line-height: 1.1em"
276 >
277 </div>
278 <div class="col px-1 text-right">
279 <span ng-bind="articuloACargar.PUN |
280 currency: factura.c.moneda.SIMBOLO : 4"
281 ></span>
282 </div>
283 <div class="col px-1 text-right">
284 <span
285 ng-bind="getSubTotal() |
286 currency: factura.c.moneda.SIMBOLO"
287 >
288 </span>
289 </div>
290 </div>
291 </td>
292 <td class="text-center m-auto">
293 <button
294 class="btn btn-outline-light"
295 ng-click="agregarATabla(13)"
296 >
297 <i class="fa fa-save"></i>
298 </button>
299 </td>
300 </tr>
301 <!-- TOOGLE EXPANDIR -->
302 <tr>
303 <td class="col">
304 <button
305 class="btn btn-outline-light selectable w-100"
306 ng-click="show = !show; masMenos()"
307 ng-show="articulosFiltro().length > 0"
308 >
309 <i
310 class="fa fa-chevron-down"
311 ng-hide="show"
312 aria-hidden="true"
313 >
314 </i>
315 <i
316 class="fa fa-chevron-up"
317 ng-show="show"
318 aria-hidden="true">
319 </i>
320 </button>
321 </td>
322 </tr>
323 <!-- FOOTER -->
324 <tr class="d-flex">
325 <td class="m-auto no-border-top" colspan="2">
326 <strong>Cantidad Items:</strong>
327 <a ng-bind="articulosFiltro().length"></a>
328 </td>
329 <td class="text-right ml-auto table-celda-total no-border-top">
330 <h3>Total:</h3>
331 </td>
332 <td class="table-celda-total text-right no-border-top">
333 <h3>{{getTotal() | currency: notaPedido.cotizacion.moneda.SIMBOLO}}</h3>
334 </td>
335 </tr>
336 </tfoot>
337 </table>
338 </div>
157 </div> 339 </div>
158 </div> 340 </div>
159 </div> 341 </div>
160 <div class="row d-md-none fixed-bottom"> 342 <div class="row d-md-none fixed-bottom disable-selection">
161 <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> 343 <div class="w-100 bg-dark d-flex px-3 acciones-mobile">
162 <span class="ml-3 text-muted" ng-click="salir()">Salir</span> 344 <span class="ml-3 text-muted" ng-click="salir()">Salir</span>
163 <span 345 <span
164 class="mr-3 ml-auto" 346 class="mr-3 ml-auto"
165 ng-class="saveLoading ? 'text-muted' : ''" 347 ng-class="saveLoading ? 'text-muted' : ''"
166 ng-click="seleccionarFormaDePago()" 348 ng-click="seleccionarFormaDePago()"
167 ladda="saveLoading" 349 ladda="saveLoading"
168 data-style="expand-left" 350 data-style="expand-left"
169 >Guardar</span> 351 >Pago</span>
170 </div> 352 </div>
171 </div> 353 </div>
172 </div> 354 </div>
173 355