diff --git a/db/changes/230401/00-ticket_canAdvance.sql b/db/changes/230401/00-ticket_canAdvance.sql index 05200aa57..2072259b1 100644 --- a/db/changes/230401/00-ticket_canAdvance.sql +++ b/db/changes/230401/00-ticket_canAdvance.sql @@ -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 diff --git a/modules/ticket/front/advance/index.html b/modules/ticket/front/advance/index.html index bd274b7fb..d82d8cc50 100644 --- a/modules/ticket/front/advance/index.html +++ b/modules/ticket/front/advance/index.html @@ -32,7 +32,7 @@ - Origin + Origin Destination @@ -43,13 +43,15 @@ check-field="checked"> + + ID Date - + IPT @@ -67,7 +69,7 @@ Date - + IPT @@ -92,6 +94,13 @@ vn-click-stop> + + + + ' + this.$t(`Destination agency`, {agency: agency}); + } + moveTicketsAdvance() { let ticketsToMove = []; this.checked.forEach(ticket => { diff --git a/modules/ticket/front/advance/locale/es.yml b/modules/ticket/front/advance/locale/es.yml index b444fbdd3..da22cd433 100644 --- a/modules/ticket/front/advance/locale/es.yml +++ b/modules/ticket/front/advance/locale/es.yml @@ -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}}" diff --git a/modules/ticket/front/advance/style.scss b/modules/ticket/front/advance/style.scss new file mode 100644 index 000000000..8fa9de438 --- /dev/null +++ b/modules/ticket/front/advance/style.scss @@ -0,0 +1,7 @@ +@import "variables"; + +vn-ticket-advance{ + vn-icon { + color: #f7931e + } +}