Commit a5ad3e885e2582c70330742d2b2b9c1bfeb3eb1c

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

Arreglo en get total.

Showing 1 changed file with 1 additions and 1 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="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 <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile">
160 <thead> 160 <thead>
161 <tr class="d-flex"> 161 <tr class="d-flex">
162 <th class="">#</th> 162 <th class="">#</th>
163 <th class="col px-0"> 163 <th class="col px-0">
164 <div class="d-flex"> 164 <div class="d-flex">
165 <div class="col-4 px-1">Código</div> 165 <div class="col-4 px-1">Código</div>
166 <div class="col-8 px-1">Descripción</div> 166 <div class="col-8 px-1">Descripción</div>
167 </div> 167 </div>
168 <div class="d-flex"> 168 <div class="d-flex">
169 <div class="col-3 px-1">Cantidad</div> 169 <div class="col-3 px-1">Cantidad</div>
170 <div class="col px-1 text-right">P. Uni.</div> 170 <div class="col px-1 text-right">P. Uni.</div>
171 <div class="col px-1 text-right">Subtotal</div> 171 <div class="col px-1 text-right">Subtotal</div>
172 </div> 172 </div>
173 </th> 173 </th>
174 <th class="text-center tamaño-boton"> 174 <th class="text-center tamaño-boton">
175 &nbsp; 175 &nbsp;
176 </th> 176 </th>
177 </tr> 177 </tr>
178 </thead> 178 </thead>
179 <tbody> 179 <tbody>
180 <tr 180 <tr
181 ng-repeat="(key, articulo) in articulosFiltro()" 181 ng-repeat="(key, articulo) in articulosFiltro()"
182 ng-show="show || key == articulosFiltro().length - 1" 182 ng-show="show || key == articulosFiltro().length - 1"
183 > 183 >
184 <td class="w-100 d-flex p-0"> 184 <td class="w-100 d-flex p-0">
185 <div class="p-1 m-auto"> 185 <div class="p-1 m-auto">
186 <span ng-bind="key + 1"></span> 186 <span ng-bind="key + 1"></span>
187 </div> 187 </div>
188 <div class="col px-0"> 188 <div class="col px-0">
189 <div class="d-flex"> 189 <div class="d-flex">
190 <div class="col-4 px-1"> 190 <div class="col-4 px-1">
191 <span 191 <span
192 ng-bind="articulo.SEC + '-' + articulo.ART" 192 ng-bind="articulo.SEC + '-' + articulo.ART"
193 ></span> 193 ></span>
194 </div> 194 </div>
195 <div class="col-8 px-1"> 195 <div class="col-8 px-1">
196 <span ng-bind="articulo.DES"></span> 196 <span ng-bind="articulo.DES"></span>
197 </div> 197 </div>
198 </div> 198 </div>
199 <div class="d-flex"> 199 <div class="d-flex">
200 <div class="col-4 px-1"> 200 <div class="col-4 px-1">
201 <span 201 <span
202 ng-bind="'x' + articulo.CAN" 202 ng-bind="'x' + articulo.CAN"
203 ng-hide="articulo.editCantidad" 203 ng-hide="articulo.editCantidad"
204 ></span> 204 ></span>
205 <i 205 <i
206 class="fa fa-pencil text-white-50" 206 class="fa fa-pencil text-white-50"
207 aria-hidden="true" 207 aria-hidden="true"
208 ng-hide="articulo.editCantidad" 208 ng-hide="articulo.editCantidad"
209 ng-click="articulo.editCantidad = true" 209 ng-click="articulo.editCantidad = true"
210 ></i> 210 ></i>
211 <input 211 <input
212 ng-show="articulo.editCantidad" 212 ng-show="articulo.editCantidad"
213 ng-model="articulo.CAN" 213 ng-model="articulo.CAN"
214 class="form-control" 214 class="form-control"
215 foca-tipo-input 215 foca-tipo-input
216 min="1" 216 min="1"
217 step="0.001" 217 step="0.001"
218 foca-focus="articulo.editCantidad" 218 foca-focus="articulo.editCantidad"
219 ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio)" 219 ng-keypress="editarArticulo($event.keyCode, articulo, tmpCantidad, tmpPrecio)"
220 ng-focus="selectFocus($event)" 220 ng-focus="selectFocus($event)"
221 > 221 >
222 </div> 222 </div>
223 <div class="col px-1 text-right"> 223 <div class="col px-1 text-right">
224 <span ng-bind="articulo.PUN | 224 <span ng-bind="articulo.PUN |
225 currency: factura.cotizacion.moneda.SIMBOLO : 4"></span> 225 currency: factura.cotizacion.moneda.SIMBOLO : 4"></span>
226 ></span> 226 ></span>
227 </div> 227 </div>
228 <div class="col px-1 text-right"> 228 <div class="col px-1 text-right">
229 <span 229 <span
230 ng-bind="(articulo.PUN * articulo.CAN) | 230 ng-bind="(articulo.PUN * articulo.CAN) |
231 currency: factura.cotizacion.moneda.SIMBOLO" 231 currency: factura.cotizacion.moneda.SIMBOLO"
232 > 232 >
233 </span> 233 </span>
234 </div> 234 </div>
235 </div> 235 </div>
236 </div> 236 </div>
237 <div class="m-auto p-1"> 237 <div class="m-auto p-1">
238 <button 238 <button
239 class="btn btn-outline-light" 239 class="btn btn-outline-light"
240 ng-click="quitarDespacho(key)" 240 ng-click="quitarDespacho(key)"
241 > 241 >
242 <i class="fa fa-trash"></i> 242 <i class="fa fa-trash"></i>
243 </button> 243 </button>
244 </div> 244 </div>
245 </td> 245 </td>
246 </tr> 246 </tr>
247 </tbody> 247 </tbody>
248 <tfoot> 248 <tfoot>
249 <!-- TOOGLE EXPANDIR --> 249 <!-- TOOGLE EXPANDIR -->
250 <tr> 250 <tr>
251 <td class="col"> 251 <td class="col">
252 <button 252 <button
253 class="btn btn-outline-light selectable w-100" 253 class="btn btn-outline-light selectable w-100"
254 ng-click="show = !show; masMenos()" 254 ng-click="show = !show; masMenos()"
255 ng-show="articulosFiltro().length > 0" 255 ng-show="articulosFiltro().length > 0"
256 > 256 >
257 <i 257 <i
258 class="fa fa-chevron-down" 258 class="fa fa-chevron-down"
259 ng-hide="show" 259 ng-hide="show"
260 aria-hidden="true" 260 aria-hidden="true"
261 > 261 >
262 </i> 262 </i>
263 <i 263 <i
264 class="fa fa-chevron-up" 264 class="fa fa-chevron-up"
265 ng-show="show" 265 ng-show="show"
266 aria-hidden="true"> 266 aria-hidden="true">
267 </i> 267 </i>
268 </button> 268 </button>
269 </td> 269 </td>
270 </tr> 270 </tr>
271 <!-- FOOTER --> 271 <!-- FOOTER -->
272 <tr class="d-flex"> 272 <tr class="d-flex">
273 <td class="m-auto no-border-top" colspan="2"> 273 <td class="m-auto no-border-top" colspan="2">
274 <strong>Cantidad Items:</strong> 274 <strong>Cantidad Items:</strong>
275 <a ng-bind="articulosFiltro().length"></a> 275 <a ng-bind="articulosFiltro().length"></a>
276 </td> 276 </td>
277 <td class="text-right ml-auto table-celda-total no-border-top"> 277 <td class="text-right ml-auto table-celda-total no-border-top">
278 <h3>Total:</h3> 278 <h3>Total:</h3>
279 </td> 279 </td>
280 <td class="table-celda-total text-right no-border-top"> 280 <td class="table-celda-total text-right no-border-top">
281 <h3>{{getTotal() | currency: notaPedido.cotizacion.moneda.SIMBOLO}}</h3> 281 <h3>{{getTotal() | currency: factura.cotizacion.moneda.SIMBOLO}}</h3>
282 </td> 282 </td>
283 </tr> 283 </tr>
284 </tfoot> 284 </tfoot>
285 </table> 285 </table>
286 </div> 286 </div>
287 </div> 287 </div>
288 </div> 288 </div>
289 </div> 289 </div>
290 <div class="row d-md-none fixed-bottom disable-selection"> 290 <div class="row d-md-none fixed-bottom disable-selection">
291 <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> 291 <div class="w-100 bg-dark d-flex px-3 acciones-mobile">
292 <span class="ml-3 text-muted" ng-click="salir()">Salir</span> 292 <span class="ml-3 text-muted" ng-click="salir()">Salir</span>
293 <span 293 <span
294 class="mr-3 ml-auto" 294 class="mr-3 ml-auto"
295 ng-class="saveLoading ? 'text-muted' : ''" 295 ng-class="saveLoading ? 'text-muted' : ''"
296 ng-click="seleccionarFormaDePago()" 296 ng-click="seleccionarFormaDePago()"
297 ladda="saveLoading" 297 ladda="saveLoading"
298 data-style="expand-left" 298 data-style="expand-left"
299 >Pago</span> 299 >Pago</span>
300 </div> 300 </div>
301 </div> 301 </div>
302 </div> 302 </div>
303 303