nota-pedido.html
13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<div class="crear-nota-pedido">
<form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0">
<div class="row">
<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2">
<div class="row p-1 panel-informativo">
<div class="col-12">
<div class="row">
<div class="col-12 col-sm-4 nota-pedido">
<h5>NOTA DE PEDIDO</h5>
</div>
<div class="col-6 col-sm-4 numero-pedido">Nº {{puntoVenta}}-{{comprobante}}</div>
<div class="col-6 col-sm-4 text-right crear-nota-pedido-fecha">
Fecha:
<span
ng-show="!datepickerAbierto"
ng-bind="now | date:'dd/MM/yyyy HH:mm'"
ng-click="datepickerAbierto = true"
>
</span>
<input
ng-show="datepickerAbierto"
type="date"
ng-model="now"
ng-change="datepickerAbierto = false"
ng-blur="datepickerAbierto = false"
class="form-control form-control-sm col-8 float-right"
foca-focus="datepickerAbierto"
/>
</div>
</div>
<div class="row">
<div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera">
<span class="label" ng-bind="cab.label"></span>
<span class="valor" ng-bind="cab.valor"></span>
</div>
<a
class="btn col-12 btn-secondary d-sm-none"
ng-show="cabecera.length > 0"
ng-click="showCabecera = !showCabecera"
>
<i
class="fa fa-chevron-down"
ng-hide="showCabecera"
aria-hidden="true"
>
</i>
<i
class="fa fa-chevron-up"
ng-show="showCabecera"
aria-hidden="true">
</i>
</a>
</div>
</div>
</div>
<div class="row p-1 botonera-secundaria">
<div class="col-12">
<div class="row">
<div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera">
<button
type="button"
class="btn btn-default btn-block btn-xs text-left py-2"
ng-click="boton.accion()"
ng-class="{'d-none d-sm-block': boton.texto == ''}"
>
<i
class="fa fa-arrow-circle-right"
ng-show="boton.texto != ''"
></i>
{{boton.texto}}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2">
<!-- PC -->
<div class="row grilla-articulo align-items-end">
<table class="table tabla-articulo table-striped table-sm table-dark mb-0">
<thead>
<tr class="d-flex">
<th class="">#</th>
<th class="col">Código</th>
<th class="col-4">Descripción</th>
<th class="col text-right">Cantidad</th>
<th class="col text-right">Precio Unitario</th>
<th class="col text-right">SubTotal</th>
<th class="text-right">
<button
class="btn btn-outline-secondary selectable"
ng-click="show = !show; masMenos()"
>
<i
class="fa fa-chevron-down"
ng-show="show"
aria-hidden="true"
>
</i>
<i
class="fa fa-chevron-up"
ng-hide="show"
aria-hidden="true">
</i>
</button>
</th>
</tr>
</thead>
<tbody class="tabla-articulo-body">
<tr
ng-repeat="(key, articulo) in articulosTabla"
ng-show="show || key == (articulosTabla.length - 1)"
class="d-flex"
>
<td ng-bind="key + 1"></td>
<td
class="col"
ng-bind="articulo.sector + '-' + articulo.codigo"
></td>
<td
class="col-4"
ng-bind="articulo.descripcion"
></td>
<td class="col text-right">
<input
ng-show="articulo.edit"
ng-model="articulo.cantidad"
class="form-control"
type="number"
min="1"
foca-focus="articulo.edit"
ng-keypress="editarArticulo($event.keyCode, articulo)"
ng-focus="selectFocus($event)"
>
<i
class="selectable"
ng-click="cambioEdit(articulo)"
ng-hide="articulo.edit"
ng-bind="articulo.cantidad">
</i>
</td>
<td
class="col text-right"
ng-bind="articulo.precio | currency: '$'"
></td>
<td
class="col text-right"
ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'">
</td>
<td class="text-center">
<button
class="btn btn-outline-secondary"
ng-click="quitarArticulo(key)"
>
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
</tbody>
<tfoot>
<tr ng-show="!cargando" class="d-flex">
<td
class="align-middle"
ng-bind="articulosTabla.length + 1"
></td>
<td class="col">
<input
class="form-control"
ng-model="articuloACargar.sectorCodigo"
readonly
>
</td>
<td class="col-4 tabla-articulo-descripcion">
<input
class="form-control"
ng-model="articuloACargar.descripcion"
readonly
>
</td>
<td class="col text-right">
<input
class="form-control"
type="number"
min="1"
ng-model="articuloACargar.cantidad"
foca-focus="!cargando"
esc-key="resetFilter()"
ng-keypress="agregarATabla($event.keyCode)"
>
</td>
<td class="col text-right">
<input
class="form-control"
ng-value="articuloACargar.precio | currency: '$'"
readonly
>
</td>
<td class="col text-right">
<input
class="form-control"
ng-value="getSubTotal() | currency: '$'"
readonly
></td>
<td class="text-center align-middle">
<button
class="btn btn-outline-secondary"
ng-click="agregarATabla(13)"
>
<i class="fa fa-save"></i>
</button>
</td>
</tr>
<tr ng-show="cargando" class="d-flex">
<td colspan="7" class="col-12">
<input
placeholder="Seleccione Articulo"
class="form-control form-control-sm"
readonly
ng-click="seleccionarArticulo()"
/>
</td>
</tr>
<tr class="d-flex">
<td colspan="4">
<strong>Cantidad Items:</strong>
<a ng-bind="articulosTabla.length"></a>
</td>
<td class="text-right ml-auto table-celda-total"><h3>Total:</h3></td>
<td class="table-celda-total text-right" colspan="1">
<h3>{{getTotal() | currency: '$'}}</h3>
</td>
<td class="text-right">
<button
type="button"
class="btn btn-default btn-sm"
>
Totales
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="col-auto my-2 col-lg-2 botonera-lateral">
<div class="row align-items-end">
<div class="col-12">
<button
ng-click="crearNotaPedido()"
type="submit"
title="Crear nota pedido"
class="btn btn-default btn-block mb-2">
Guardar
</button>
<button
ng-click="salir()"
type="button"
title="Salir"
class="btn btn-default btn-block">
Salir
</button>
</div>
</div>
</div>
</div>
</div>