feat: refs #8119 itemCampaignQuantity #3117

Merged
guillermo merged 20 commits from 8119-itemCampaignQuantity into master 2024-10-23 10:40:43 +00:00
Member
No description provided.
guillermo added 1 commit 2024-10-17 08:08:37 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
999cb2dbb4
feat: refs #8119 itemCampaignQuantity
guillermo added 1 commit 2024-10-17 08:08:51 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
a8525c5ba8
Merge branch 'master' into 8119-itemCampaignQuantity
guillermo requested review from jgallego 2024-10-17 08:09:11 +00:00
guillermo added 2 commits 2024-10-17 08:10:00 +00:00
guillermo added 1 commit 2024-10-17 08:15:49 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
3628abd5bf
feat: refs #8119 itemCampaignQuantity
guillermo added 1 commit 2024-10-17 08:16:30 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
41d078aaf1
feat: refs #8119 itemCampaignQuantity
guillermo added 1 commit 2024-10-17 08:21:43 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
8ca69d3574
feat: refs #8119 Minor change
guillermo added 1 commit 2024-10-17 08:29:38 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2bd98b7fb6
feat: refs #8119 Minor change
guillermo added 1 commit 2024-10-17 09:06:15 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
f85267db92
feat: refs #8119 Fix test
jgallego requested changes 2024-10-17 10:41:49 +00:00
Dismissed
@ -0,0 +1,83 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemCampaignQuantity_add`(
vDateFrom DATE,
Owner

que aporta que puguen pasar parametros a NULL? jo crec que no deixaria..i a mes el yesterday no comprenc per a que, ha de mirar fecha campaña menos x

que aporta que puguen pasar parametros a NULL? jo crec que no deixaria..i a mes el yesterday no comprenc per a que, ha de mirar fecha campaña menos x
Author
Member

Per a poder ficar-lo en el event i que siga lo mes sencill posible.

El yesterday se gasta perque el event se executa a les 3AM, pero volem vore ahir, ja que s'ha completat el día.

Per a poder ficar-lo en el event i que siga lo mes sencill posible. El yesterday se gasta perque el event se executa a les 3AM, pero volem vore ahir, ja que s'ha completat el día.
guillermo marked this conversation as resolved
@ -0,0 +68,4 @@
INSERT INTO itemCampaignQuantity(dated, itemFk, quantity, campaign)
SELECT DATE(s.created),
s.itemFk,
SUM(CASE WHEN t.shipped BETWEEN vDateSumFrom AND vDateSumTo
Owner

jo crec que el case no cal, simplement, lo que torne el where es suma

jo crec que el case no cal, simplement, lo que torne el where es suma
Author
Member

Si que fa falta, ja que volem sumar de vDateFrom y vDateTo soles de ixos rango de dies (vDateSumFrom y vDateSumTo).

Si vols torna a vore el codi i si no comentem.

Si que fa falta, ja que volem sumar de vDateFrom y vDateTo soles de ixos rango de dies (vDateSumFrom y vDateSumTo). Si vols torna a vore el codi i si no comentem.
guillermo marked this conversation as resolved
@ -0,0 +1,24 @@
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantity` (
Owner

posali una definicio de que es guarda en esta taula

posali una definicio de que es guarda en esta taula
guillermo marked this conversation as resolved
@ -0,0 +3,4 @@
itemFk int(11) NOT NULL,
quantity decimal(10,2) NOT NULL,
campaign varchar(100) NOT NULL,
CONSTRAINT itemCampaignQuantity_pk PRIMARY KEY (dated,itemFk),
Owner

posali un camp id, que a salix les claus primaries dobles no les gestiona be, despues ja poses una clau unique en item,quantity

posali un camp id, que a salix les claus primaries dobles no les gestiona be, despues ja poses una clau unique en item,quantity
guillermo marked this conversation as resolved
@ -0,0 +12,4 @@
CREATE TABLE IF NOT EXISTS `vn`.`itemCampaignQuantityConfig` (
id int(10) unsigned NOT NULL PRIMARY KEY,
defaultCampaign varchar(100) NOT NULL COMMENT 'Campaña por defecto si se le pasa NULL',
Owner

açò deuria tindre una Fk a la taula campaing?

açò deuria tindre una Fk a la taula campaing?
Author
Member

No se puede, ya que en la tabla campaign hay más de 1 registro con ese dato, y además es de tipo ENUM.

No se puede, ya que en la tabla campaign hay más de 1 registro con ese dato, y además es de tipo ENUM.
guillermo marked this conversation as resolved
guillermo added 1 commit 2024-10-18 05:35:42 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
4bd28c62b9
feat: refs #8119 Requested changes
guillermo requested review from jgallego 2024-10-18 05:35:58 +00:00
guillermo added 1 commit 2024-10-18 05:44:31 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
7e604f1a19
feat: refs #8119 Requested changes
jgallego requested changes 2024-10-21 09:05:49 +00:00
Dismissed
@ -0,0 +65,4 @@
SET vDateSumFrom = vDateSumTo - INTERVAL vScopeDays DAY;
REPLACE itemCampaignQuantity(dated, itemFk, quantity, campaign)
Owner

vol guardar tallos y euros

vol guardar tallos y euros
guillermo marked this conversation as resolved
guillermo added 1 commit 2024-10-22 06:41:50 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
5162c2037b
feat: refs #8119 Requested changes
guillermo requested review from jgallego 2024-10-22 06:41:57 +00:00
guillermo added 1 commit 2024-10-22 06:42:05 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
b4d2c69b37
Merge branch 'master' into 8119-itemCampaignQuantity
guillermo added 2 commits 2024-10-22 13:00:20 +00:00
jgallego requested changes 2024-10-23 04:41:07 +00:00
Dismissed
@ -0,0 +40,4 @@
REPLACE itemCampaign(dated, itemFk, quantity, total, campaign)
SELECT DATE(s.created),
s.itemFk,
SUM(CASE WHEN t.shipped BETWEEN vDateSumFrom AND vDateSumTo
Owner

aci es on et comentaba que el from y el tu van en el where i despues agrupem tot junt per item

aci es on et comentaba que el from y el tu van en el where i despues agrupem tot junt per item
guillermo marked this conversation as resolved
@ -0,0 +50,4 @@
FROM sale s
JOIN ticket t ON t.id = s.ticketFk
JOIN client c ON c.id = t.clientFk
WHERE s.created BETWEEN vYesterday AND util.dayEnd(vYesterday)
Owner

el rango que ha d'agafar es del 15 d'octubre al 31 d'octubre (aprox)

el rango que ha d'agafar es del 15 d'octubre al 31 d'octubre (aprox)
guillermo marked this conversation as resolved
@ -0,0 +52,4 @@
JOIN client c ON c.id = t.clientFk
WHERE s.created BETWEEN vYesterday AND util.dayEnd(vYesterday)
AND c.typeFk = 'normal'
GROUP BY DATE(s.created), s.itemFk
Owner

al voler-ho tot junt el group by ha de ser per itemFk soles

al voler-ho tot junt el group by ha de ser per itemFk soles
guillermo marked this conversation as resolved
guillermo added 1 commit 2024-10-23 06:23:57 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
baec188ff5
feat: refs #8119 Requested changes
guillermo requested review from jgallego 2024-10-23 06:24:40 +00:00
guillermo added 1 commit 2024-10-23 06:26:40 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
37050361c2
feat: refs #8119 Requested changes
guillermo added 1 commit 2024-10-23 06:27:11 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
31c89538bc
feat: refs #8119 Requested changes
guillermo added 1 commit 2024-10-23 06:30:24 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
3cde6b6bc6
feat: refs #8119 Requested changes
jgallego approved these changes 2024-10-23 10:34:43 +00:00
guillermo added 1 commit 2024-10-23 10:38:02 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
9eaa5a7585
Merge branch 'master' into 8119-itemCampaignQuantity
guillermo merged commit 9341a51ed4 into master 2024-10-23 10:40:43 +00:00
guillermo deleted branch 8119-itemCampaignQuantity 2024-10-23 10:40:43 +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#3117
No description provided.