Commit 3ddc7152d3d153aa02cb23c6539265bd3ec3ffca

Authored by Martin Macola
Exists in master

Merge branch 'master' into 'develop'

Master (macola)

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