#309 seccion ticket.volume con m3 y sumatorio CR juan

This commit is contained in:
Javi Gallego 2018-05-28 09:16:06 +02:00
parent 74410d4045
commit 8b03ba420f
7 changed files with 143 additions and 37 deletions

View File

@ -3,6 +3,7 @@ Address: Consignatario
Agency: Agencia
Amount: Importe
Basic data: Datos básicos
Boxes: Cajas
Checked: Comprobado
Client: Cliente
Company: Empresa

View File

@ -1,17 +1,24 @@
<mg-ajax path="/ticket/api/sales/filter" options="vnIndexNonAuto" actions="$ctrl.setVolumes()"></mg-ajax>
<mg-ajax path="/client/api/tickets/{{edit.params.id}}/getTotalVolume" options="mgEdit"></mg-ajax>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-title>Volumes</vn-title>
<vn-one pad-small margin-medium-bottom pad-large class="totalBox">
<vn-label-value label="Total"
value="{{::edit.model.totalVolume}}">
</vn-label-value>
<vn-label-value label="Cajas"
value="{{::edit.model.totalBoxes}}">
</vn-label-value>
</vn-one>
<table class="vn-grid">
<thead>
<tr>
<th number translate>Item</th>
<th translate style="text-align:center">Description</th>
<th number translate>Quantity</th>
<th number translate>m³ per unit</th>
<th number translate>m³ per quantity</th>
<th number translate>total m³</th>
</tr>
</thead>
<tbody>
@ -19,9 +26,7 @@
<td number>{{::sale.itemFk}}</td>
<td><vn-fetched-tags sale="sale"/></td>
<td number>{{::sale.quantity}}</td>
<td number>{{::sale.volume.m3_uni | number:3}}</td>
<td number>{{::sale.volume.volumeTimesQuantity | number:3}}</td>
<td number>{{::sale.volume.m3_total | number:3}}</td>
<td number>{{::sale.volume.m3 | number:3}}</td>
</tr>
<tr ng-if="index.model.count === 0" class="list list-element">
<td colspan="6" style="text-align: center" translate>No results</td>

View File

