Commit 436b00177a30ad379e7d62f30665d5f41e26a4e5
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
master See merge request modulos-npm/foca-crear-nota-pedido!33
Showing
3 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -383,7 +383,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 383 | 383 | return; |
| 384 | 384 | } |
| 385 | 385 | delete $scope.articuloACargar.sectorCodigo; |
| 386 | - $scope.articulosTabla.unshift($scope.articuloACargar); | |
| 386 | + $scope.articulosTabla.push($scope.articuloACargar); | |
| 387 | 387 | $scope.cargando = true; |
| 388 | 388 | } |
| 389 | 389 | }; |
src/views/nota-pedido.html
| ... | ... | @@ -46,75 +46,52 @@ |
| 46 | 46 | </form> |
| 47 | 47 | <div class="row"> |
| 48 | 48 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
| 49 | - <div class="row grilla-articulos align-items-end"> | |
| 50 | - <table class="table table-striped table-sm table-dark"> | |
| 49 | + <div class="row grilla-articulo align-items-end"> | |
| 50 | + <table class="table table-striped table-sm table-dark tabla-articulo"> | |
| 51 | 51 | <thead> |
| 52 | 52 | <tr> |
| 53 | - <th>Código</th> | |
| 54 | - <th>Descripción</th> | |
| 55 | - <th>Cantidad</th> | |
| 56 | - <th>Precio Unitario</th> | |
| 57 | - <th>SubTotal</th> | |
| 58 | - <th> | |
| 53 | + <th class="tabla-articulo-numero">#</th> | |
| 54 | + <th class="tabla-articulo-codigo">Código</th> | |
| 55 | + <th class="tabla-articulo-descripcion">Descripción</th> | |
| 56 | + <th class="tabla-articulo-cantidad text-right">Cantidad</th> | |
| 57 | + <th class="tabla-articulo-precio text-right">Precio Unitario</th> | |
| 58 | + <th class="tabla-articulo-subtotal text-right">SubTotal</th> | |
| 59 | + <th class="tabla-articulo-boton text-right"> | |
| 59 | 60 | <button |
| 60 | 61 | class="btn btn-outline-secondary selectable" |
| 61 | - style="float: right;" | |
| 62 | 62 | ng-click="show = !show; masMenos()" |
| 63 | 63 | > |
| 64 | 64 | <i |
| 65 | 65 | class="fa fa-chevron-down" |
| 66 | - ng-hide="show" | |
| 66 | + ng-show="show" | |
| 67 | 67 | aria-hidden="true" |
| 68 | 68 | > |
| 69 | 69 | </i> |
| 70 | 70 | <i |
| 71 | 71 | class="fa fa-chevron-up" |
| 72 | - ng-show="show" | |
| 72 | + ng-hide="show" | |
| 73 | 73 | aria-hidden="true"> |
| 74 | 74 | </i> |
| 75 | 75 | </button> |
| 76 | 76 | </th> |
| 77 | 77 | </tr> |
| 78 | 78 | </thead> |
| 79 | - <tbody> | |
| 80 | - <tr ng-show="!cargando"> | |
| 81 | - <td><input | |
| 82 | - class="form-control" | |
| 83 | - ng-model="articuloACargar.sectorCodigo" | |
| 84 | - readonly></td> | |
| 85 | - <td><input | |
| 86 | - class="form-control" | |
| 87 | - ng-model="articuloACargar.descripcion" | |
| 88 | - readonly></td> | |
| 89 | - <td class="text-right"><input | |
| 90 | - class="form-control" | |
| 91 | - type="number" | |
| 92 | - min="1" | |
| 93 | - ng-model="articuloACargar.cantidad" | |
| 94 | - foca-focus="!cargando" | |
| 95 | - esc-key="resetFilter()" | |
| 96 | - ng-keypress="agregarATabla($event.keyCode)"></td> | |
| 97 | - <td class="text-right"><input | |
| 98 | - class="form-control" | |
| 99 | - ng-value="articuloACargar.precio | currency: '$'" | |
| 100 | - readonly></td> | |
| 101 | - <td class="text-right"><input | |
| 102 | - class="form-control" | |
| 103 | - ng-value="getSubTotal() | currency: '$'" | |
| 104 | - readonly></td> | |
| 105 | - <td class="text-center"><button | |
| 106 | - class="btn btn-outline-secondary btn-sm" | |
| 107 | - ng-click="agregarATabla(13)"> | |
| 108 | - <i class="fa fa-save"></i> | |
| 109 | - </button></td> | |
| 110 | - </tr> | |
| 79 | + <tbody class="tabla-articulo-body"> | |
| 111 | 80 | <tr |
| 112 | 81 | ng-repeat="(key, articulo) in articulosTabla" |
| 113 | - ng-show="show || key == 0" | |
| 82 | + ng-show="show || key == (articulosTabla.length - 1)" | |
| 114 | 83 | > |
| 115 | - <td ng-bind="articulo.sector + '-' + articulo.codigo"></td> | |
| 116 | - <td ng-bind="articulo.descripcion"></td> | |
| 117 | - <td class="text-right"><input | |
| 84 | + <td class="tabla-articulo-numero" ng-bind="key + 1"></td> | |
| 85 | + <td | |
| 86 | + class="tabla-articulo-codigo" | |
| 87 | + ng-bind="articulo.sector + '-' + articulo.codigo" | |
| 88 | + ></td> | |
| 89 | + <td | |
| 90 | + class="tabla-articulo-descripcion" | |
| 91 | + ng-bind="articulo.descripcion" | |
| 92 | + ></td> | |
| 93 | + <td class="tabla-articulo-cantidad text-right"> | |
| 94 | + <input | |
| 118 | 95 | ng-show="articulo.edit" |
| 119 | 96 | ng-model="articulo.cantidad" |
| 120 | 97 | class="form-control" |
| ... | ... | @@ -131,12 +108,15 @@ |
| 131 | 108 | ng-bind="articulo.cantidad"> |
| 132 | 109 | </i> |
| 133 | 110 | </td> |
| 134 | - <td class="text-right" ng-bind="articulo.precio | currency: '$'"></td> | |
| 111 | + <td | |
| 112 | + class="tabla-articulo-precio text-right" | |
| 113 | + ng-bind="articulo.precio | currency: '$'" | |
| 114 | + ></td> | |
| 135 | 115 | <td |
| 136 | - class="text-right" | |
| 116 | + class="tabla-articulo-subtotal text-right" | |
| 137 | 117 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> |
| 138 | 118 | </td> |
| 139 | - <td class="text-center"> | |
| 119 | + <td class="tabla-articulo-boton text-center"> | |
| 140 | 120 | <button |
| 141 | 121 | class="btn btn-outline-secondary btn-sm" |
| 142 | 122 | ng-click="quitarArticulo(key)" |
| ... | ... | @@ -145,8 +125,62 @@ |
| 145 | 125 | </button> |
| 146 | 126 | </td> |
| 147 | 127 | </tr> |
| 128 | + </tbody> | |
| 129 | + <tfoot> | |
| 130 | + <tr ng-show="!cargando"> | |
| 131 | + <td | |
| 132 | + class="tabla-articulo-numero align-middle" | |
| 133 | + ng-bind="articulosTabla.length + 1" | |
| 134 | + ></td> | |
| 135 | + <td class="tabla-articulo-codigo"> | |
| 136 | + <input | |
| 137 | + class="form-control" | |
| 138 | + ng-model="articuloACargar.sectorCodigo" | |
| 139 | + readonly | |
| 140 | + > | |
| 141 | + </td> | |
| 142 | + <td class="tabla-articulo-descripcion"> | |
| 143 | + <input | |
| 144 | + class="form-control" | |
| 145 | + ng-model="articuloACargar.descripcion" | |
| 146 | + readonly | |
| 147 | + > | |
| 148 | + </td> | |
| 149 | + <td class="tabla-articulo-cantidad text-right"> | |
| 150 | + <input | |
| 151 | + class="form-control" | |
| 152 | + type="number" | |
| 153 | + min="1" | |
| 154 | + ng-model="articuloACargar.cantidad" | |
| 155 | + foca-focus="!cargando" | |
| 156 | + esc-key="resetFilter()" | |
| 157 | + ng-keypress="agregarATabla($event.keyCode)" | |
| 158 | + > | |
| 159 | + </td> | |
| 160 | + <td class="tabla-articulo-precio text-right"> | |
| 161 | + <input | |
| 162 | + class="form-control" | |
| 163 | + ng-value="articuloACargar.precio | currency: '$'" | |
| 164 | + readonly | |
| 165 | + > | |
| 166 | + </td> | |
| 167 | + <td class="tabla-articulo-subtotal text-right"> | |
| 168 | + <input | |
| 169 | + class="form-control" | |
| 170 | + ng-value="getSubTotal() | currency: '$'" | |
| 171 | + readonly | |
| 172 | + ></td> | |
| 173 | + <td class="tabla-articulo-boton text-center align-middle"> | |
| 174 | + <button | |
| 175 | + class="btn btn-outline-secondary" | |
| 176 | + ng-click="agregarATabla(13)" | |
| 177 | + > | |
| 178 | + <i class="fa fa-save"></i> | |
| 179 | + </button> | |
| 180 | + </td> | |
| 181 | + </tr> | |
| 148 | 182 | <tr ng-show="cargando"> |
| 149 | - <td colspan="6"> | |
| 183 | + <td colspan="7"> | |
| 150 | 184 | <input |
| 151 | 185 | placeholder="Seleccione Articulo" |
| 152 | 186 | class="form-control form-control-sm" |
| ... | ... | @@ -155,10 +189,8 @@ |
| 155 | 189 | /> |
| 156 | 190 | </td> |
| 157 | 191 | </tr> |
| 158 | - </tbody> | |
| 159 | - <tfoot> | |
| 160 | 192 | <tr class=""> |
| 161 | - <td colspan="3"> | |
| 193 | + <td colspan="4"> | |
| 162 | 194 | <strong>Cantidad Items:</strong> |
| 163 | 195 | <a ng-bind="articulosTabla.length"></a> |
| 164 | 196 | </td> |
| ... | ... | @@ -166,7 +198,7 @@ |
| 166 | 198 | <td class="table-celda-total text-right" colspan="1"> |
| 167 | 199 | <h3>{{getTotal() | currency: '$'}}</h3> |
| 168 | 200 | </td> |
| 169 | - <td colspan="2" class="text-right"> | |
| 201 | + <td class="text-right"> | |
| 170 | 202 | <button |
| 171 | 203 | type="button" |
| 172 | 204 | class="btn btn-default btn-sm" |
| ... | ... | @@ -201,249 +233,3 @@ |
| 201 | 233 | </div> |
| 202 | 234 | </div> |
| 203 | 235 | </div> |
| 204 | -<!-- | |
| 205 | -<form name="formCrearNota"> | |
| 206 | - <uib-tabset active="active"> | |
| 207 | - <uib-tab index="0" heading="General"> | |
| 208 | - <input type="hidden" name="id" ng-model="notaPedido.id" /> | |
| 209 | - <div> | |
| 210 | - <div class="col-auto my-2"> | |
| 211 | - <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | |
| 212 | - </div> | |
| 213 | - </div> | |
| 214 | - <br> | |
| 215 | - <br> | |
| 216 | - <div class="row"> | |
| 217 | - <div class="col-md-2"> | |
| 218 | - <div class="col-auto"> | |
| 219 | - <label>Fecha de carga</label> | |
| 220 | - </div> | |
| 221 | - </div> | |
| 222 | - <div class="col-md-3"> | |
| 223 | - <div class="col-auto"> | |
| 224 | - <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | |
| 225 | - </div> | |
| 226 | - </div> | |
| 227 | - <div class="col-md-2"> | |
| 228 | - <div class="col-auto"> | |
| 229 | - <label>Kilómetros</label> | |
| 230 | - </div> | |
| 231 | - </div> | |
| 232 | - <div class="col-md-3"> | |
| 233 | - <div class="col-auto"> | |
| 234 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | |
| 235 | - ng-model="notaPedido.kilometros" ng-required="true"> | |
| 236 | - </div> | |
| 237 | - </div> | |
| 238 | - </div> | |
| 239 | - <div class="row my-3"> | |
| 240 | - <div class="col-md-2"> | |
| 241 | - <div class="col-auto"> | |
| 242 | - <label>Jurisdicción de IIBB</label> | |
| 243 | - </div> | |
| 244 | - </div> | |
| 245 | - <div class="col-md-3"> | |
| 246 | - <div class="col-auto"> | |
| 247 | - <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | |
| 248 | - ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | |
| 249 | - </div> | |
| 250 | - </div> | |
| 251 | - <div class="col-md-2"> | |
| 252 | - <div class="col-auto"> | |
| 253 | - <label>Costo de financiación</label> | |
| 254 | - </div> | |
| 255 | - </div> | |
| 256 | - <div class="col-md-3"> | |
| 257 | - <div class="col-auto"> | |
| 258 | - <div class="input-group mb-2"> | |
| 259 | - <div class="input-group-prepend"> | |
| 260 | - <div class="input-group-text">$</div> | |
| 261 | - </div> | |
| 262 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | |
| 263 | - ng-model="notaPedido.costoFinanciacion"> | |
| 264 | - </div> | |
| 265 | - </div> | |
| 266 | - </div> | |
| 267 | - </div> | |
| 268 | - <div class="row"> | |
| 269 | - <div class="col-md-2"> | |
| 270 | - <div class="col-auto"> | |
| 271 | - <label>Bomba</label> | |
| 272 | - </div> | |
| 273 | - </div> | |
| 274 | - <div class="col-md-1"> | |
| 275 | - <div class="col-auto"> | |
| 276 | - <div class="form-check custom-radio custom-control-inline"> | |
| 277 | - <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | |
| 278 | - <label class="form-check-label"> | |
| 279 | - Si | |
| 280 | - </label> | |
| 281 | - </div> | |
| 282 | - <div class="form-check custom-radio custom-control-inline"> | |
| 283 | - <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | |
| 284 | - <label class="form-check-label"> | |
| 285 | - No | |
| 286 | - </label> | |
| 287 | - </div> | |
| 288 | - </div> | |
| 289 | - </div> | |
| 290 | - <div class="col-md-1"> | |
| 291 | - <div class="col-auto"> | |
| 292 | - <label>Flete</label> | |
| 293 | - </div> | |
| 294 | - </div> | |
| 295 | - <div class="col-md-1"> | |
| 296 | - <div class="col-auto"> | |
| 297 | - <div class="form-check custom-radio custom-control-inline"> | |
| 298 | - <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | |
| 299 | - <label class="form-check-label"> | |
| 300 | - Si | |
| 301 | - </label> | |
| 302 | - </div> | |
| 303 | - <div class="form-check custom-radio custom-control-inline"> | |
| 304 | - <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | |
| 305 | - <label class="form-check-label"> | |
| 306 | - FOB | |
| 307 | - </label> | |
| 308 | - </div> | |
| 309 | - </div> | |
| 310 | - </div> | |
| 311 | - <div class="col-md-2"> | |
| 312 | - <div class="col-auto"> | |
| 313 | - <label>Costo unitario kilometro flete</label> | |
| 314 | - </div> | |
| 315 | - </div> | |
| 316 | - <div class="col-md-3"> | |
| 317 | - <div class="col-auto"> | |
| 318 | - <div class="input-group mb-2"> | |
| 319 | - <div class="input-group-prepend"> | |
| 320 | - <div class="input-group-text">$</div> | |
| 321 | - </div> | |
| 322 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | |
| 323 | - ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | |
| 324 | - </div> | |
| 325 | - </div> | |
| 326 | - </div> | |
| 327 | - </div> | |
| 328 | - <div class="row my-3"> | |
| 329 | - <div class="col-md-2"> | |
| 330 | - <div class="col-auto"> | |
| 331 | - <label>Vendedor</label> | |
| 332 | - </div> | |
| 333 | - </div> | |
| 334 | - <div class="col-md-3"> | |
| 335 | - <div class="col-auto"> | |
| 336 | - <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | |
| 337 | - ng-click="seleccionarVendedor()" readonly> | |
| 338 | - </div> | |
| 339 | - </div> | |
| 340 | - <div class="col-md-2"> | |
| 341 | - <div class="col-auto"> | |
| 342 | - <label>Proveedor</label> | |
| 343 | - </div> | |
| 344 | - </div> | |
| 345 | - <div class="col-md-3"> | |
| 346 | - <div class="col-auto"> | |
| 347 | - <input type="text" class="form-control" placeholder="Seleccione proveedor" ng-model="notaPedido.proveedor" | |
| 348 | - ng-click="seleccionarProveedor()" readonly> | |
| 349 | - </div> | |
| 350 | - </div> | |
| 351 | - </div> | |
| 352 | - </div> | |
| 353 | - <div class="row"> | |
| 354 | - <div class="col-md-2"> | |
| 355 | - <div class="col-auto"> | |
| 356 | - <label>Cliente</label> | |
| 357 | - </div> | |
| 358 | - </div> | |
| 359 | - <div class="col-md-3"> | |
| 360 | - <div class="col-auto"> | |
| 361 | - <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | |
| 362 | - ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | |
| 363 | - </div> | |
| 364 | - </div> | |
| 365 | - <div class="col-md-2"> | |
| 366 | - <div class="col-auto"> | |
| 367 | - <label>Domicilio</label> | |
| 368 | - </div> | |
| 369 | - </div> | |
| 370 | - <div class="col-md-4"> | |
| 371 | - <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | |
| 372 | - <div class="col-auto"> | |
| 373 | - <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | |
| 374 | - domi.dom | |
| 375 | - for domi | |
| 376 | - in domiciliosCliente | |
| 377 | - " | |
| 378 | - typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | |
| 379 | - class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | |
| 380 | - <i ng-show="cargandoClientes" class="fas fa-sync"></i> | |
| 381 | - <div ng-show="sinResultados"> | |
| 382 | - No se encontraron resultados. | |
| 383 | - </div> | |
| 384 | - </div> | |
| 385 | - <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | |
| 386 | - <a class="btn" ng-click="addNewDom()">+</a> | |
| 387 | - </div> | |
| 388 | - </div> | |
| 389 | - </div> | |
| 390 | - </uib-tab> | |
| 391 | - <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | |
| 392 | - <div> | |
| 393 | - <div class="col-auto my-2"> | |
| 394 | - <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | |
| 395 | - </div> | |
| 396 | - </div> | |
| 397 | - <br> | |
| 398 | - <br> | |
| 399 | - <div class="row"> | |
| 400 | - <div class="col-md-2"> | |
| 401 | - <div class="col-auto"> | |
| 402 | - <label>Precios y condiciones</label> | |
| 403 | - </div> | |
| 404 | - </div> | |
| 405 | - <div class="col-md-4"> | |
| 406 | - <div class="col-auto"> | |
| 407 | - <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | |
| 408 | - </select> | |
| 409 | - </div> | |
| 410 | - </div> | |
| 411 | - <div class="col-md-2"> | |
| 412 | - <div class="col-auto"> | |
| 413 | - <label>Producto</label> | |
| 414 | - </div> | |
| 415 | - </div> | |
| 416 | - <div class="col-md-4"> | |
| 417 | - <div class="col-auto"> | |
| 418 | - <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | |
| 419 | - ng-click="seleccionarArticulo()" readonly> | |
| 420 | - </div> | |
| 421 | - </div> | |
| 422 | - </div> | |
| 423 | - <div class="col-md-12"> | |
| 424 | - <table class="table my-3 table-hover table-nonfluid"> | |
| 425 | - <thead> | |
| 426 | - <tr> | |
| 427 | - <th>Código</th> | |
| 428 | - <th>Nombre</th> | |
| 429 | - <th>Precio unitario</th> | |
| 430 | - <th>Costo unitario bruto</th> | |
| 431 | - <th>Cantidad</th> | |
| 432 | - <th>Subtotal</th> | |
| 433 | - </tr> | |
| 434 | - </thead> | |
| 435 | - <tbody> | |
| 436 | - <tr ng-repeat="articulo in articulosTabla"> | |
| 437 | - <td ng-bind="articulo.codigo"></td> | |
| 438 | - <td ng-bind="articulo.nombre"></td> | |
| 439 | - <td ng-bind="articulo.precio"></td> | |
| 440 | - <td ng-bind="articulo.costoUnitario"></td> | |
| 441 | - <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | |
| 442 | - <td ng-bind="getSubTotal(articulo.item)"></td> | |
| 443 | - </tr> | |
| 444 | - </tbody> | |
| 445 | - </table> | |
| 446 | - </div> | |
| 447 | - </uib-tab> | |
| 448 | - </uib-tabset> | |
| 449 | -</form>--> | |
| 450 | 236 | \ No newline at end of file |
src/views/nota-pedido_1.html
| ... | ... | @@ -1,245 +0,0 @@ |
| 1 | -<form name="formCrearNota" ng-submit="siguienteTab()"> | |
| 2 | - <uib-tabset active="active"> | |
| 3 | - <uib-tab index="0" heading="General"> | |
| 4 | - <input type="hidden" name="id" ng-model="notaPedido.id" /> | |
| 5 | - <div> | |
| 6 | - <div class="col-auto my-2"> | |
| 7 | - <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | |
| 8 | - </div> | |
| 9 | - </div> | |
| 10 | - <br> | |
| 11 | - <br> | |
| 12 | - <div class="row"> | |
| 13 | - <div class="col-md-2"> | |
| 14 | - <div class="col-auto"> | |
| 15 | - <label>Fecha de carga</label> | |
| 16 | - </div> | |
| 17 | - </div> | |
| 18 | - <div class="col-md-3"> | |
| 19 | - <div class="col-auto"> | |
| 20 | - <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | |
| 21 | - </div> | |
| 22 | - </div> | |
| 23 | - <div class="col-md-2"> | |
| 24 | - <div class="col-auto"> | |
| 25 | - <label>Kilómetros</label> | |
| 26 | - </div> | |
| 27 | - </div> | |
| 28 | - <div class="col-md-3"> | |
| 29 | - <div class="col-auto"> | |
| 30 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | |
| 31 | - ng-model="notaPedido.kilometros" ng-required="true"> | |
| 32 | - </div> | |
| 33 | - </div> | |
| 34 | - </div> | |
| 35 | - <div class="row my-3"> | |
| 36 | - <div class="col-md-2"> | |
| 37 | - <div class="col-auto"> | |
| 38 | - <label>Jurisdicción de IIBB</label> | |
| 39 | - </div> | |
| 40 | - </div> | |
| 41 | - <div class="col-md-3"> | |
| 42 | - <div class="col-auto"> | |
| 43 | - <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | |
| 44 | - ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | |
| 45 | - </div> | |
| 46 | - </div> | |
| 47 | - <div class="col-md-2"> | |
| 48 | - <div class="col-auto"> | |
| 49 | - <label>Costo de financiación</label> | |
| 50 | - </div> | |
| 51 | - </div> | |
| 52 | - <div class="col-md-3"> | |
| 53 | - <div class="col-auto"> | |
| 54 | - <div class="input-group mb-2"> | |
| 55 | - <div class="input-group-prepend"> | |
| 56 | - <div class="input-group-text">$</div> | |
| 57 | - </div> | |
| 58 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | |
| 59 | - ng-model="notaPedido.costoFinanciacion"> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | - </div> | |
| 64 | - <div class="row"> | |
| 65 | - <div class="col-md-2"> | |
| 66 | - <div class="col-auto"> | |
| 67 | - <label>Bomba</label> | |
| 68 | - </div> | |
| 69 | - </div> | |
| 70 | - <div class="col-md-1"> | |
| 71 | - <div class="col-auto"> | |
| 72 | - <div class="form-check custom-radio custom-control-inline"> | |
| 73 | - <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | |
| 74 | - <label class="form-check-label"> | |
| 75 | - Si | |
| 76 | - </label> | |
| 77 | - </div> | |
| 78 | - <div class="form-check custom-radio custom-control-inline"> | |
| 79 | - <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | |
| 80 | - <label class="form-check-label"> | |
| 81 | - No | |
| 82 | - </label> | |
| 83 | - </div> | |
| 84 | - </div> | |
| 85 | - </div> | |
| 86 | - <div class="col-md-1"> | |
| 87 | - <div class="col-auto"> | |
| 88 | - <label>Flete</label> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - <div class="col-md-1"> | |
| 92 | - <div class="col-auto"> | |
| 93 | - <div class="form-check custom-radio custom-control-inline"> | |
| 94 | - <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | |
| 95 | - <label class="form-check-label"> | |
| 96 | - Si | |
| 97 | - </label> | |
| 98 | - </div> | |
| 99 | - <div class="form-check custom-radio custom-control-inline"> | |
| 100 | - <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | |
| 101 | - <label class="form-check-label"> | |
| 102 | - FOB | |
| 103 | - </label> | |
| 104 | - </div> | |
| 105 | - </div> | |
| 106 | - </div> | |
| 107 | - <div class="col-md-2"> | |
| 108 | - <div class="col-auto"> | |
| 109 | - <label>Costo unitario kilometro flete</label> | |
| 110 | - </div> | |
| 111 | - </div> | |
| 112 | - <div class="col-md-3"> | |
| 113 | - <div class="col-auto"> | |
| 114 | - <div class="input-group mb-2"> | |
| 115 | - <div class="input-group-prepend"> | |
| 116 | - <div class="input-group-text">$</div> | |
| 117 | - </div> | |
| 118 | - <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | |
| 119 | - ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | |
| 120 | - </div> | |
| 121 | - </div> | |
| 122 | - </div> | |
| 123 | - </div> | |
| 124 | - <div class="row my-3"> | |
| 125 | - <div class="col-md-2"> | |
| 126 | - <div class="col-auto"> | |
| 127 | - <label>Vendedor</label> | |
| 128 | - </div> | |
| 129 | - </div> | |
| 130 | - <div class="col-md-3"> | |
| 131 | - <div class="col-auto"> | |
| 132 | - <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | |
| 133 | - ng-click="seleccionarVendedor()" readonly> | |
| 134 | - </div> | |
| 135 | - </div> | |
| 136 | - <div class="col-md-2"> | |
| 137 | - <div class="col-auto"> | |
| 138 | - <label>Proveedor</label> | |
| 139 | - </div> | |
| 140 | - </div> | |
| 141 | - <div class="col-md-3"> | |
| 142 | - <div class="col-auto"> | |
| 143 | - <input type="text" class="form-control" placeholder="Seleccione proveedor" ng-model="notaPedido.proveedor" | |
| 144 | - ng-click="seleccionarProveedor()" readonly> | |
| 145 | - </div> | |
| 146 | - </div> | |
| 147 | - </div> | |
| 148 | - </div> | |
| 149 | - <div class="row"> | |
| 150 | - <div class="col-md-2"> | |
| 151 | - <div class="col-auto"> | |
| 152 | - <label>Cliente</label> | |
| 153 | - </div> | |
| 154 | - </div> | |
| 155 | - <div class="col-md-3"> | |
| 156 | - <div class="col-auto"> | |
| 157 | - <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | |
| 158 | - ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | |
| 159 | - </div> | |
| 160 | - </div> | |
| 161 | - <div class="col-md-2"> | |
| 162 | - <div class="col-auto"> | |
| 163 | - <label>Domicilio</label> | |
| 164 | - </div> | |
| 165 | - </div> | |
| 166 | - <div class="col-md-4"> | |
| 167 | - <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | |
| 168 | - <div class="col-auto"> | |
| 169 | - <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | |
| 170 | - domi.dom | |
| 171 | - for domi | |
| 172 | - in domiciliosCliente | |
| 173 | - " | |
| 174 | - typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | |
| 175 | - class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | |
| 176 | - <i ng-show="cargandoClientes" class="fas fa-sync"></i> | |
| 177 | - <div ng-show="sinResultados"> | |
| 178 | - No se encontraron resultados. | |
| 179 | - </div> | |
| 180 | - </div> | |
| 181 | - <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | |
| 182 | - <a class="btn" ng-click="addNewDom()">+</a> | |
| 183 | - </div> | |
| 184 | - </div> | |
| 185 | - </div> | |
| 186 | - </uib-tab> | |
| 187 | - <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | |
| 188 | - <div> | |
| 189 | - <div class="col-auto my-2"> | |
| 190 | - <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | |
| 191 | - </div> | |
| 192 | - </div> | |
| 193 | - <br> | |
| 194 | - <br> | |
| 195 | - <div class="row"> | |
| 196 | - <div class="col-md-2"> | |
| 197 | - <div class="col-auto"> | |
| 198 | - <label>Precios y condiciones</label> | |
| 199 | - </div> | |
| 200 | - </div> | |
| 201 | - <div class="col-md-4"> | |
| 202 | - <div class="col-auto"> | |
| 203 | - <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | |
| 204 | - </select> | |
| 205 | - </div> | |
| 206 | - </div> | |
| 207 | - <div class="col-md-2"> | |
| 208 | - <div class="col-auto"> | |
| 209 | - <label>Producto</label> | |
| 210 | - </div> | |
| 211 | - </div> | |
| 212 | - <div class="col-md-4"> | |
| 213 | - <div class="col-auto"> | |
| 214 | - <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | |
| 215 | - ng-click="seleccionarArticulo()" readonly> | |
| 216 | - </div> | |
| 217 | - </div> | |
| 218 | - </div> | |
| 219 | - <div class="col-md-12"> | |
| 220 | - <table class="table my-3 table-hover table-nonfluid"> | |
| 221 | - <thead> | |
| 222 | - <tr> | |
| 223 | - <th>Código</th> | |
| 224 | - <th>Nombre</th> | |
| 225 | - <th>Precio unitario</th> | |
| 226 | - <th>Costo unitario bruto</th> | |
| 227 | - <th>Cantidad</th> | |
| 228 | - <th>Subtotal</th> | |
| 229 | - </tr> | |
| 230 | - </thead> | |
| 231 | - <tbody> | |
| 232 | - <tr ng-repeat="articulo in articulosTabla"> | |
| 233 | - <td ng-bind="articulo.codigo"></td> | |
| 234 | - <td ng-bind="articulo.nombre"></td> | |
| 235 | - <td ng-bind="articulo.precio"></td> | |
| 236 | - <td ng-bind="articulo.costoUnitario"></td> | |
| 237 | - <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | |
| 238 | - <td ng-bind="getSubTotal(articulo.item)"></td> | |
| 239 | - </tr> | |
| 240 | - </tbody> | |
| 241 | - </table> | |
| 242 | - </div> | |
| 243 | - </uib-tab> | |
| 244 | - </uib-tabset> | |
| 245 | -</form> | |
| 246 | 0 | \ No newline at end of file |