#6335 -ticketAdvance_splitOrCreate #1817
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1817
Loading…
Reference in New Issue
No description provided.
Delete Branch "6335-ticketAdvance_splitOrCreate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +31,4 @@
SELECT itemFk, quantity
FROM itemEntryIn
WHERE landed >= vDateInventory
AND landed <= vDateToAdvance
Aci he canviat que possava
< vDateFuture
@ -0,0 +69,4 @@
origin.futureZoneName,
origin.classColor futureClassColor,
dest.classColor,
IFNULL(dest.clientFk, origin.clientFk) clientFk,
clientFk origin
nickname ifnull
addressFk origin
zones dos
warehouseFk origin
companyFk origin
agencyModeFk dos
@ -0,0 +113,4 @@
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
) origin
LEFT JOIN (
I he possat este LEFT JOIN
6335-ticketAdvance_splitOrCreateto #6335 -ticketAdvance_splitOrCreate@ -0,0 +70,4 @@
origin.classColor futureClassColor,
dest.classColor,
IFNULL(dest.clientFk, origin.clientFk) clientFk,
IFNULL(dest.nickname, origin.nickname) nickname,
Asegurat que es necesari el ifnull perque intuisc que uno dels dos sempre ha d'estar..
Sisi es necesari pq vols sempre el desti pero com te LEFT JOIN el desti pot ser null. Entonces lo que se fara sera gastar el mateix de origen
@ -145,1 +158,4 @@
salesNewTicket,
myOptions
);
args.id = newTicket.id;
revisar
descarte per a que em pugues tornar a enviar aprobacio
@ -0,0 +1,152 @@
DELIMITER $$
$$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT)
posa un comentari en gitea amb que has modificat aci.
@ -198,2 +198,3 @@
"The ticket is in preparation": "The ticket [{{ticketId}}]({{{ticketUrl}}}) of the sales person {{salesPersonId}} is in preparation",
"You can only add negative amounts in refund tickets": "You can only add negative amounts in refund tickets"
"You can only add negative amounts in refund tickets": "You can only add negative amounts in refund tickets",
"newTicket": "New ticket",
d'on ix un text en camel case?
@ -0,0 +14,4 @@
SELECT inventoried INTO vDateInventory FROM config;
DROP TEMPORARY TABLE IF EXISTS tmp.stock;
CREATE TEMPORARY TABLE tmp.stock
CREATE OR REPLACE
@ -0,0 +145,4 @@
AND st.order <= 5
GROUP BY t.id
) dest ON dest.addressFk = origin.addressFk
WHERE origin.hasStock != 0;
WHERE origin.hasStock
@ -0,0 +30,4 @@
SELECT itemFk, quantity
FROM itemEntryIn
WHERE landed >= vDateInventory
AND landed <= vDateToAdvance
Aci he canviat que possava < vDateFuture
@ -0,0 +89,4 @@
GROUP_CONCAT(DISTINCT ipt.code ORDER BY ipt.code) futureIpt,
CAST(SUM(litros) AS DECIMAL(10,0)) futureLiters,
SUM((s.quantity <= IFNULL(st.amount,0))) hasStock,
z.id futureZoneFk,
Añadidos campos necesarios para el front
@ -0,0 +113,4 @@
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
) origin
LEFT JOIN (
Añadido LEFT JOIN
@ -180,2 +196,4 @@
]
}, myOptions);
const originalTicket = JSON.parse(JSON.stringify(ticketToChange));
const ticketChages = {
changes
@ -156,0 +215,4 @@
const params = {
clientFk: ticket.clientFk,
nickname: ticket.nickname,
agencyModeFk: ticket.agencyModeFk,
dest OR origin
@ -156,0 +217,4 @@
nickname: ticket.nickname,
agencyModeFk: ticket.agencyModeFk,
addressFk: ticket.addressFk,
zoneFk: ticket.zoneFk,
dest OR origin
New commits pushed, approval review dismissed automatically according to repository settings