foca-modal-remito.html
7.81 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
<div class="modal-header py-1">
<div class="row w-100">
<div class="col-lg-6">
<h5 class="modal-title my-1">Búsqueda de Remito</h5>
</div>
<div class="input-group col-lg-6 pr-0 my-2">
<input
ladda="searchLoading"
type="text"
class="form-control form-control-sm"
placeholder="Razón social"
ng-model="filters"
ng-change="search()"
ng-keydown="busquedaDown($event.keyCode)"
ng-keypress="busquedaPress($event.keyCode)"
foca-focus="selectedRemito == -1"
ng-focus="selectedRemito = -1"
id="search"
teclado-virtual
>
<button
ng-show="filters.length >= 1"
type="button"
class="clear-input"
ng-click="filters = ''"
>
<i class="fa fa-times"></i>
</button>
<div class="input-group-append">
<button
ladda="searchLoading"
data-spinner-color="#FF0000"
class="btn btn-outline-secondary"
type="button"
ng-click="busquedaPress(13)"
>
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
</div>
<div class="modal-body" id="modal-body">
<div class="input-group row">
<small class="col-md-2 col-4 text-left my-1">Fecha Desde</small>
<div class="col-md-4 col-8 input-group mb-3">
<div class="input-group-prepend">
<button
class="input-group-text"
type="button"
ng-click="datepickerOpen = true"
>
<i class="fa fa-calendar"></i>
</button>
</div>
<input
class="form-control form-control-sm"
id="inlineFormInputGroup"
ladda="searchLoading"
type="text"
ng-model="fechaDesde"
ng-required="true"
uib-datepicker-popup="dd/MM/yyyy"
show-button-bar="false"
is-open="datepickerOpen"
on-open-focus="false"
ng-focus="datepickerOpen = true"
/>
</div>
<small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small>
<div class="col-md-4 col-8 input-group mb-3">
<div class="input-group-prepend">
<button
class="input-group-text"
type="button"
ng-click="datepicker2Open = true"
>
<i class="fa fa-calendar"></i>
</button>
</div>
<input
class="form-control form-control-sm"
id="inlineFormInputGroup"
ladda="searchLoading"
type="text"
ng-model="fechaHasta"
ng-required="true"
uib-datepicker-popup="dd/MM/yyyy"
show-button-bar="false"
is-open="datepicker2Open"
on-open-focus="false"
ng-focus="datepicker2Open = true"
/>
</div>
</div>
<table ng-show="primerBusqueda" class="table table-hover table-sm">
<thead>
<tr>
<th>Fecha</th>
<th>Cliente</th>
<th>Comprobante</th>
<th>Importe</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-show="currentPageRemitos.length == 0 && primerBusqueda">
<td colspan="5">
No se encontraron resultados.
</td>
</tr>
<tr class="selectable"
ng-repeat-start="(key, remito) in currentPageRemitos"
>
<td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td>
<td ng-bind="remito.nombreCliente"></td>
<td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td>
<td ng-bind="remito.total | number: 2"></td>
<td>
<button
type="button"
class="fa fa-eye btn-secondary"
ng-click="isCollapsed = !isCollapsed ; verProductos = remito.articulosRemito"
>
</button>
</td>
<td>
<button ng-click="select(remito);"
type="button"
class="btn btn-xs p-1 float-right"
ng-class="{
'btn-secondary': selectedRemito != key,
'btn-primary': selectedRemito == key
}"
foca-focus="selectedRemito == {{key}}"
ng-keydown="itemRemito($event.keyCode)"
>
<i class="fa fa-circle-thin" aria-hidden="true"></i>
</button>
</td>
</tr>
<tr ng-repeat-end uib-collapse="!isCollapsed">
<td colspan="6">
<table class="table table-sm">
<thead>
<tr>
<th>Código</th>
<th>Descripción</th>
<th>Cantidad</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, articulo) in verProductos">
<td>{{articulo.codigo}}</td>
<td>{{articulo.descripcion}}</td>
<td>{{articulo.cantidad}}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer py-1">
<nav ng-show="currentPageRemitos.length > 0 && primerBusqueda" class="mr-auto">
<ul class="pagination pagination-sm justify-content mb-0">
<li class="page-item" ng-class="{'disabled': currentPage == 1}">
<a
class="page-link"
href="javascript:void();"
ng-click="selectPage(currentPage - 1)"
>
<span aria-hidden="true">«</span>
<span class="sr-only">Anterior</span>
</a>
</li>
<li
class="page-item"
ng-repeat="pagina in paginas"
ng-class="{'active': pagina == currentPage}"
>
<a
class="page-link"
href="javascript:void();"
ng-click="selectPage(pagina)"
ng-bind="pagina"
></a>
</li>
<li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
<a
class="page-link"
href="javascript:void();"
ng-click="selectPage(currentPage + 1)"
>
<span aria-hidden="true">»</span>
<span class="sr-only">Siguiente</span>
</a>
</li>
</ul>
</nav>
<button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button>
</div>