@ -1,5 +1,6 @@
import ngModule from '../module';
import FilterTicketList from '../filter-ticket-list';
import './style.scss';
class Controller extends FilterTicketList {
constructor($scope, $http, $translate, $timeout, $state) {
@ -8,7 +9,6 @@ class Controller extends FilterTicketList {
this.$http = $http;
this.$translate = $translate;
this.onOrder('itemFk', 'ASC');
this.ticketVolumes = [];
}

View File

@ -0,0 +1,6 @@
.totalBox {
border: 1px solid #CCC;
text-align: left;
align-self: flex-end;
}

View File

@ -0,0 +1,24 @@
module.exports = Self => {
Self.remoteMethod('getTotalVolume', {
description: 'Returns the total volume of a ticket',
accessType: 'READ',
accepts: [{
arg: 'id',
type: 'number',
required: true,
description: 'ticket id',
http: {source: 'path'}
}],
returns: {
root: true
},
http: {
path: `/:id/getTotalVolume`,
verb: 'GET'
}
});
Self.getTotalVolume = async ticketFk => {
return (await Self.rawSql(`SELECT vn.ticketTotalVolume(?) totalVolume, vn.ticketTotalVolumeBoxes(?) totalBoxes`, [ticketFk, ticketFk]))[0];
};
};

View File

@ -3,6 +3,7 @@ module.exports = Self => {
require('../methods/ticket/changeWorker')(Self);
require('../methods/ticket/filter')(Self);
require('../methods/ticket/getVolume')(Self);
require('../methods/ticket/getTotalVolume')(Self);
require('../methods/ticket/summary')(Self);
require('../methods/ticket/getTotal')(Self);
require('../methods/ticket/getTaxes')(Self);

View File

@ -21,138 +21,207 @@
<body>
<table cellspacing="0" border="0">
<colgroup width="33"></colgroup>
<colgroup width="81"></colgroup>
<colgroup width="386"></colgroup>
<tr>
<td height="17" align="left">#</td>
<td align="left">Estado</td>
<td align="left">Asunto</td>
</tr>
<tr>
<td height="17" align="right" sdval="290" sdnum="3082;">290</td>
<td align="left">Componentes de ticket muestra todos los componentes existentes.</td>
</tr>
<tr>
<td height="17" align="right" sdval="268" sdnum="3082;">268</td>
<td align="left">A&ntilde;adir componente de paginaci&oacute;n a rutas con filtros</td>
</tr>
<tr>
<td height="17" align="right" sdval="271" sdnum="3082;">271</td>
<td align="left">Atajo de teclado para botones +</td>
</tr>
<tr>
<td height="17" align="right" sdval="226" sdnum="3082;">226</td>
<td align="left">Traduccion de error ticket tracking + e2e</td>
</tr>
<tr>
<td height="17" align="right" sdval="269" sdnum="3082;">269</td>
<td align="left">Test unitario de createWithInsurance.js</td>
</tr>
<tr>
<td height="17" align="right" sdval="217" sdnum="3082;">217</td>
<td align="left">Seccion Configuracion paso 3</td>
</tr>
<tr>
<td height="17" align="right" sdval="289" sdnum="3082;">289</td>
<td align="left">Cuando se modifica el cr&eacute;dito mostrar alerta</td>
</tr>
<tr>
<td height="17" align="right" sdval="252" sdnum="3082;">252</td>
<td align="left">No modifica visualmente el campo Facturar por consignatario al modificar el Recargo en cualquiera de sus consignatarios</td>
</tr>
<tr>
<td height="17" align="right" sdval="284" sdnum="3082;">284</td>
<td align="left">Seccion ticket.lineas icono papelera para eliminar lineas</td>
</tr>
<tr>
<td height="17" align="right" sdval="253" sdnum="3082;">253</td>
<td align="left">Actualizar los estilos para que concuerden con la paleta de colores de Vernatura</td>
</tr>
<tr>
<td height="17" align="right" sdval="283" sdnum="3082;">283</td>
<td align="left">Modificar encabezado el client.summary</td>
</tr>
<tr>
<td height="17" align="right" sdval="277" sdnum="3082;">277</td>
<td align="left">Hacer que el descriptor de ticket se actualice cuando se modifica el estado</td>
</tr>
<tr>
<td height="17" align="right" sdval="278" sdnum="3082;">278</td>
<td align="left">Refactor descriptor item</td>
</tr>
<tr>
<td height="17" align="right" sdval="160" sdnum="3082;">160</td>
<td align="left">Limpiar tablas/vistas obsoletas del esquema salix</td>
</tr>
<tr>
<td height="17" align="right" sdval="285" sdnum="3082;">285</td>
<td align="left">Optimizar tarea de tocker y a&ntilde;adir funciones compiladas</td>
</tr>
<tr>
<td height="17" align="right" sdval="231" sdnum="3082;">231</td>
<td align="left">Importar de vn2008 a vn toda la funcionalidad necesaria para mostrar precio</td>
</tr>
<tr>
<td height="17" align="right" sdval="287" sdnum="3082;">287</td>
<td align="left">Si en client.fiscaldata el nif empieza por B</td>
</tr>
<tr>
<td height="17" align="right" sdval="265" sdnum="3082;">265</td>
<td align="left">A&ntilde;adir boton ok y estado</td>
</tr>
<tr>
<td height="17" align="right" sdval="260" sdnum="3082;">260</td>
<td align="left">Refactorizaci&oacute;n de rutas en back-end</td>
</tr>
<tr>
<td height="17" align="right" sdval="267" sdnum="3082;">267</td>
<td align="left">Preparar esqueleto para nueva entidad order</td>
</tr>
<tr>
<td height="17" align="right" sdval="292" sdnum="3082;">292</td>
<td align="left">En el descriptor de item.list no aparece toda la informacion que deberia</td>
</tr>
<tr>
<td height="17" align="right" sdval="270" sdnum="3082;">270</td>
<td align="left">Seccion Configuracion paso 2</td>
</tr>
<tr>
<td height="17" align="right" sdval="264" sdnum="3082;">264</td>
<td align="left">sumario ticket no respeta margenes</td>
</tr>
<tr>
<td height="17" align="right" sdval="281" sdnum="3082;">281</td>
<td align="left">ticket.lineas Mostrar boton editar </td>
</tr>
<tr>
<td height="17" align="right" sdval="266" sdnum="3082;">266</td>
<td align="left">Al hacer click en el ticket.lineas campo id articulo mostrar el descriptor de item</td>
</tr>
<tr>
<td height="17" align="right" sdval="166" sdnum="3082;">166</td>
<td align="left">In Progress</td>
<td align="left">refactorizar buscador avanzado de articulos</td>
</tr>
<tr>
<td height="17" align="right" sdval="171" sdnum="3082;">171</td>
<td align="left">In Progress</td>
<td align="left">A&ntilde;adir revision</td>
</tr>
<tr>
<td height="17" align="right" sdval="211" sdnum="3082;">211</td>
<td align="left">In Progress</td>
<td align="left">Forzar a ciertos tags</td>
</tr>
<tr>
<td height="17" align="right" sdval="213" sdnum="3082;">213</td>
<td align="left">In Progress</td>
<td align="left">Sumario Tickets</td>
</tr>
<tr>
<td height="17" align="right" sdval="216" sdnum="3082;">216</td>
<td align="left">In Progress</td>
<td align="left">Seccion Configuracion paso 2</td>
</tr>
<tr>
<td height="17" align="right" sdval="124" sdnum="3082;">124</td>
<td align="left">Resolved</td>
<td align="left">address observations validations</td>
</tr>
<tr>
<td height="17" align="right" sdval="199" sdnum="3082;">199</td>
<td align="left">Resolved</td>
<td align="left">A&ntilde;adir manejador de cliente que no existe</td>
</tr>
<tr>
<td height="17" align="right" sdval="138" sdnum="3082;">138</td>
<td align="left">Resolved</td>
<td align="left">Refactorizaci&oacute;n Popover</td>
</tr>
<tr>
<td height="17" align="right" sdval="172" sdnum="3082;">172</td>
<td align="left">Resolved</td>
<td align="left">E2E revision</td>
</tr>
<tr>
<td height="17" align="right" sdval="175" sdnum="3082;">175</td>
<td align="left">Resolved</td>
<td align="left">E2E embalajes</td>
</tr>
<tr>
<td height="17" align="right" sdval="177" sdnum="3082;">177</td>
<td align="left">Resolved</td>
<td align="left">Listar modelo saleChecked</td>
</tr>
<tr>
<td height="17" align="right" sdval="182" sdnum="3082;">182</td>
<td align="left">Resolved</td>
<td align="left">Listar volumen del ticket</td>
</tr>
<tr>
<td height="17" align="right" sdval="196" sdnum="3082;">196</td>
<td align="left">Resolved</td>
<td align="left">E2E listar lineas ticket</td>
</tr>
<tr>
<td height="17" align="right" sdval="198" sdnum="3082;">198</td>
<td align="left">Resolved</td>
<td align="left">refactorizar tag con nuevo + - </td>
</tr>
<tr>
<td height="17" align="right" sdval="201" sdnum="3082;">201</td>
<td align="left">Resolved</td>
<td align="left">Listar Mana del cliente</td>
</tr>
<tr>
<td height="17" align="right" sdval="202" sdnum="3082;">202</td>
<td align="left">Resolved</td>
<td align="left">A&ntilde;adir a Sumario Cliente una seccion financia</td>
</tr>
<tr>
<td height="17" align="right" sdval="209" sdnum="3082;">209</td>
<td align="left">Resolved</td>
<td align="left">Contratos de credito</td>
</tr>
<tr>
<td height="17" align="right" sdval="210" sdnum="3082;">210</td>
<td align="left">Resolved</td>
<td align="left">item tags</td>
</tr>
<tr>
<td height="17" align="right" sdval="212" sdnum="3082;">212</td>
<td align="left">Resolved</td>
<td align="left">Mostrar solo las agencias con el campo isActive(tpv) en TRUE</td>
</tr>
<tr>
<td height="17" align="right" sdval="215" sdnum="3082;">215</td>
<td align="left">Resolved</td>
<td align="left">Seccion Configuracion paso 1</td>
</tr>
<tr>
<td height="17" align="right" sdval="220" sdnum="3082;">220</td>
<td align="left">Resolved</td>
<td align="left">Al crear un consignatario mirar RE</td>
</tr>
<tr>
<td height="17" align="right" sdval="222" sdnum="3082;">222</td>
<td align="left">Resolved</td>
<td align="left">nuevo dni espa&ntilde;a</td>
</tr>
<tr>
<td height="17" align="right" sdval="223" sdnum="3082;">223</td>
<td align="left">Resolved</td>
<td align="left">Manejador de errores global</td>
</tr>
<tr>
<td height="17" align="right" sdval="227" sdnum="3082;">227</td>
<td align="left">Resolved</td>
<td align="left">traducciones pendientes</td>
</tr>
<tr>
<td height="17" align="right" sdval="219" sdnum="3082;">219</td>
<td align="left">Feedback</td>
<td align="left">Pair programming</td>
</tr>
</table>
<!-- ************************************************************************** -->
</body>