Commit 28e5536b245f3c80a28d3d954ad55ce2fa46ccee
1 parent
0b9eab22da
Exists in
master
deshabilito boton en espera
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
src/views/cobranza.html
1 | <div class="crear-nota-pedido foca-crear one-row row"> | 1 | <div class="crear-nota-pedido foca-crear one-row row"> |
2 | <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0 col-lg-12"> | 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0 col-lg-12"> |
3 | <div class="row"> | 3 | <div class="row"> |
4 | <div class="col-md-10 col-lg-12"> | 4 | <div class="col-md-10 col-lg-12"> |
5 | <div class="row panel-informativo"> | 5 | <div class="row panel-informativo"> |
6 | <div class="col-12"> | 6 | <div class="col-12"> |
7 | <div class="row titulares"> | 7 | <div class="row titulares"> |
8 | <div class="col-12 col-sm-3 nota-pedido border border-left-0 border-white align-middle"> | 8 | <div class="col-12 col-sm-3 nota-pedido border border-left-0 border-white align-middle"> |
9 | <h5 class="mb-0">RECIBO DE COBRANZA</h5> | 9 | <h5 class="mb-0">RECIBO DE COBRANZA</h5> |
10 | </div> | 10 | </div> |
11 | <div class="col-12 col-sm-3 numero-pedido text-center text-md-left border border-white align-middle" | 11 | <div class="col-12 col-sm-3 numero-pedido text-center text-md-left border border-white align-middle" |
12 | >Nº {{puntoVenta}}-{{comprobante}} | 12 | >Nº {{puntoVenta}}-{{comprobante}} |
13 | <button | 13 | <button |
14 | class="btn btn-xs btn-outline-light float-right" | 14 | class="btn btn-xs btn-outline-light float-right" |
15 | type="button" | 15 | type="button" |
16 | ng-click="seleccionarCobranza()" | 16 | ng-click="seleccionarCobranza()" |
17 | > | 17 | > |
18 | <i class="fa fa-search"></i> | 18 | <i class="fa fa-search"></i> |
19 | </button> | 19 | </button> |
20 | </div> | 20 | </div> |
21 | <div class="col-7 col-sm-3 border border-white align-middle"> | 21 | <div class="col-7 col-sm-3 border border-white align-middle"> |
22 | Fecha: | 22 | Fecha: |
23 | <span | 23 | <span |
24 | ng-show="!datepickerAbierto" | 24 | ng-show="!datepickerAbierto" |
25 | ng-bind="fecha | date:'dd/MM/yyyy'" | 25 | ng-bind="fecha | date:'dd/MM/yyyy'" |
26 | ng-click="datepickerAbierto = true" | 26 | ng-click="datepickerAbierto = true" |
27 | > | 27 | > |
28 | </span> | 28 | </span> |
29 | <input | 29 | <input |
30 | ng-show="datepickerAbierto" | 30 | ng-show="datepickerAbierto" |
31 | type="date" | 31 | type="date" |
32 | ng-model="fecha" | 32 | ng-model="fecha" |
33 | ng-change="datepickerAbierto = false" | 33 | ng-change="datepickerAbierto = false" |
34 | ng-blur="datepickerAbierto = false" | 34 | ng-blur="datepickerAbierto = false" |
35 | class="form-control form-control-sm col-8 float-right" | 35 | class="form-control form-control-sm col-8 float-right" |
36 | foca-focus="datepickerAbierto" | 36 | foca-focus="datepickerAbierto" |
37 | hasta-hoy | 37 | hasta-hoy |
38 | /> | 38 | /> |
39 | </div> | 39 | </div> |
40 | <div class="col-5 col-sm-3 border border-white border-right-0 align-middle"> | 40 | <div class="col-5 col-sm-3 border border-white border-right-0 align-middle"> |
41 | Hora: | 41 | Hora: |
42 | <span | 42 | <span |
43 | ng-show="!datepickerAbierto" | 43 | ng-show="!datepickerAbierto" |
44 | ng-bind="fecha | date:'HH:mm'" | 44 | ng-bind="fecha | date:'HH:mm'" |
45 | ng-click="datepickerAbierto = true" | 45 | ng-click="datepickerAbierto = true" |
46 | > | 46 | > |
47 | </span> | 47 | </span> |
48 | </div> | 48 | </div> |
49 | </div> | 49 | </div> |
50 | <div class="row py-2"> | 50 | <div class="row py-2"> |
51 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 51 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> |
52 | <span class="label" ng-bind="cab.label"></span> | 52 | <span class="label" ng-bind="cab.label"></span> |
53 | <span class="valor" ng-bind="cab.valor"></span> | 53 | <span class="valor" ng-bind="cab.valor"></span> |
54 | </div> | 54 | </div> |
55 | <a | 55 | <a |
56 | class="btn col-12 btn-secondary d-sm-none" | 56 | class="btn col-12 btn-secondary d-sm-none" |
57 | ng-show="cabecera.length > 0" | 57 | ng-show="cabecera.length > 0" |
58 | ng-click="showCabecera = !showCabecera" | 58 | ng-click="showCabecera = !showCabecera" |
59 | > | 59 | > |
60 | <i | 60 | <i |
61 | class="fa fa-chevron-down" | 61 | class="fa fa-chevron-down" |
62 | ng-hide="showCabecera" | 62 | ng-hide="showCabecera" |
63 | aria-hidden="true" | 63 | aria-hidden="true" |
64 | > | 64 | > |
65 | </i> | 65 | </i> |
66 | <i | 66 | <i |
67 | class="fa fa-chevron-up" | 67 | class="fa fa-chevron-up" |
68 | ng-show="showCabecera" | 68 | ng-show="showCabecera" |
69 | aria-hidden="true"> | 69 | aria-hidden="true"> |
70 | </i> | 70 | </i> |
71 | </a> | 71 | </a> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | </form> | 77 | </form> |
78 | <div class="col-lg-12"> | 78 | <div class="col-lg-12"> |
79 | <div class="row mt-4"> | 79 | <div class="row mt-4"> |
80 | <div class="col-12 col-md-10 border border-light rounded"> | 80 | <div class="col-12 col-md-10 border border-light rounded"> |
81 | <div class="row px-5 py-2 botonera-secundaria"> | 81 | <div class="row px-5 py-2 botonera-secundaria"> |
82 | <div class="col-12"> | 82 | <div class="col-12"> |
83 | <div class="row"> | 83 | <div class="row"> |
84 | <div | 84 | <div |
85 | class="col-6 col-sm-2 px-1 py-1 m-auto m-md-0" | 85 | class="col-6 col-sm-2 px-1 py-1 m-auto m-md-0" |
86 | ng-repeat="boton in botonera" | 86 | ng-repeat="boton in botonera" |
87 | ng-class="{'d-none d-md-grid': boton.texto == ''}"> | 87 | ng-class="{'d-none d-md-grid': boton.texto == ''}"> |
88 | <button | 88 | <button |
89 | type="button" | 89 | type="button" |
90 | class="btn btn-default btn-block btn-xs text-center py-1 rounded border border-light" | 90 | class="btn btn-default btn-block btn-xs text-center py-1 rounded border border-light" |
91 | ng-click="boton.accion()" | 91 | ng-click="boton.accion()" |
92 | ng-class="{'d-sm-block h-100': boton.texto == ''}" | 92 | ng-class="{'d-sm-block h-100': boton.texto == ''}" |
93 | > | 93 | > |
94 | <img src="{{boton.imagen}}" alt="" ng-if="boton.imagen"> | 94 | <img src="{{boton.imagen}}" alt="" ng-if="boton.imagen"> |
95 | <span>{{boton.texto}}</span> | 95 | <span>{{boton.texto}}</span> |
96 | </button> | 96 | </button> |
97 | </div> | 97 | </div> |
98 | </div> | 98 | </div> |
99 | </div> | 99 | </div> |
100 | </div> | 100 | </div> |
101 | <!-- PC --> | 101 | <!-- PC --> |
102 | <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="cobroDeuda"> | 102 | <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="cobroDeuda"> |
103 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | 103 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> |
104 | <thead> | 104 | <thead> |
105 | <tr class="d-flex"> | 105 | <tr class="d-flex"> |
106 | <th class="col-auto">#</th> | 106 | <th class="col-auto">#</th> |
107 | <th class="col">Comprobante</th> | 107 | <th class="col">Comprobante</th> |
108 | <th class="col">Fecha</th> | 108 | <th class="col">Fecha</th> |
109 | <th class="col">Importe</th> | 109 | <th class="col">Importe</th> |
110 | <th class="col-auto"> | 110 | <th class="col-auto"> |
111 | <button | 111 | <button |
112 | class="btn btn-outline-secondary selectable" | 112 | class="btn btn-outline-secondary selectable" |
113 | ng-click="show = !show; masMenos()" | 113 | ng-click="show = !show; masMenos()" |
114 | > | 114 | > |
115 | <i | 115 | <i |
116 | class="fa fa-chevron-down" | 116 | class="fa fa-chevron-down" |
117 | ng-show="show" | 117 | ng-show="show" |
118 | aria-hidden="true" | 118 | aria-hidden="true" |
119 | > | 119 | > |
120 | </i> | 120 | </i> |
121 | <i | 121 | <i |
122 | class="fa fa-chevron-up" | 122 | class="fa fa-chevron-up" |
123 | ng-hide="show" | 123 | ng-hide="show" |
124 | aria-hidden="true"> | 124 | aria-hidden="true"> |
125 | </i> | 125 | </i> |
126 | </button> | 126 | </button> |
127 | </th> | 127 | </th> |
128 | </th> | 128 | </th> |
129 | </tr> | 129 | </tr> |
130 | </thead> | 130 | </thead> |
131 | <tbody class="tabla-articulo-body"> | 131 | <tbody class="tabla-articulo-body"> |
132 | <tr | 132 | <tr |
133 | ng-repeat="(key, factura) in facturaTabla" | 133 | ng-repeat="(key, factura) in facturaTabla" |
134 | class="d-flex" | 134 | class="d-flex" |
135 | ng-show="show || key == facturaTabla.length - 1" | 135 | ng-show="show || key == facturaTabla.length - 1" |
136 | > | 136 | > |
137 | <td ng-bind="key + 1" class="col-auto"></td> | 137 | <td ng-bind="key + 1" class="col-auto"></td> |
138 | <td class="col" ng-bind="factura.numeroFactura" | 138 | <td class="col" ng-bind="factura.numeroFactura" |
139 | ></td> | 139 | ></td> |
140 | <td class="col" ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></td> | 140 | <td class="col" ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></td> |
141 | <td | 141 | <td |
142 | class="col" | 142 | class="col" |
143 | ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | | 143 | ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | |
144 | currency: cobranza.moneda.SIMBOLO : 4"></td> | 144 | currency: cobranza.moneda.SIMBOLO : 4"></td> |
145 | <td class="text-center col-auto"> | 145 | <td class="text-center col-auto"> |
146 | <button | 146 | <button |
147 | class="btn btn-outline-secondary" | 147 | class="btn btn-outline-secondary" |
148 | ng-click="quitarFactura(key)" | 148 | ng-click="quitarFactura(key)" |
149 | > | 149 | > |
150 | <i class="fa fa-trash"></i> | 150 | <i class="fa fa-trash"></i> |
151 | </button> | 151 | </button> |
152 | </td> | 152 | </td> |
153 | </tr> | 153 | </tr> |
154 | </tbody> | 154 | </tbody> |
155 | <tfoot> | 155 | <tfoot> |
156 | <tr ng-show="cargando" class="d-flex"> | 156 | <tr ng-show="cargando" class="d-flex"> |
157 | <td class="col-2 border-top-0"> | 157 | <td class="col-2 border-top-0"> |
158 | <a | 158 | <a |
159 | class="form-control form-control-sm btn btn-secondary" | 159 | class="form-control form-control-sm btn btn-secondary" |
160 | ng-click="seleccionarFactura()" | 160 | ng-click="seleccionarFactura()" |
161 | >Pendientes</a> | 161 | >Pendientes</a> |
162 | </td> | 162 | </td> |
163 | </tr> | 163 | </tr> |
164 | <tr class="d-flex"> | 164 | <tr class="d-flex"> |
165 | <td class="col-auto px-1 border-top-0"> | 165 | <td class="col-auto px-1 border-top-0"> |
166 | <strong>Comprobantes:</strong> | 166 | <strong>Comprobantes:</strong> |
167 | <a ng-bind="facturaTabla.length"></a> | 167 | <a ng-bind="facturaTabla.length"></a> |
168 | </td> | 168 | </td> |
169 | <td class="text-right ml-auto table-celda-total no-border-top"> | 169 | <td class="text-right ml-auto table-celda-total no-border-top"> |
170 | <strong>Cancela:</strong> | 170 | <strong>Cancela:</strong> |
171 | </td> | 171 | </td> |
172 | <td class="table-celda-total text-right no-border-top"> | 172 | <td class="table-celda-total text-right no-border-top"> |
173 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | | 173 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | |
174 | currency: cobranza.moneda.SIMBOLO}}</strong> | 174 | currency: cobranza.moneda.SIMBOLO}}</strong> |
175 | </td> | 175 | </td> |
176 | <td class="text-right ml-auto table-celda-total no-border-top"> | 176 | <td class="text-right ml-auto table-celda-total no-border-top"> |
177 | <strong>Total Cobrado:</strong> | 177 | <strong>Total Cobrado:</strong> |
178 | </td> | 178 | </td> |
179 | <td class="table-celda-total text-right no-border-top"> | 179 | <td class="table-celda-total text-right no-border-top"> |
180 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | | 180 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | |
181 | currency: cobranza.moneda.SIMBOLO}}</strong> | 181 | currency: cobranza.moneda.SIMBOLO}}</strong> |
182 | </td> | 182 | </td> |
183 | <td class="text-right ml-auto table-celda-total no-border-top"> | 183 | <td class="text-right ml-auto table-celda-total no-border-top"> |
184 | <strong>DF:</strong> | 184 | <strong>DF:</strong> |
185 | </td> | 185 | </td> |
186 | <td class="table-celda-total text-right no-border-top mr-1"> | 186 | <td class="table-celda-total text-right no-border-top mr-1"> |
187 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / | 187 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / |
188 | cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} | 188 | cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} |
189 | </strong> | 189 | </strong> |
190 | </td> | 190 | </td> |
191 | </tr> | 191 | </tr> |
192 | </tfoot> | 192 | </tfoot> |
193 | </table> | 193 | </table> |
194 | </div> | 194 | </div> |
195 | <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="!cobroDeuda"> | 195 | <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="!cobroDeuda"> |
196 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | 196 | <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> |
197 | <thead> | 197 | <thead> |
198 | <tr class="d-flex"> | 198 | <tr class="d-flex"> |
199 | <th class="col-auto">#</th> | 199 | <th class="col-auto">#</th> |
200 | <th class="col">Cobro</th> | 200 | <th class="col">Cobro</th> |
201 | <th class="col">Fecha</th> | 201 | <th class="col">Fecha</th> |
202 | <th class="col">Importe</th> | 202 | <th class="col">Importe</th> |
203 | <th class="col-auto"> | 203 | <th class="col-auto"> |
204 | <button | 204 | <button |
205 | class="btn btn-outline-secondary selectable" | 205 | class="btn btn-outline-secondary selectable" |
206 | ng-click="show = !show; masMenos()" | 206 | ng-click="show = !show; masMenos()" |
207 | > | 207 | > |
208 | <i | 208 | <i |
209 | class="fa fa-chevron-down" | 209 | class="fa fa-chevron-down" |
210 | ng-show="show" | 210 | ng-show="show" |
211 | aria-hidden="true" | 211 | aria-hidden="true" |
212 | > | 212 | > |
213 | </i> | 213 | </i> |
214 | <i | 214 | <i |
215 | class="fa fa-chevron-up" | 215 | class="fa fa-chevron-up" |
216 | ng-hide="show" | 216 | ng-hide="show" |
217 | aria-hidden="true"> | 217 | aria-hidden="true"> |
218 | </i> | 218 | </i> |
219 | </button> | 219 | </button> |
220 | </th> | 220 | </th> |
221 | </th> | 221 | </th> |
222 | </tr> | 222 | </tr> |
223 | </thead> | 223 | </thead> |
224 | <tbody class="tabla-articulo-body"> | 224 | <tbody class="tabla-articulo-body"> |
225 | <tr | 225 | <tr |
226 | ng-repeat="(key, cobro) in cobrosTabla" | 226 | ng-repeat="(key, cobro) in cobrosTabla" |
227 | class="d-flex" | 227 | class="d-flex" |
228 | ng-show="show || key == cobrosTabla.length - 1" | 228 | ng-show="show || key == cobrosTabla.length - 1" |
229 | > | 229 | > |
230 | <td ng-bind="key + 1" class="col-auto"></td> | 230 | <td ng-bind="key + 1" class="col-auto"></td> |
231 | <td class="col" ng-bind="cobro.tipo"></td> | 231 | <td class="col" ng-bind="cobro.tipo"></td> |
232 | <td class="col" ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></td> | 232 | <td class="col" ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></td> |
233 | <td | 233 | <td |
234 | class="col" | 234 | class="col" |
235 | ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | | 235 | ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | |
236 | currency: cobranza.moneda.SIMBOLO : 4"></td> | 236 | currency: cobranza.moneda.SIMBOLO : 4"></td> |
237 | <td class="text-center col-auto"> | 237 | <td class="text-center col-auto"> |
238 | <button | 238 | <button |
239 | class="btn btn-outline-secondary" | 239 | class="btn btn-outline-secondary" |
240 | ng-click="quitarCobro(key)" | 240 | ng-click="quitarCobro(key)" |
241 | > | 241 | > |
242 | <i class="fa fa-trash"></i> | 242 | <i class="fa fa-trash"></i> |
243 | </button> | 243 | </button> |
244 | </td> | 244 | </td> |
245 | </tr> | 245 | </tr> |
246 | </tbody> | 246 | </tbody> |
247 | <tfoot> | 247 | <tfoot> |
248 | <tr ng-show="cargando" class="d-flex"> | 248 | <tr ng-show="cargando" class="d-flex"> |
249 | <td class="col-2 border-top-0"> | 249 | <td class="col-2 border-top-0"> |
250 | <a | 250 | <a |
251 | class="form-control form-control-sm btn btn-secondary" | 251 | class="form-control form-control-sm btn btn-secondary" |
252 | ng-click="seleccionarCheque()" | 252 | ng-click="seleccionarCheque()" |
253 | >Cheque</a> | 253 | >Cheque</a> |
254 | </td> | 254 | </td> |
255 | <td class="col-2 border-top-0"> | 255 | <td class="col-2 border-top-0"> |
256 | <a | 256 | <a |
257 | class="form-control form-control-sm btn btn-secondary" | 257 | class="form-control form-control-sm btn btn-secondary" |
258 | ng-click="seleccionarEfectivo()" | 258 | ng-click="seleccionarEfectivo()" |
259 | >Efectivo</a> | 259 | >Efectivo</a> |
260 | </td> | 260 | </td> |
261 | </tr> | 261 | </tr> |
262 | <tr class="d-flex"> | 262 | <tr class="d-flex"> |
263 | <td class="col-auto px-1 border-top-0"> | 263 | <td class="col-auto px-1 border-top-0"> |
264 | <strong>Cobros:</strong> | 264 | <strong>Cobros:</strong> |
265 | <a ng-bind="cobrosTabla.length"></a> | 265 | <a ng-bind="cobrosTabla.length"></a> |
266 | </td> | 266 | </td> |
267 | <td class="text-right ml-auto table-celda-total no-border-top"> | 267 | <td class="text-right ml-auto table-celda-total no-border-top"> |
268 | <strong>Cancela:</strong> | 268 | <strong>Cancela:</strong> |
269 | </td> | 269 | </td> |
270 | <td class="table-celda-total text-right no-border-top"> | 270 | <td class="table-celda-total text-right no-border-top"> |
271 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | | 271 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | |
272 | currency: cobranza.moneda.SIMBOLO}}</strong> | 272 | currency: cobranza.moneda.SIMBOLO}}</strong> |
273 | </td> | 273 | </td> |
274 | <td class="text-right ml-auto table-celda-total no-border-top"> | 274 | <td class="text-right ml-auto table-celda-total no-border-top"> |
275 | <strong>Total Cobrado:</strong> | 275 | <strong>Total Cobrado:</strong> |
276 | </td> | 276 | </td> |
277 | <td class="table-celda-total text-right no-border-top"> | 277 | <td class="table-celda-total text-right no-border-top"> |
278 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | | 278 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | |
279 | currency: cobranza.moneda.SIMBOLO}}</strong> | 279 | currency: cobranza.moneda.SIMBOLO}}</strong> |
280 | </td> | 280 | </td> |
281 | <td class="text-right ml-auto table-celda-total no-border-top"> | 281 | <td class="text-right ml-auto table-celda-total no-border-top"> |
282 | <strong>DF:</strong> | 282 | <strong>DF:</strong> |
283 | </td> | 283 | </td> |
284 | <td class="table-celda-total text-right no-border-top mr-1"> | 284 | <td class="table-celda-total text-right no-border-top mr-1"> |
285 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / | 285 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / |
286 | cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} | 286 | cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} |
287 | </strong> | 287 | </strong> |
288 | </td> | 288 | </td> |
289 | </tr> | 289 | </tr> |
290 | </tfoot> | 290 | </tfoot> |
291 | </table> | 291 | </table> |
292 | </div> | 292 | </div> |
293 | <!-- MOBILE --> | 293 | <!-- MOBILE --> |
294 | <div class="row d-sm-none mb-5"> | 294 | <div class="row d-sm-none mb-5"> |
295 | <!-- FACTURAS --> | 295 | <!-- FACTURAS --> |
296 | <table class="table table-sm table-striped table-dark mb-5" ng-show="cobroDeuda"> | 296 | <table class="table table-sm table-striped table-dark mb-5" ng-show="cobroDeuda"> |
297 | <thead> | 297 | <thead> |
298 | <tr class="d-flex"> | 298 | <tr class="d-flex"> |
299 | <th class="">#</th> | 299 | <th class="">#</th> |
300 | <th class="col px-0"> | 300 | <th class="col px-0"> |
301 | <div class="d-flex"> | 301 | <div class="d-flex"> |
302 | <div class="col-4 px-1">Factura</div> | 302 | <div class="col-4 px-1">Factura</div> |
303 | <div class="col-4 px-1">Fecha</div> | 303 | <div class="col-4 px-1">Fecha</div> |
304 | <div class="col-4 px-1">Importe</div> | 304 | <div class="col-4 px-1">Importe</div> |
305 | </div> | 305 | </div> |
306 | </th> | 306 | </th> |
307 | <th class="text-center tamaño-boton"> | 307 | <th class="text-center tamaño-boton"> |
308 | | 308 | |
309 | </th> | 309 | </th> |
310 | </tr> | 310 | </tr> |
311 | </thead> | 311 | </thead> |
312 | <tbody> | 312 | <tbody> |
313 | <tr | 313 | <tr |
314 | ng-repeat="(key, factura) in facturaTabla" | 314 | ng-repeat="(key, factura) in facturaTabla" |
315 | ng-show="show || key == facturaTabla.length - 1" | 315 | ng-show="show || key == facturaTabla.length - 1" |
316 | > | 316 | > |
317 | <td class="w-100 align-middle d-flex p-0"> | 317 | <td class="w-100 align-middle d-flex p-0"> |
318 | <div class="align-middle p-1"> | 318 | <div class="align-middle p-1"> |
319 | <span ng-bind="key+1" class="align-middle"></span> | 319 | <span ng-bind="key+1" class="align-middle"></span> |
320 | </div> | 320 | </div> |
321 | <div class="col px-0"> | 321 | <div class="col px-0"> |
322 | <div class="d-flex"> | 322 | <div class="d-flex"> |
323 | <div class="col-4 px-1"> | 323 | <div class="col-4 px-1"> |
324 | <span ng-bind="factura.numeroFactura" | 324 | <span ng-bind="factura.numeroFactura" |
325 | ></span> | 325 | ></span> |
326 | </div> | 326 | </div> |
327 | <div class="col-4 px-1"> | 327 | <div class="col-4 px-1"> |
328 | <span ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></span> | 328 | <span ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></span> |
329 | </div> | 329 | </div> |
330 | <div class="col-4 px-1"> | 330 | <div class="col-4 px-1"> |
331 | <span | 331 | <span |
332 | ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | | 332 | ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | |
333 | currency:cobranza.moneda.SIMBOLO : 4"></span> | 333 | currency:cobranza.moneda.SIMBOLO : 4"></span> |
334 | </div> | 334 | </div> |
335 | </div> | 335 | </div> |
336 | </div> | 336 | </div> |
337 | <div class="align-middle p-1"> | 337 | <div class="align-middle p-1"> |
338 | <button | 338 | <button |
339 | class="btn btn-outline-secondary" | 339 | class="btn btn-outline-secondary" |
340 | ng-click="quitarFactura(key)" | 340 | ng-click="quitarFactura(key)" |
341 | > | 341 | > |
342 | <i class="fa fa-trash"></i> | 342 | <i class="fa fa-trash"></i> |
343 | </button> | 343 | </button> |
344 | </div> | 344 | </div> |
345 | </td> | 345 | </td> |
346 | </tr> | 346 | </tr> |
347 | </tbody> | 347 | </tbody> |
348 | <tfoot> | 348 | <tfoot> |
349 | <!-- SELECCIONAR PRODUCTO --> | 349 | <!-- SELECCIONAR PRODUCTO --> |
350 | <tr ng-show="cargando" class="d-flex"> | 350 | <tr ng-show="cargando" class="d-flex"> |
351 | <td class="col-12"> | 351 | <td class="col-12"> |
352 | <input | 352 | <input |
353 | placeholder="Seleccione Factura" | 353 | placeholder="Seleccione Factura" |
354 | class="form-control form-control-sm" | 354 | class="form-control form-control-sm" |
355 | readonly | 355 | readonly |
356 | ng-click="seleccionarFactura()" | 356 | ng-click="seleccionarFactura()" |
357 | /> | 357 | /> |
358 | </td> | 358 | </td> |
359 | </tr> | 359 | </tr> |
360 | <!-- TOOGLE EXPANDIR --> | 360 | <!-- TOOGLE EXPANDIR --> |
361 | <tr> | 361 | <tr> |
362 | <td class="col"> | 362 | <td class="col"> |
363 | <button | 363 | <button |
364 | class="btn btn-outline-secondary selectable w-100" | 364 | class="btn btn-outline-secondary selectable w-100" |
365 | ng-click="show = !show; masMenos()" | 365 | ng-click="show = !show; masMenos()" |
366 | ng-show="facturaTabla.length > 0" | 366 | ng-show="facturaTabla.length > 0" |
367 | > | 367 | > |
368 | <i | 368 | <i |
369 | class="fa fa-chevron-down" | 369 | class="fa fa-chevron-down" |
370 | ng-hide="show" | 370 | ng-hide="show" |
371 | aria-hidden="true" | 371 | aria-hidden="true" |
372 | > | 372 | > |
373 | </i> | 373 | </i> |
374 | <i | 374 | <i |
375 | class="fa fa-chevron-up" | 375 | class="fa fa-chevron-up" |
376 | ng-show="show" | 376 | ng-show="show" |
377 | aria-hidden="true"> | 377 | aria-hidden="true"> |
378 | </i> | 378 | </i> |
379 | </button> | 379 | </button> |
380 | </td> | 380 | </td> |
381 | </tr> | 381 | </tr> |
382 | <!-- FOOTER --> | 382 | <!-- FOOTER --> |
383 | <tr class="d-flex"> | 383 | <tr class="d-flex"> |
384 | <td class="align-middle no-border-top" colspan="2"> | 384 | <td class="align-middle no-border-top" colspan="2"> |
385 | <strong>Cantidad Items:</strong> | 385 | <strong>Cantidad Items:</strong> |
386 | <a ng-bind="facturaTabla.length"></a> | 386 | <a ng-bind="facturaTabla.length"></a> |
387 | </td> | 387 | </td> |
388 | </tr> | 388 | </tr> |
389 | </tfoot> | 389 | </tfoot> |
390 | </table> | 390 | </table> |
391 | <!-- COBROS --> | 391 | <!-- COBROS --> |
392 | <table class="table table-sm table-striped table-dark mb-5" ng-show="!cobroDeuda"> | 392 | <table class="table table-sm table-striped table-dark mb-5" ng-show="!cobroDeuda"> |
393 | <thead> | 393 | <thead> |
394 | <tr class="d-flex"> | 394 | <tr class="d-flex"> |
395 | <th class="">#</th> | 395 | <th class="">#</th> |
396 | <th class="col px-0"> | 396 | <th class="col px-0"> |
397 | <div class="d-flex"> | 397 | <div class="d-flex"> |
398 | <div class="col-4 px-1">Cobro</div> | 398 | <div class="col-4 px-1">Cobro</div> |
399 | <div class="col-4 px-1">Fecha</div> | 399 | <div class="col-4 px-1">Fecha</div> |
400 | <div class="col-4 px-1">Importe</div> | 400 | <div class="col-4 px-1">Importe</div> |
401 | </div> | 401 | </div> |
402 | </th> | 402 | </th> |
403 | <th class="text-center tamaño-boton"> | 403 | <th class="text-center tamaño-boton"> |
404 | | 404 | |
405 | </th> | 405 | </th> |
406 | </tr> | 406 | </tr> |
407 | </thead> | 407 | </thead> |
408 | <tbody> | 408 | <tbody> |
409 | <tr | 409 | <tr |
410 | ng-repeat="(key, cobro) in cobrosTabla" | 410 | ng-repeat="(key, cobro) in cobrosTabla" |
411 | ng-show="show || key == cobrosTabla.length - 1" | 411 | ng-show="show || key == cobrosTabla.length - 1" |
412 | > | 412 | > |
413 | <td class="w-100 align-middle d-flex p-0"> | 413 | <td class="w-100 align-middle d-flex p-0"> |
414 | <div class="align-middle p-1"> | 414 | <div class="align-middle p-1"> |
415 | <span ng-bind="key+1" class="align-middle"></span> | 415 | <span ng-bind="key+1" class="align-middle"></span> |
416 | </div> | 416 | </div> |
417 | <div class="col px-0"> | 417 | <div class="col px-0"> |
418 | <div class="d-flex"> | 418 | <div class="d-flex"> |
419 | <div class="col-4 px-1"> | 419 | <div class="col-4 px-1"> |
420 | <span ng-bind="cobro.tipo" | 420 | <span ng-bind="cobro.tipo" |
421 | ></span> | 421 | ></span> |
422 | </div> | 422 | </div> |
423 | <div class="col-4 px-1"> | 423 | <div class="col-4 px-1"> |
424 | <span ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></span> | 424 | <span ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></span> |
425 | </div> | 425 | </div> |
426 | <div class="col-4 px-1"> | 426 | <div class="col-4 px-1"> |
427 | <span | 427 | <span |
428 | ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | | 428 | ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | |
429 | currency: cobranza.moneda.SIMBOLO : 4"></span> | 429 | currency: cobranza.moneda.SIMBOLO : 4"></span> |
430 | </div> | 430 | </div> |
431 | </div> | 431 | </div> |
432 | </div> | 432 | </div> |
433 | <div class="align-middle p-1"> | 433 | <div class="align-middle p-1"> |
434 | <button | 434 | <button |
435 | class="btn btn-outline-secondary" | 435 | class="btn btn-outline-secondary" |
436 | ng-click="quitarCobro(key)" | 436 | ng-click="quitarCobro(key)" |
437 | > | 437 | > |
438 | <i class="fa fa-trash"></i> | 438 | <i class="fa fa-trash"></i> |
439 | </button> | 439 | </button> |
440 | </div> | 440 | </div> |
441 | </td> | 441 | </td> |
442 | </tr> | 442 | </tr> |
443 | </tbody> | 443 | </tbody> |
444 | <tfoot> | 444 | <tfoot> |
445 | <!-- SELECCIONAR PRODUCTO --> | 445 | <!-- SELECCIONAR PRODUCTO --> |
446 | <tr ng-show="cargando" class="d-flex"> | 446 | <tr ng-show="cargando" class="d-flex"> |
447 | <td class="col-6"> | 447 | <td class="col-6"> |
448 | <input | 448 | <input |
449 | placeholder="Cheque" | 449 | placeholder="Cheque" |
450 | class="form-control form-control-sm" | 450 | class="form-control form-control-sm" |
451 | readonly | 451 | readonly |
452 | ng-click="seleccionarCheque()" | 452 | ng-click="seleccionarCheque()" |
453 | /> | 453 | /> |
454 | </td> | 454 | </td> |
455 | <td class="col-6"> | 455 | <td class="col-6"> |
456 | <input | 456 | <input |
457 | placeholder="Efectivo" | 457 | placeholder="Efectivo" |
458 | class="form-control form-control-sm" | 458 | class="form-control form-control-sm" |
459 | readonly | 459 | readonly |
460 | ng-click="seleccionarEfectivo()" | 460 | ng-click="seleccionarEfectivo()" |
461 | /> | 461 | /> |
462 | </td> | 462 | </td> |
463 | </tr> | 463 | </tr> |
464 | <!-- TOOGLE EXPANDIR --> | 464 | <!-- TOOGLE EXPANDIR --> |
465 | <tr> | 465 | <tr> |
466 | <td class="col"> | 466 | <td class="col"> |
467 | <button | 467 | <button |
468 | class="btn btn-outline-secondary selectable w-100" | 468 | class="btn btn-outline-secondary selectable w-100" |
469 | ng-click="show = !show; masMenos()" | 469 | ng-click="show = !show; masMenos()" |
470 | ng-show="cobrosTabla.length > 0" | 470 | ng-show="cobrosTabla.length > 0" |
471 | > | 471 | > |
472 | <i | 472 | <i |
473 | class="fa fa-chevron-down" | 473 | class="fa fa-chevron-down" |
474 | ng-hide="show" | 474 | ng-hide="show" |
475 | aria-hidden="true" | 475 | aria-hidden="true" |
476 | > | 476 | > |
477 | </i> | 477 | </i> |
478 | <i | 478 | <i |
479 | class="fa fa-chevron-up" | 479 | class="fa fa-chevron-up" |
480 | ng-show="show" | 480 | ng-show="show" |
481 | aria-hidden="true"> | 481 | aria-hidden="true"> |
482 | </i> | 482 | </i> |
483 | </button> | 483 | </button> |
484 | </td> | 484 | </td> |
485 | </tr> | 485 | </tr> |
486 | <!-- FOOTER --> | 486 | <!-- FOOTER --> |
487 | <tr class="d-flex"> | 487 | <tr class="d-flex"> |
488 | <td class="align-middle no-border-top col-6"> | 488 | <td class="align-middle no-border-top col-6"> |
489 | <strong>Cantidad Items:</strong> | 489 | <strong>Cantidad Items:</strong> |
490 | <a ng-bind="cobrosTabla.length"></a> | 490 | <a ng-bind="cobrosTabla.length"></a> |
491 | </td> | 491 | </td> |
492 | </tfoot> | 492 | </tfoot> |
493 | </table> | 493 | </table> |
494 | </tr> | 494 | </tr> |
495 | <!-- DEUDA, COBRADO, DIFERENCIA --> | 495 | <!-- DEUDA, COBRADO, DIFERENCIA --> |
496 | <table class="table-responsive fixed-bottom mb-5"> | 496 | <table class="table-responsive fixed-bottom mb-5"> |
497 | <tr class="d-flex row"> | 497 | <tr class="d-flex row"> |
498 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> | 498 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> |
499 | <strong>Cancela:</strong> | 499 | <strong>Cancela:</strong> |
500 | </td> | 500 | </td> |
501 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> | 501 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> |
502 | <strong>Cobrado:</strong> | 502 | <strong>Cobrado:</strong> |
503 | </td> | 503 | </td> |
504 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> | 504 | <td class="text-center ml-auto table-celda-total no-border-top col-4"> |
505 | <strong>Diferencia:</strong> | 505 | <strong>Diferencia:</strong> |
506 | </td> | 506 | </td> |
507 | <td class="table-celda-total text-center no-border-top col-4"> | 507 | <td class="table-celda-total text-center no-border-top col-4"> |
508 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> | 508 | <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> |
509 | </td> | 509 | </td> |
510 | <td class="table-celda-total text-center no-border-top col-4"> | 510 | <td class="table-celda-total text-center no-border-top col-4"> |
511 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> | 511 | <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> |
512 | </td> | 512 | </td> |
513 | <td class="table-celda-total text-center no-border-top col-4"> | 513 | <td class="table-celda-total text-center no-border-top col-4"> |
514 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> | 514 | <strong>{{((getTotalCobrado() + getTotalDeuda()) / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> |
515 | </td> | 515 | </td> |
516 | </tr> | 516 | </tr> |
517 | </table> | 517 | </table> |
518 | </div> | 518 | </div> |
519 | </div> | 519 | </div> |
520 | <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> | 520 | <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> |
521 | <div class="col-12 mt-auto"> | 521 | <div class="col-12 mt-auto"> |
522 | <button | 522 | <button |
523 | ladda="saveLoading" | ||
524 | data-spinner-color="#FF0000" | ||
525 | ng-click="crearCobranza()" | 523 | ng-click="crearCobranza()" |
526 | title="Crear nota pedido" | 524 | title="Crear nota pedido" |
527 | class="btn btn-default btn-block mb-2 border border-dark" | 525 | class="btn btn-default btn-block mb-2 border border-dark" |
528 | ng-disabled="editando" | 526 | ng-disabled="editando || saveLoading" |
529 | > | 527 | > |
530 | <strong>GUARDAR</strong> | 528 | <strong>GUARDAR</strong> |
531 | </button> | 529 | </button> |
532 | <button | 530 | <button |
533 | type="button" | 531 | type="button" |
534 | title="Salir" | 532 | title="Salir" |
535 | class="btn btn-default btn-block border border-dark"> | 533 | class="btn btn-default btn-block border border-dark"> |
536 | <strong>PAUSAR</strong> | 534 | <strong>PAUSAR</strong> |
537 | </button> | 535 | </button> |
538 | <button | 536 | <button |
539 | ng-click="salir()" | 537 | ng-click="salir()" |
540 | type="button" | 538 | type="button" |
541 | title="Salir" | 539 | title="Salir" |
542 | class="btn btn-default btn-block border border-dark"> | 540 | class="btn btn-default btn-block border border-dark"> |
543 | <strong>SALIR</strong> | 541 | <strong>SALIR</strong> |
544 | </button> | 542 | </button> |
545 | </div> | 543 | </div> |
546 | </div> | 544 | </div> |
547 | </div> | 545 | </div> |
548 | </div> | 546 | </div> |
549 | <div class="row d-md-none fixed-bottom"> | 547 | <div class="row d-md-none fixed-bottom"> |
550 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> | 548 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> |
551 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> | 549 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> |
552 | <span | 550 | <span |
553 | class="mr-3 ml-auto" | 551 | class="mr-3 ml-auto" |
554 | ng-class="saveLoading ? 'text-muted' : ''" | 552 | ng-class="saveLoading ? 'text-muted' : ''" |
555 | ng-click="crearCobranza()" | 553 | ng-click="crearCobranza()" |
556 | ng-show="!editando" | 554 | ng-show="!editando" |
557 | ladda="saveLoading" | 555 | ladda="saveLoading" |
558 | data-style="expand-left" | 556 | data-style="expand-left" |
559 | >Guardar</span> | 557 | >Guardar</span> |
560 | </div> | 558 | </div> |
561 | </div> | 559 | </div> |
562 | </div> | 560 | </div> |
563 | 561 |