Commit 275df735ff3405460b8e12946982aea9a13ed32f
Exists in
master
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-crear-remito!1
Showing
4 changed files
Show diff stats
README.md
1 | foca-crear-remito | ||
1 | # foca-crear-remito | ||
2 | |||
3 | Formulario para creación de remito |
src/js/route.js
1 | angular.module('focaCrearRemito') | 1 | angular.module('focaCrearRemito') |
2 | .config(['$routeProvider', function($routeProvider) { | 2 | .config(['$routeProvider', function($routeProvider) { |
3 | $routeProvider.when('/venta-nota-remito/crear', { | 3 | $routeProvider.when('/venta-remito/crear', { |
4 | controller: 'remitoController', | 4 | controller: 'remitoController', |
5 | templateUrl: 'src/views/nota-remito.html' | 5 | templateUrl: 'src/views/remito.html' |
6 | }); | 6 | }); |
7 | }]); | 7 | }]); |
8 | 8 |
src/js/service.js
1 | angular.module('focaCrearRemito') | 1 | angular.module('focaCrearRemito') |
2 | .service('crearRemitoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | 2 | .service('crearRemitoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { |
3 | var route = API_ENDPOINT.URL; | 3 | var route = API_ENDPOINT.URL; |
4 | return { | 4 | return { |
5 | crearRemito: function(remito) { | 5 | crearRemito: function(remito) { |
6 | return $http.post(route + '/nota-remito', {remito: remito}); | 6 | // TODO: Cambiar para usar el servicio /remito |
7 | return $http.post(route + '/nota-pedido', {remito: remito}); | ||
7 | }, | 8 | }, |
8 | obtenerRemito: function() { | 9 | obtenerRemito: function() { |
9 | return $http.get(route +'/nota-remito'); | 10 | return $http.get(route +'/nota-pedido'); |
10 | }, | 11 | }, |
11 | setRemito: function(remito) { | 12 | setRemito: function(remito) { |
12 | this.remito = remito; | 13 | this.remito = remito; |
13 | }, | 14 | }, |
14 | clearRemito: function() { | 15 | clearRemito: function() { |
15 | this.remito = undefined; | 16 | this.remito = undefined; |
16 | }, | 17 | }, |
17 | getRemito: function() { | 18 | getRemito: function() { |
18 | return this.remito; | 19 | return this.remito; |
19 | }, | 20 | }, |
20 | getArticulosByIdRemito: function(id) { | 21 | getArticulosByIdRemito: function(id) { |
21 | return $http.get(route+'/articulos/nota-remito/'+id); | 22 | return $http.get(route+'/articulos/nota-pedido/'+id); |
22 | }, | 23 | }, |
23 | crearArticulosParaRemito: function(articuloRemito) { | 24 | crearArticulosParaRemito: function(articuloRemito) { |
24 | return $http.post(route + '/articulos/nota-remito', | 25 | return $http.post(route + '/articulos/nota-pedido', |
25 | {articuloRemito: articuloRemito}); | 26 | {articuloRemito: articuloRemito}); |
26 | }, | 27 | }, |
27 | getDomiciliosByIdRemito: function(id) { | 28 | getDomiciliosByIdRemito: function(id) { |
28 | return $http.get(route +'/nota-remito/'+id+'/domicilios'); | 29 | return $http.get(route +'/nota-pedido/'+id+'/domicilios'); |
29 | }, | 30 | }, |
30 | getDomiciliosByIdCliente: function(id) { | 31 | getDomiciliosByIdCliente: function(id) { |
31 | var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) | 32 | var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) |
32 | return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); | 33 | return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); |
33 | }, | 34 | }, |
34 | getPrecioCondicion: function() { | 35 | getPrecioCondicion: function() { |
35 | return $http.get(route + '/precio-condicion'); | 36 | return $http.get(route + '/precio-condicion'); |
36 | }, | 37 | }, |
37 | getPrecioCondicionById: function(id) { | 38 | getPrecioCondicionById: function(id) { |
38 | return $http.get(route + '/precio-condicion/' + id); | 39 | return $http.get(route + '/precio-condicion/' + id); |
39 | }, | 40 | }, |
40 | getPlazoPagoByPrecioCondicion: function(id) { | 41 | getPlazoPagoByPrecioCondicion: function(id) { |
41 | return $http.get(route + '/plazo-pago/precio-condicion/'+ id); | 42 | return $http.get(route + '/plazo-pago/precio-condicion/'+ id); |
42 | }, | 43 | }, |
43 | crearFlete: function(flete) { | 44 | crearFlete: function(flete) { |
44 | return $http.post(route + '/flete', {flete : flete}); | 45 | return $http.post(route + '/flete', {flete : flete}); |
45 | }, | 46 | }, |
46 | crearPlazosParaRemito: function(plazos) { | 47 | crearPlazosParaRemito: function(plazos) { |
47 | return $http.post(route + '/plazo-pago/nota-remito', plazos); | 48 | return $http.post(route + '/plazo-pago/nota-pedido', plazos); |
48 | }, | 49 | }, |
49 | getCotizacionByIdMoneda: function(id) { | 50 | getCotizacionByIdMoneda: function(id) { |
50 | return $http.get(route + '/moneda/' + id); | 51 | return $http.get(route + '/moneda/' + id); |
51 | }, | 52 | }, |
52 | crearEstadoParaRemito: function(estado) { | 53 | crearEstadoParaRemito: function(estado) { |
53 | return $http.post(route + '/estado', {estado: estado}); | 54 | return $http.post(route + '/estado', {estado: estado}); |
54 | } | 55 | } |
55 | }; | 56 | }; |
56 | }]); | 57 | }]); |
57 | 58 |
src/views/remito.html
1 | <div class="crear-nota-remito"> | 1 | <div class="crear-nota-remito"> |
2 | <form name="formCrearNota" ng-submit="crearRemito()" class="mb-0"> | 2 | <form name="formCrearNota" ng-submit="crearRemito()" class="mb-0"> |
3 | <div class="row"> | 3 | <div class="row"> |
4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | 4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> |
5 | <div class="row p-1 panel-informativo"> | 5 | <div class="row p-1 panel-informativo"> |
6 | <div class="col-12"> | 6 | <div class="col-12"> |
7 | <div class="row"> | 7 | <div class="row"> |
8 | <div class="col-12 col-sm-4 nota-remito"> | 8 | <div class="col-12 col-sm-4 nota-remito"> |
9 | <h5>REMITO</h5> | 9 | <h5>REMITO</h5> |
10 | </div> | 10 | </div> |
11 | <div class="col-5 col-sm-4 numero-remito" | 11 | <div class="col-5 col-sm-4 numero-remito" |
12 | >Nº {{puntoVenta}}-{{comprobante}} | 12 | > |
13 | Nº {{puntoVenta}}-{{comprobante}} | ||
14 | <button | ||
15 | class="btn btn-xs" | ||
16 | type="button" | ||
17 | ng-click="buscarNotaPedido()" | ||
18 | > | ||
19 | <i class="fa fa-search"></i> | ||
20 | </button> | ||
13 | </div> | 21 | </div> |
14 | <div class="col-7 col-sm-4 text-right"> | 22 | <div class="col-7 col-sm-4 text-right"> |
15 | Fecha: | 23 | Fecha: |
16 | <span | 24 | <span |
17 | ng-show="!datepickerAbierto" | 25 | ng-show="!datepickerAbierto" |
18 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" | 26 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" |
19 | ng-click="datepickerAbierto = true" | 27 | ng-click="datepickerAbierto = true" |
20 | > | 28 | > |
21 | </span> | 29 | </span> |
22 | <input | 30 | <input |
23 | ng-show="datepickerAbierto" | 31 | ng-show="datepickerAbierto" |
24 | type="date" | 32 | type="date" |
25 | ng-model="now" | 33 | ng-model="now" |
26 | ng-change="datepickerAbierto = false" | 34 | ng-change="datepickerAbierto = false" |
27 | ng-blur="datepickerAbierto = false" | 35 | ng-blur="datepickerAbierto = false" |
28 | class="form-control form-control-sm col-8 float-right" | 36 | class="form-control form-control-sm col-8 float-right" |
29 | foca-focus="datepickerAbierto" | 37 | foca-focus="datepickerAbierto" |
30 | hasta-hoy | 38 | hasta-hoy |
31 | /> | 39 | /> |
32 | </div> | 40 | </div> |
33 | </div> | 41 | </div> |
34 | <div class="row"> | 42 | <div class="row"> |
35 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 43 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> |
36 | <span class="label" ng-bind="cab.label"></span> | 44 | <span class="label" ng-bind="cab.label"></span> |
37 | <span class="valor" ng-bind="cab.valor"></span> | 45 | <span class="valor" ng-bind="cab.valor"></span> |
38 | </div> | 46 | </div> |
39 | <a | 47 | <a |
40 | class="btn col-12 btn-secondary d-sm-none" | 48 | class="btn col-12 btn-secondary d-sm-none" |
41 | ng-show="cabecera.length > 0" | 49 | ng-show="cabecera.length > 0" |
42 | ng-click="showCabecera = !showCabecera" | 50 | ng-click="showCabecera = !showCabecera" |
43 | > | 51 | > |
44 | <i | 52 | <i |
45 | class="fa fa-chevron-down" | 53 | class="fa fa-chevron-down" |
46 | ng-hide="showCabecera" | 54 | ng-hide="showCabecera" |
47 | aria-hidden="true" | 55 | aria-hidden="true" |
48 | > | 56 | > |
49 | </i> | 57 | </i> |
50 | <i | 58 | <i |
51 | class="fa fa-chevron-up" | 59 | class="fa fa-chevron-up" |
52 | ng-show="showCabecera" | 60 | ng-show="showCabecera" |
53 | aria-hidden="true"> | 61 | aria-hidden="true"> |
54 | </i> | 62 | </i> |
55 | </a> | 63 | </a> |
56 | </div> | 64 | </div> |
57 | </div> | 65 | </div> |
58 | </div> | 66 | </div> |
59 | <div class="row p-1 botonera-secundaria"> | 67 | <div class="row p-1 botonera-secundaria"> |
60 | <div class="col-12"> | 68 | <div class="col-12"> |
61 | <div class="row"> | 69 | <div class="row"> |
62 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | 70 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> |
63 | <button | 71 | <button |
64 | type="button" | 72 | type="button" |
65 | class="btn btn-default btn-block btn-xs text-left py-2" | 73 | class="btn btn-default btn-block btn-xs text-left py-2" |
66 | ng-click="boton.accion()" | 74 | ng-click="boton.accion()" |
67 | ng-class="{'d-none d-sm-block': boton.texto == ''}" | 75 | ng-class="{'d-none d-sm-block': boton.texto == ''}" |
68 | > | 76 | > |
69 | <i | 77 | <i |
70 | class="fa fa-arrow-circle-right" | 78 | class="fa fa-arrow-circle-right" |
71 | ng-show="boton.texto != ''" | 79 | ng-show="boton.texto != ''" |
72 | ></i> | 80 | ></i> |
73 | | 81 | |
74 | {{boton.texto}} | 82 | {{boton.texto}} |
75 | </button> | 83 | </button> |
76 | </div> | 84 | </div> |
77 | </div> | 85 | </div> |
78 | </div> | 86 | </div> |
79 | </div> | 87 | </div> |
80 | </div> | 88 | </div> |
81 | </div> | 89 | </div> |
82 | </form> | 90 | </form> |
83 | <div class="row"> | 91 | <div class="row"> |
84 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 92 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
85 | <!-- PC --> | 93 | <!-- PC --> |
86 | <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | 94 | <div class="row grilla-articulo align-items-end d-none d-sm-flex"> |
87 | <table class="table tabla-articulo table-striped table-sm table-dark"> | 95 | <table class="table tabla-articulo table-striped table-sm table-dark"> |
88 | <thead> | 96 | <thead> |
89 | <tr class="d-flex"> | 97 | <tr class="d-flex"> |
90 | <th class="">#</th> | 98 | <th class="">#</th> |
91 | <th class="col">Código</th> | 99 | <th class="col">Código</th> |
92 | <th class="col-4">Descripción</th> | 100 | <th class="col-4">Descripción</th> |
93 | <th class="col text-right">Cantidad</th> | 101 | <th class="col text-right">Cantidad</th> |
94 | <th class="col text-right">Precio Unitario</th> | 102 | <th class="col text-right">Precio Unitario</th> |
95 | <th class="col text-right">SubTotal</th> | 103 | <th class="col text-right">SubTotal</th> |
96 | <th class="text-right"> | 104 | <th class="text-right"> |
97 | <button | 105 | <button |
98 | class="btn btn-outline-secondary selectable" | 106 | class="btn btn-outline-secondary selectable" |
99 | ng-click="show = !show; masMenos()" | 107 | ng-click="show = !show; masMenos()" |
100 | > | 108 | > |
101 | <i | 109 | <i |
102 | class="fa fa-chevron-down" | 110 | class="fa fa-chevron-down" |
103 | ng-show="show" | 111 | ng-show="show" |
104 | aria-hidden="true" | 112 | aria-hidden="true" |
105 | > | 113 | > |
106 | </i> | 114 | </i> |
107 | <i | 115 | <i |
108 | class="fa fa-chevron-up" | 116 | class="fa fa-chevron-up" |
109 | ng-hide="show" | 117 | ng-hide="show" |
110 | aria-hidden="true"> | 118 | aria-hidden="true"> |
111 | </i> | 119 | </i> |
112 | </button> | 120 | </button> |
113 | </th> | 121 | </th> |
114 | </tr> | 122 | </tr> |
115 | </thead> | 123 | </thead> |
116 | <tbody class="tabla-articulo-body"> | 124 | <tbody class="tabla-articulo-body"> |
117 | <tr | 125 | <tr |
118 | ng-repeat="(key, articulo) in articulosTabla" | 126 | ng-repeat="(key, articulo) in articulosTabla" |
119 | ng-show="show || key == (articulosTabla.length - 1)" | 127 | ng-show="show || key == (articulosTabla.length - 1)" |
120 | class="d-flex" | 128 | class="d-flex" |
121 | > | 129 | > |
122 | <td ng-bind="key + 1"></td> | 130 | <td ng-bind="key + 1"></td> |
123 | <td | 131 | <td |
124 | class="col" | 132 | class="col" |
125 | ng-bind="articulo.sector + '-' + articulo.codigo" | 133 | ng-bind="articulo.sector + '-' + articulo.codigo" |
126 | ></td> | 134 | ></td> |
127 | <td | 135 | <td |
128 | class="col-4" | 136 | class="col-4" |
129 | ng-bind="articulo.descripcion" | 137 | ng-bind="articulo.descripcion" |
130 | ></td> | 138 | ></td> |
131 | <td class="col text-right"> | 139 | <td class="col text-right"> |
132 | <input | 140 | <input |
133 | ng-show="articulo.editCantidad" | 141 | ng-show="articulo.editCantidad" |
134 | ng-model="articulo.cantidad" | 142 | ng-model="articulo.cantidad" |
135 | class="form-control" | 143 | class="form-control" |
136 | type="number" | 144 | type="number" |
137 | min="1" | 145 | min="1" |
138 | foca-focus="articulo.editCantidad" | 146 | foca-focus="articulo.editCantidad" |
139 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 147 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
140 | ng-focus="selectFocus($event)" | 148 | ng-focus="selectFocus($event)" |
141 | > | 149 | > |
142 | <i | 150 | <i |
143 | class="selectable" | 151 | class="selectable" |
144 | ng-click="cambioEdit(articulo, 'cantidad')" | 152 | ng-click="cambioEdit(articulo, 'cantidad')" |
145 | ng-hide="articulo.editCantidad" | 153 | ng-hide="articulo.editCantidad" |
146 | ng-bind="articulo.cantidad"> | 154 | ng-bind="articulo.cantidad"> |
147 | </i> | 155 | </i> |
148 | </td> | 156 | </td> |
149 | <td class="col text-right"> | 157 | <td class="col text-right"> |
150 | <input | 158 | <input |
151 | ng-show="articulo.editPrecio" | 159 | ng-show="articulo.editPrecio" |
152 | ng-model="articulo.precio" | 160 | ng-model="articulo.precio" |
153 | class="form-control" | 161 | class="form-control" |
154 | type="number" | 162 | type="number" |
155 | min="1" | 163 | min="1" |
156 | step="0.0001" | 164 | step="0.0001" |
157 | foca-focus="articulo.editPrecio" | 165 | foca-focus="articulo.editPrecio" |
158 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 166 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
159 | ng-focus="selectFocus($event)" | 167 | ng-focus="selectFocus($event)" |
160 | > | 168 | > |
161 | <i | 169 | <i |
162 | class="selectable" | 170 | class="selectable" |
163 | ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" | 171 | ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" |
164 | ng-hide="articulo.editPrecio" | 172 | ng-hide="articulo.editPrecio" |
165 | ng-bind="articulo.precio | currency: remito.moneda.simbolo : 4"> | 173 | ng-bind="articulo.precio | currency: remito.moneda.simbolo : 4"> |
166 | </i> | 174 | </i> |
167 | </td> | 175 | </td> |
168 | <td | 176 | <td |
169 | class="col text-right" | 177 | class="col text-right" |
170 | ng-bind="(articulo.precio * articulo.cantidad) | currency: remito.moneda.simbolo"> | 178 | ng-bind="(articulo.precio * articulo.cantidad) | currency: remito.moneda.simbolo"> |
171 | </td> | 179 | </td> |
172 | <td class="text-center"> | 180 | <td class="text-center"> |
173 | <button | 181 | <button |
174 | class="btn btn-outline-secondary" | 182 | class="btn btn-outline-secondary" |
175 | ng-click="quitarArticulo(key)" | 183 | ng-click="quitarArticulo(key)" |
176 | > | 184 | > |
177 | <i class="fa fa-trash"></i> | 185 | <i class="fa fa-trash"></i> |
178 | </button> | 186 | </button> |
179 | </td> | 187 | </td> |
180 | </tr> | 188 | </tr> |
181 | </tbody> | 189 | </tbody> |
182 | <tfoot> | 190 | <tfoot> |
183 | <tr ng-show="!cargando" class="d-flex"> | 191 | <tr ng-show="!cargando" class="d-flex"> |
184 | <td | 192 | <td |
185 | class="align-middle" | 193 | class="align-middle" |
186 | ng-bind="articulosTabla.length + 1" | 194 | ng-bind="articulosTabla.length + 1" |
187 | ></td> | 195 | ></td> |
188 | <td class="col"> | 196 | <td class="col"> |
189 | <input | 197 | <input |
190 | class="form-control" | 198 | class="form-control" |
191 | ng-model="articuloACargar.sectorCodigo" | 199 | ng-model="articuloACargar.sectorCodigo" |
192 | readonly | 200 | readonly |
193 | > | 201 | > |
194 | </td> | 202 | </td> |
195 | <td class="col-4 tabla-articulo-descripcion"> | 203 | <td class="col-4 tabla-articulo-descripcion"> |
196 | <input | 204 | <input |
197 | class="form-control" | 205 | class="form-control" |
198 | ng-model="articuloACargar.descripcion" | 206 | ng-model="articuloACargar.descripcion" |
199 | readonly | 207 | readonly |
200 | > | 208 | > |
201 | </td> | 209 | </td> |
202 | <td class="col text-right"> | 210 | <td class="col text-right"> |
203 | <input | 211 | <input |
204 | class="form-control" | 212 | class="form-control" |
205 | type="number" | 213 | type="number" |
206 | min="1" | 214 | min="1" |
207 | ng-model="articuloACargar.cantidad" | 215 | ng-model="articuloACargar.cantidad" |
208 | foca-focus="!cargando" | 216 | foca-focus="!cargando" |
209 | esc-key="resetFilter()" | 217 | esc-key="resetFilter()" |
210 | ng-keypress="agregarATabla($event.keyCode)" | 218 | ng-keypress="agregarATabla($event.keyCode)" |
211 | > | 219 | > |
212 | </td> | 220 | </td> |
213 | <td class="col text-right"> | 221 | <td class="col text-right"> |
214 | <input | 222 | <input |
215 | class="form-control" | 223 | class="form-control" |
216 | ng-value="articuloACargar.precio | currency: remito.moneda.simbolo : 4" | 224 | ng-value="articuloACargar.precio | currency: remito.moneda.simbolo : 4" |
217 | ng-show="idLista != -1" | 225 | ng-show="idLista != -1" |
218 | readonly | 226 | readonly |
219 | > | 227 | > |
220 | <input | 228 | <input |
221 | class="form-control" | 229 | class="form-control" |
222 | type="number" | 230 | type="number" |
223 | step="0.0001" | 231 | step="0.0001" |
224 | ng-model="articuloACargar.precio" | 232 | ng-model="articuloACargar.precio" |
225 | esc-key="resetFilter()" | 233 | esc-key="resetFilter()" |
226 | ng-keypress="agregarATabla($event.keyCode)" | 234 | ng-keypress="agregarATabla($event.keyCode)" |
227 | ng-show="idLista == -1" | 235 | ng-show="idLista == -1" |
228 | > | 236 | > |
229 | </td> | 237 | </td> |
230 | <td class="col text-right"> | 238 | <td class="col text-right"> |
231 | <input | 239 | <input |
232 | class="form-control" | 240 | class="form-control" |
233 | ng-value="getSubTotal() | currency: remito.moneda.simbolo" | 241 | ng-value="getSubTotal() | currency: remito.moneda.simbolo" |
234 | readonly | 242 | readonly |
235 | ></td> | 243 | ></td> |
236 | <td class="text-center align-middle"> | 244 | <td class="text-center align-middle"> |
237 | <button | 245 | <button |
238 | class="btn btn-outline-secondary" | 246 | class="btn btn-outline-secondary" |
239 | ng-click="agregarATabla(13)" | 247 | ng-click="agregarATabla(13)" |
240 | > | 248 | > |
241 | <i class="fa fa-save"></i> | 249 | <i class="fa fa-save"></i> |
242 | </button> | 250 | </button> |
243 | </td> | 251 | </td> |
244 | </tr> | 252 | </tr> |
245 | <tr ng-show="cargando" class="d-flex"> | 253 | <tr ng-show="cargando" class="d-flex"> |
246 | <td colspan="7" class="col-12"> | 254 | <td colspan="7" class="col-12"> |
247 | <input | 255 | <input |
248 | placeholder="Seleccione Articulo" | 256 | placeholder="Seleccione Articulo" |
249 | class="form-control form-control-sm" | 257 | class="form-control form-control-sm" |
250 | readonly | 258 | readonly |
251 | ng-click="seleccionarArticulo()" | 259 | ng-click="seleccionarArticulo()" |
252 | /> | 260 | /> |
253 | </td> | 261 | </td> |
254 | </tr> | 262 | </tr> |
255 | <tr class="d-flex"> | 263 | <tr class="d-flex"> |
256 | <td colspan="4" class="no-border-top"> | 264 | <td colspan="4" class="no-border-top"> |
257 | <strong>Items:</strong> | 265 | <strong>Items:</strong> |
258 | <a ng-bind="articulosTabla.length"></a> | 266 | <a ng-bind="articulosTabla.length"></a> |
259 | </td> | 267 | </td> |
260 | <td class="text-right ml-auto table-celda-total no-border-top"> | 268 | <td class="text-right ml-auto table-celda-total no-border-top"> |
261 | <h3>Total:</h3> | 269 | <h3>Total:</h3> |
262 | </td> | 270 | </td> |
263 | <td class="table-celda-total text-right no-border-top" colspan="1"> | 271 | <td class="table-celda-total text-right no-border-top" colspan="1"> |
264 | <h3>{{getTotal() | currency: remito.moneda.simbolo}}</h3> | 272 | <h3>{{getTotal() | currency: remito.moneda.simbolo}}</h3> |
265 | </td> | 273 | </td> |
266 | <td class="text-right no-border-top"> | 274 | <td class="text-right no-border-top"> |
267 | <button | 275 | <button |
268 | type="button" | 276 | type="button" |
269 | class="btn btn-default btn-sm" | 277 | class="btn btn-default btn-sm" |
270 | > | 278 | > |
271 | Totales | 279 | Totales |
272 | </button> | 280 | </button> |
273 | </td> | 281 | </td> |
274 | </tr> | 282 | </tr> |
275 | </tfoot> | 283 | </tfoot> |
276 | </table> | 284 | </table> |
277 | </div> | 285 | </div> |
278 | 286 | ||
279 | <!-- MOBILE --> | 287 | <!-- MOBILE --> |
280 | <div class="row d-sm-none"> | 288 | <div class="row d-sm-none"> |
281 | <table class="table table-sm table-striped table-dark margin-bottom-mobile"> | 289 | <table class="table table-sm table-striped table-dark margin-bottom-mobile"> |
282 | <thead> | 290 | <thead> |
283 | <tr class="d-flex"> | 291 | <tr class="d-flex"> |
284 | <th class="">#</th> | 292 | <th class="">#</th> |
285 | <th class="col px-0"> | 293 | <th class="col px-0"> |
286 | <div class="d-flex"> | 294 | <div class="d-flex"> |
287 | <div class="col-4 px-1">Código</div> | 295 | <div class="col-4 px-1">Código</div> |
288 | <div class="col-8 px-1">Descripción</div> | 296 | <div class="col-8 px-1">Descripción</div> |
289 | </div> | 297 | </div> |
290 | <div class="d-flex"> | 298 | <div class="d-flex"> |
291 | <div class="col-3 px-1">Cantidad</div> | 299 | <div class="col-3 px-1">Cantidad</div> |
292 | <div class="col px-1 text-right">P. Uni.</div> | 300 | <div class="col px-1 text-right">P. Uni.</div> |
293 | <div class="col px-1 text-right">Subtotal</div> | 301 | <div class="col px-1 text-right">Subtotal</div> |
294 | </div> | 302 | </div> |
295 | </th> | 303 | </th> |
296 | <th class="text-center tamaño-boton"> | 304 | <th class="text-center tamaño-boton"> |
297 | | 305 | |
298 | </th> | 306 | </th> |
299 | </tr> | 307 | </tr> |
300 | </thead> | 308 | </thead> |
301 | <tbody> | 309 | <tbody> |
302 | <tr | 310 | <tr |
303 | ng-repeat="(key, articulo) in articulosTabla" | 311 | ng-repeat="(key, articulo) in articulosTabla" |
304 | ng-show="show || key == articulosTabla.length - 1" | 312 | ng-show="show || key == articulosTabla.length - 1" |
305 | > | 313 | > |
306 | <td class="w-100 align-middle d-flex p-0"> | 314 | <td class="w-100 align-middle d-flex p-0"> |
307 | <div class="align-middle p-1"> | 315 | <div class="align-middle p-1"> |
308 | <span ng-bind="key+1" class="align-middle"></span> | 316 | <span ng-bind="key+1" class="align-middle"></span> |
309 | </div> | 317 | </div> |
310 | <div class="col px-0"> | 318 | <div class="col px-0"> |
311 | <div class="d-flex"> | 319 | <div class="d-flex"> |
312 | <div class="col-4 px-1"> | 320 | <div class="col-4 px-1"> |
313 | <span | 321 | <span |
314 | ng-bind="articulo.sector + '-' + articulo.codigo" | 322 | ng-bind="articulo.sector + '-' + articulo.codigo" |
315 | ></span> | 323 | ></span> |
316 | </div> | 324 | </div> |
317 | <div class="col-8 px-1"> | 325 | <div class="col-8 px-1"> |
318 | <span ng-bind="articulo.descripcion"></span> | 326 | <span ng-bind="articulo.descripcion"></span> |
319 | </div> | 327 | </div> |
320 | </div> | 328 | </div> |
321 | <div class="d-flex"> | 329 | <div class="d-flex"> |
322 | <div class="col-3 px-1"> | 330 | <div class="col-3 px-1"> |
323 | <span ng-bind="'x' + articulo.cantidad"></span> | 331 | <span ng-bind="'x' + articulo.cantidad"></span> |
324 | </div> | 332 | </div> |
325 | <div class="col-3 px-1 text-right"> | 333 | <div class="col-3 px-1 text-right"> |
326 | <span ng-bind="articulo.precio | currency: remito.moneda.simbolo : 4"></span> | 334 | <span ng-bind="articulo.precio | currency: remito.moneda.simbolo : 4"></span> |
327 | </div> | 335 | </div> |
328 | <div class="col px-1 text-right"> | 336 | <div class="col px-1 text-right"> |
329 | <span | 337 | <span |
330 | ng-bind="(articulo.precio * articulo.cantidad) | currency: remito.moneda.simbolo" | 338 | ng-bind="(articulo.precio * articulo.cantidad) | currency: remito.moneda.simbolo" |
331 | > | 339 | > |
332 | </span> | 340 | </span> |
333 | </div> | 341 | </div> |
334 | </div> | 342 | </div> |
335 | </div> | 343 | </div> |
336 | <div class="align-middle p-1"> | 344 | <div class="align-middle p-1"> |
337 | <button | 345 | <button |
338 | class="btn btn-outline-secondary" | 346 | class="btn btn-outline-secondary" |
339 | ng-click="quitarArticulo(key)" | 347 | ng-click="quitarArticulo(key)" |
340 | > | 348 | > |
341 | <i class="fa fa-trash"></i> | 349 | <i class="fa fa-trash"></i> |
342 | </button> | 350 | </button> |
343 | </div> | 351 | </div> |
344 | </td> | 352 | </td> |
345 | </tr> | 353 | </tr> |
346 | </tbody> | 354 | </tbody> |
347 | <tfoot> | 355 | <tfoot> |
348 | <!-- CARGANDO ITEM --> | 356 | <!-- CARGANDO ITEM --> |
349 | <tr ng-show="!cargando" class="d-flex"> | 357 | <tr ng-show="!cargando" class="d-flex"> |
350 | <td | 358 | <td |
351 | class="align-middle p-1" | 359 | class="align-middle p-1" |
352 | ng-bind="articulosTabla.length + 1" | 360 | ng-bind="articulosTabla.length + 1" |
353 | ></td> | 361 | ></td> |
354 | <td class="col p-0"> | 362 | <td class="col p-0"> |
355 | <div class="d-flex"> | 363 | <div class="d-flex"> |
356 | <div class="col-4 px-1"> | 364 | <div class="col-4 px-1"> |
357 | <span | 365 | <span |
358 | ng-bind="articuloACargar.sectorCodigo" | 366 | ng-bind="articuloACargar.sectorCodigo" |
359 | ></span> | 367 | ></span> |
360 | </div> | 368 | </div> |
361 | <div class="col-8 px-1"> | 369 | <div class="col-8 px-1"> |
362 | <span ng-bind="articuloACargar.descripcion"></span> | 370 | <span ng-bind="articuloACargar.descripcion"></span> |
363 | </div> | 371 | </div> |
364 | </div> | 372 | </div> |
365 | <div class="d-flex"> | 373 | <div class="d-flex"> |
366 | <div class="col-3 px-1 m-1"> | 374 | <div class="col-3 px-1 m-1"> |
367 | <input | 375 | <input |
368 | class="form-control p-1" | 376 | class="form-control p-1" |
369 | type="number" | 377 | type="number" |
370 | min="1" | 378 | min="1" |
371 | ng-model="articuloACargar.cantidad" | 379 | ng-model="articuloACargar.cantidad" |
372 | foca-focus="!cargando" | 380 | foca-focus="!cargando" |
373 | ng-keypress="agregarATabla($event.keyCode)" | 381 | ng-keypress="agregarATabla($event.keyCode)" |
374 | style="height: auto; line-height: 1.1em" | 382 | style="height: auto; line-height: 1.1em" |
375 | > | 383 | > |
376 | </div> | 384 | </div> |
377 | <div class="col-3 px-1 text-right"> | 385 | <div class="col-3 px-1 text-right"> |
378 | <span ng-bind="articuloACargar.precio | currency: remito.moneda.simbolo : 4"></span> | 386 | <span ng-bind="articuloACargar.precio | currency: remito.moneda.simbolo : 4"></span> |
379 | </div> | 387 | </div> |
380 | <div class="col px-1 text-right"> | 388 | <div class="col px-1 text-right"> |
381 | <span | 389 | <span |
382 | ng-bind="getSubTotal() | currency: remito.moneda.simbolo" | 390 | ng-bind="getSubTotal() | currency: remito.moneda.simbolo" |
383 | > | 391 | > |
384 | </span> | 392 | </span> |
385 | </div> | 393 | </div> |
386 | </div> | 394 | </div> |
387 | </td> | 395 | </td> |
388 | <td class="text-center align-middle"> | 396 | <td class="text-center align-middle"> |
389 | <button | 397 | <button |
390 | class="btn btn-outline-secondary" | 398 | class="btn btn-outline-secondary" |
391 | ng-click="agregarATabla(13)" | 399 | ng-click="agregarATabla(13)" |
392 | > | 400 | > |
393 | <i class="fa fa-save"></i> | 401 | <i class="fa fa-save"></i> |
394 | </button> | 402 | </button> |
395 | </td> | 403 | </td> |
396 | </tr> | 404 | </tr> |
397 | <!-- SELECCIONAR PRODUCTO --> | 405 | <!-- SELECCIONAR PRODUCTO --> |
398 | <tr ng-show="cargando" class="d-flex"> | 406 | <tr ng-show="cargando" class="d-flex"> |
399 | <td class="col-12"> | 407 | <td class="col-12"> |
400 | <input | 408 | <input |
401 | placeholder="Seleccione Articulo" | 409 | placeholder="Seleccione Articulo" |
402 | class="form-control form-control-sm" | 410 | class="form-control form-control-sm" |
403 | readonly | 411 | readonly |
404 | ng-click="seleccionarArticulo()" | 412 | ng-click="seleccionarArticulo()" |
405 | /> | 413 | /> |
406 | </td> | 414 | </td> |
407 | </tr> | 415 | </tr> |
408 | <!-- TOOGLE EXPANDIR --> | 416 | <!-- TOOGLE EXPANDIR --> |
409 | <tr> | 417 | <tr> |
410 | <td class="col"> | 418 | <td class="col"> |
411 | <button | 419 | <button |
412 | class="btn btn-outline-secondary selectable w-100" | 420 | class="btn btn-outline-secondary selectable w-100" |
413 | ng-click="show = !show; masMenos()" | 421 | ng-click="show = !show; masMenos()" |
414 | ng-show="articulosTabla.length > 0" | 422 | ng-show="articulosTabla.length > 0" |
415 | > | 423 | > |
416 | <i | 424 | <i |
417 | class="fa fa-chevron-down" | 425 | class="fa fa-chevron-down" |
418 | ng-hide="show" | 426 | ng-hide="show" |
419 | aria-hidden="true" | 427 | aria-hidden="true" |
420 | > | 428 | > |
421 | </i> | 429 | </i> |
422 | <i | 430 | <i |
423 | class="fa fa-chevron-up" | 431 | class="fa fa-chevron-up" |
424 | ng-show="show" | 432 | ng-show="show" |
425 | aria-hidden="true"> | 433 | aria-hidden="true"> |
426 | </i> | 434 | </i> |
427 | </button> | 435 | </button> |
428 | </td> | 436 | </td> |
429 | </tr> | 437 | </tr> |
430 | <!-- FOOTER --> | 438 | <!-- FOOTER --> |
431 | <tr class="d-flex"> | 439 | <tr class="d-flex"> |
432 | <td class="align-middle no-border-top" colspan="2"> | 440 | <td class="align-middle no-border-top" colspan="2"> |
433 | <strong>Cantidad Items:</strong> | 441 | <strong>Cantidad Items:</strong> |
434 | <a ng-bind="articulosTabla.length"></a> | 442 | <a ng-bind="articulosTabla.length"></a> |
435 | </td> | 443 | </td> |
436 | <td class="text-right ml-auto table-celda-total no-border-top"> | 444 | <td class="text-right ml-auto table-celda-total no-border-top"> |
437 | <h3>Total:</h3> | 445 | <h3>Total:</h3> |
438 | </td> | 446 | </td> |
439 | <td class="table-celda-total text-right no-border-top"> | 447 | <td class="table-celda-total text-right no-border-top"> |
440 | <h3>{{getTotal() | currency: remito.moneda.simbolo}}</h3> | 448 | <h3>{{getTotal() | currency: remito.moneda.simbolo}}</h3> |
441 | </td> | 449 | </td> |
442 | </tr> | 450 | </tr> |
443 | </tfoot> | 451 | </tfoot> |
444 | </table> | 452 | </table> |
445 | </div> | 453 | </div> |
446 | </div> | 454 | </div> |
447 | <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> | 455 | <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> |
448 | <div class="row align-items-end"> | 456 | <div class="row align-items-end"> |
449 | <div class="col-12"> | 457 | <div class="col-12"> |
450 | <button | 458 | <button |
451 | ng-click="crearRemito()" | 459 | ng-click="crearRemito()" |
452 | type="submit" | 460 | type="submit" |
453 | title="Crear nota remito" | 461 | title="Crear nota remito" |
454 | class="btn btn-default btn-block mb-2"> | 462 | class="btn btn-default btn-block mb-2"> |
455 | Guardar | 463 | Guardar |
456 | </button> | 464 | </button> |
457 | <button | 465 | <button |
458 | ng-click="salir()" | 466 | ng-click="salir()" |
459 | type="button" | 467 | type="button" |
460 | title="Salir" | 468 | title="Salir" |
461 | class="btn btn-default btn-block"> | 469 | class="btn btn-default btn-block"> |
462 | Salir | 470 | Salir |
463 | </button> | 471 | </button> |
464 | </div> | 472 | </div> |
465 | </div> | 473 | </div> |
466 | </div> | 474 | </div> |
467 | </div> | 475 | </div> |
468 | <div class="row d-md-none fixed-bottom"> | 476 | <div class="row d-md-none fixed-bottom"> |
469 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> | 477 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> |
470 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> | 478 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> |
471 | <span class="mr-3 ml-auto" ng-click="crearRemito()">Guardar</span> | 479 | <span class="mr-3 ml-auto" ng-click="crearRemito()">Guardar</span> |
472 | </div> | 480 | </div> |
473 | </div> | 481 | </div> |
474 | </div> | 482 | </div> |
475 | 483 |