#6335 -ticketAdvance_splitOrCreate #1817

Merged
alexm merged 15 commits from 6335-ticketAdvance_splitOrCreate into dev 2023-11-17 06:55:59 +00:00
Member
No description provided.
alexm added 7 commits 2023-11-02 10:02:18 +00:00
alexm reviewed 2023-11-02 10:02:50 +00:00
@ -0,0 +31,4 @@
SELECT itemFk, quantity
FROM itemEntryIn
WHERE landed >= vDateInventory
AND landed <= vDateToAdvance
Author
Member

Aci he canviat que possava < vDateFuture

Aci he canviat que possava `< vDateFuture`
alexm reviewed 2023-11-02 10:05:38 +00:00
@ -0,0 +69,4 @@
origin.futureZoneName,
origin.classColor futureClassColor,
dest.classColor,
IFNULL(dest.clientFk, origin.clientFk) clientFk,
Author
Member

clientFk origin
nickname ifnull
addressFk origin
zones dos
warehouseFk origin
companyFk origin
agencyModeFk dos

clientFk origin nickname ifnull addressFk origin zones dos warehouseFk origin companyFk origin agencyModeFk dos
alexm marked this conversation as resolved
alexm reviewed 2023-11-02 10:05:53 +00:00
@ -0,0 +113,4 @@
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
) origin
LEFT JOIN (
Author
Member

I he possat este LEFT JOIN

I he possat este LEFT JOIN
alexm added 2 commits 2023-11-03 06:57:53 +00:00
alexm requested review from jgallego 2023-11-03 06:58:32 +00:00
alexm changed title from 6335-ticketAdvance_splitOrCreate to #6335 -ticketAdvance_splitOrCreate 2023-11-03 06:58:42 +00:00
jgallego requested changes 2023-11-03 12:59:30 +00:00
@ -0,0 +70,4 @@
origin.classColor futureClassColor,
dest.classColor,
IFNULL(dest.clientFk, origin.clientFk) clientFk,
IFNULL(dest.nickname, origin.nickname) nickname,
Owner

Asegurat que es necesari el ifnull perque intuisc que uno dels dos sempre ha d'estar..

Asegurat que es necesari el ifnull perque intuisc que uno dels dos sempre ha d'estar..
Author
Member

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

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
alexm marked this conversation as resolved
alexm requested review from jgallego 2023-11-03 13:49:58 +00:00
alexm reviewed 2023-11-08 06:39:34 +00:00
@ -145,1 +158,4 @@
salesNewTicket,
myOptions
);
args.id = newTicket.id;
Author
Member

revisar

revisar
alexm marked this conversation as resolved
jgallego requested changes 2023-11-08 09:20:01 +00:00
jgallego left a comment
Owner

descarte per a que em pugues tornar a enviar aprobacio

descarte per a que em pugues tornar a enviar aprobacio
alexm added 2 commits 2023-11-10 07:47:02 +00:00
alexm added 1 commit 2023-11-10 09:59:33 +00:00
alexm requested review from jgallego 2023-11-10 09:59:49 +00:00
jgallego requested changes 2023-11-13 06:10:37 +00:00
@ -0,0 +1,152 @@
DELIMITER $$
$$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT)
Owner

posa un comentari en gitea amb que has modificat aci.

posa un comentari en gitea amb que has modificat aci.
alexm marked this conversation as resolved
@ -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",
Owner

d'on ix un text en camel case?

d'on ix un text en camel case?
alexm marked this conversation as resolved
alexm reviewed 2023-11-13 11:46:41 +00:00
@ -0,0 +14,4 @@
SELECT inventoried INTO vDateInventory FROM config;
DROP TEMPORARY TABLE IF EXISTS tmp.stock;
CREATE TEMPORARY TABLE tmp.stock
Author
Member

CREATE OR REPLACE

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;
Author
Member

WHERE origin.hasStock

WHERE origin.hasStock
@ -0,0 +30,4 @@
SELECT itemFk, quantity
FROM itemEntryIn
WHERE landed >= vDateInventory
AND landed <= vDateToAdvance
Author
Member

Aci he canviat que possava < vDateFuture

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,
Author
Member

Añadidos campos necesarios para el front

Añadidos campos necesarios para el front
@ -0,0 +113,4 @@
AND t.warehouseFk = vWarehouseFk
GROUP BY t.id
) origin
LEFT JOIN (
Author
Member

Añadido LEFT JOIN

Añadido LEFT JOIN
@ -180,2 +196,4 @@
]
}, myOptions);
const originalTicket = JSON.parse(JSON.stringify(ticketToChange));
const ticketChages = {
Author
Member

changes

changes
@ -156,0 +215,4 @@
const params = {
clientFk: ticket.clientFk,
nickname: ticket.nickname,
agencyModeFk: ticket.agencyModeFk,
Author
Member

dest OR origin

dest OR origin
@ -156,0 +217,4 @@
nickname: ticket.nickname,
agencyModeFk: ticket.agencyModeFk,
addressFk: ticket.addressFk,
zoneFk: ticket.zoneFk,
Author
Member

dest OR origin

dest OR origin
alexm added 1 commit 2023-11-13 11:53:59 +00:00
gitea/salix/pipeline/head This commit looks good Details
47d85c4c61
refs #6335 fix: remove unnecessary translations
alexm requested review from jgallego 2023-11-13 11:59:05 +00:00
jgallego approved these changes 2023-11-14 08:59:40 +00:00
Dismissed
alexm added 1 commit 2023-11-14 09:00:20 +00:00
alexm added 1 commit 2023-11-16 08:58:46 +00:00
alexm dismissed jgallego’s review 2023-11-16 08:58:46 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jgallego approved these changes 2023-11-17 06:47:47 +00:00
alexm merged commit 21701c40ae into dev 2023-11-17 06:55:59 +00:00
alexm deleted branch 6335-ticketAdvance_splitOrCreate 2023-11-17 06:55:59 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1817
No description provided.