refs #5131 agencies icon
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-01-31 14:20:08 +01:00
parent 87bef62e35
commit b70557ee86
5 changed files with 34 additions and 4 deletions

View File

@ -65,7 +65,9 @@ BEGIN
t.shipped futureShipped,
t2.totalWithVat,
t.totalWithVat futureTotalWithVat,
t2.hasStock
t2.hasStock,
t2.agency,
am.name futureAgency
FROM vn.ticket t
JOIN vn.ticketState ts ON ts.ticketFk = t.id
JOIN vn.state st ON st.id = ts.stateFk
@ -78,12 +80,14 @@ BEGIN
GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) ipt,
t2.shipped,
t2.totalWithVat,
am.name agency,
sum((s.quantity <= IFNULL(st.amount,0))) hasStock
FROM vn.ticket t2
JOIN vn.sale s ON s.ticketFk = t2.id
JOIN vn.item i ON i.id = s.itemFk
JOIN vn.ticketState ts ON ts.ticketFk = t2.id
JOIN vn.state st ON st.id = ts.stateFk
JOIN vn.agencyMode am ON t2.agencyModeFk = am.id
LEFT JOIN vn.itemPackingType ipt ON ipt.code = i.itemPackingTypeFk
LEFT JOIN tmp.stock st ON st.itemFk = s.itemFk
WHERE t2.shipped BETWEEN vDateToAdvance AND util.dayend(vDateToAdvance)
@ -91,6 +95,7 @@ BEGIN
GROUP BY t2.id) t2 ON t2.addressFk = t.addressFk
JOIN vn.sale s ON s.ticketFk = t.id
JOIN vn.item i ON i.id = s.itemFk
JOIN vn.agencyMode am ON t.agencyModeFk = am.id
LEFT JOIN vn.itemPackingType ipt ON ipt.code = i.itemPackingTypeFk
WHERE t.shipped BETWEEN vDateFuture AND util.dayend(vDateFuture)
AND t.warehouseFk = vWarehouseFk

View File

@ -32,7 +32,7 @@
<thead>
<tr second-header>
<td></td>
<th colspan="5" translate>Origin</th>
<th colspan="6" translate>Origin</th>
<th colspan="8" translate>Destination</th>
</tr>
<tr>
@ -43,13 +43,15 @@
check-field="checked">
</vn-multi-check>
</th>
<th shrink>
</th>
<th field="futureId">
<span translate>ID</span>
</th>
<th field="futureShipped">
<span translate>Date</span>
</th>
<th field="futureIpt" title="Item Packing Type">
<th field="futureIpt" title="{{'Item Packing Type' | translate}}">
<span>IPT</span>
</th>
<th field="futureState">
@ -67,7 +69,7 @@
<th field="shipped">
<span translate>Date</span>
</th>
<th field="ipt" title="Item Packing Type">
<th field="ipt" title="{{'Item Packing Type' | translate}}">
<span>IPT</span>
</th>
<th field="state">
@ -92,6 +94,13 @@
vn-click-stop>
</vn-check>
</td>
<td>
<vn-icon
ng-show="ticket.futureAgency !== ticket.agency"
icon="icon-agency-term"
vn-tooltip="{{$ctrl.agencies(ticket.futureAgency, ticket.agency)}}">
</vn-icon>
</td>
<td>
<span
ng-click="ticketDescriptor.show($event, ticket.futureId)"

View File

@ -1,5 +1,6 @@
import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
export default class Controller extends Section {
constructor($element, $) {
@ -128,6 +129,11 @@ export default class Controller extends Section {
});
}
agencies(futureAgency, agency) {
return this.$t(`Origin agency`, {agency: futureAgency}) +
'<br/>' + this.$t(`Destination agency`, {agency: agency});
}
moveTicketsAdvance() {
let ticketsToMove = [];
this.checked.forEach(ticket => {

View File

@ -4,3 +4,6 @@ Advance confirmation: ¿Desea adelantar {{checked}} tickets?
Success: Tickets movidos correctamente
Lines: Líneas
Liters: Litros
Item Packing Type: Encajado
Origin agency: "Agencia origen: {{agency}}"
Destination agency: "Agencia destino: {{agency}}"

View File

@ -0,0 +1,7 @@
@import "variables";
vn-ticket-advance{
vn-icon {
color: #f7931e
}
}