feat: refs #7704 Major changes #2717

Merged
guillermo merged 18 commits from 7704-itemMinimalQuantity into dev 2024-07-12 07:43:46 +00:00
Member
No description provided.
guillermo added 1 commit 2024-07-11 06:57:57 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
02bcfd9be3
feat: refs #7704 Major changes
guillermo added 1 commit 2024-07-11 07:00:11 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
61a746c2d8
feat: refs #7704 Fixes
guillermo added 1 commit 2024-07-11 07:48:34 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
7ba2e8d4c5
feat: refs #7704 Fix tests
guillermo added 1 commit 2024-07-11 07:54:52 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
0416ebedb5
feat: refs #7704 Added grant
guillermo added 1 commit 2024-07-11 08:29:28 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
823756d71a
feat: refs #7704 Optimization
guillermo added 1 commit 2024-07-11 09:10:05 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
2e48263636
feat: refs #7704 Fix
guillermo added 1 commit 2024-07-11 09:28:03 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
90802bd330
feat: refs #7704 Minor changes
guillermo added 1 commit 2024-07-11 09:40:09 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
7bdc242fc7
feat: refs #7704 Added minQuantity to tmp.ticketCalculateItem
guillermo added 1 commit 2024-07-11 09:47:08 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
f1b0b95442
feat: refs #7704 Refactor
guillermo added 1 commit 2024-07-11 11:04:24 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
ca1933cb83
feat: refs #7704 Fixtures hedera
guillermo added 1 commit 2024-07-11 11:25:28 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
0d30331c9a
feat: refs #7704 Fixtures hedera
guillermo added 1 commit 2024-07-11 11:32:38 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
d9bd7ad84e
feat: refs #7704 Fix
guillermo added 1 commit 2024-07-11 11:45:27 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
443a752cfe
feat: refs #7704 Added check
guillermo added 1 commit 2024-07-11 12:27:20 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
9e3baeffa6
feat: refs #7704 Added tests
guillermo added 1 commit 2024-07-11 12:31:19 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
69e0d78537
feat: refs #7704 Fix tests
guillermo requested review from jgallego 2024-07-11 12:34:47 +00:00
jgallego requested changes 2024-07-11 16:51:04 +00:00
Dismissed
@ -62,0 +59,4 @@
SELECT quantity INTO vMinQuantity
FROM vn.itemMinimumQuantity
WHERE itemFk = vItem
AND `started` <= util.VN_CURDATE()
Owner

açò no serà per a hui sera per al dia del pedido, es a dir, si hui fan un pedido per a campanya ha d'agafar si hi ha un min en el futur vShipment

açò no serà per a hui sera per al dia del pedido, es a dir, si hui fan un pedido per a campanya ha d'agafar si hi ha un min en el futur vShipment
guillermo marked this conversation as resolved
@ -60,6 +59,7 @@ BEGIN
price DECIMAL(10,2),
priceKg DECIMAL(10,2),
`grouping` INT(10) UNSIGNED,
minQuantity INT(11),
Owner

en la taula item minQuantity es int(10) unsigned millor respetar-ho

en la taula item minQuantity es int(10) unsigned millor respetar-ho
guillermo marked this conversation as resolved
@ -181,1 +183,4 @@
) bl ON bl.itemFk = tl.itemFk
LEFT JOIN (
SELECT itemFk, quantity, warehouseFk
FROM vn.itemMinimumQuantity
Owner

has posat el vn perque es precis?

has posat el vn perque es precis?
guillermo marked this conversation as resolved
@ -182,0 +184,4 @@
LEFT JOIN (
SELECT itemFk, quantity, warehouseFk
FROM vn.itemMinimumQuantity
WHERE `started` <= util.VN_CURDATE()
Owner

vShipped

vShipped
guillermo marked this conversation as resolved
@ -0,0 +19,4 @@
CONSTRAINT `itemMinimumQuantity_ibfk_2` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `itemMinimumQuantity_check_1` CHECK (`started` <= `ended`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
Owner

cal posar triggers similar als que te priceFixed per a que no puguen posar la started > ended. priceFixed concretament ho te mal perque permuta els valors, tu simplement llança un error.

cal posar triggers similar als que te priceFixed per a que no puguen posar la started > ended. priceFixed concretament ho te mal perque permuta els valors, tu simplement llança un error.
Author
Member

En la linea 20 ja está la restricció en forma de CHECK.

En la linea 20 ja está la restricció en forma de CHECK.
guillermo marked this conversation as resolved
@ -0,0 +1,57 @@
{
"name": "ItemMinimumQuantity",
"base": "VnModel",
"options": {
Owner

si volem logejar ho podem posar ací i crear ja la taula editorFk en la nova taula per exemple

si volem logejar ho podem posar ací i crear ja la taula editorFk en la nova taula per exemple
Author
Member

Fique la nova columna i els triggers que fiquen el editor, igualment, en el cas de que se vuiguera logejar caldria putjar versió de Salix igualment.

Fique la nova columna i els triggers que fiquen el editor, igualment, en el cas de que se vuiguera logejar caldria putjar versió de Salix igualment.
guillermo marked this conversation as resolved
@ -92,0 +93,4 @@
fields: ['quantity'],
where: {
itemFk: itemId,
started: {lte: now},
Owner

ticket .shipped

ticket .shipped
guillermo marked this conversation as resolved
@ -162,13 +153,9 @@ describe('sale model ', () => {
it('should increase quantity if you have enough available and the new price is the same as the previous one', async() => {
Owner

crea uno que
"should throw an error if the quantity is greater than the minimum quantity of the item but is out of range"

crea uno que "should throw an error if the quantity is greater than the minimum quantity of the item but is out of range"
guillermo marked this conversation as resolved
guillermo added 1 commit 2024-07-12 05:59:02 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
5c80a99543
feat: refs #7704 Requested changes
guillermo requested review from jgallego 2024-07-12 05:59:16 +00:00
jgallego requested changes 2024-07-12 06:21:52 +00:00
Dismissed
@ -182,0 +185,4 @@
WHERE `started` <= vShipped
AND (`ended` >= vShipped OR `ended` IS NULL)
GROUP BY itemFk, warehouseFk
ORDER BY warehouseFk DESC
Owner

2 coses:

  • per a que ordenes?

  • fes una prova posant per a un mateix rango un registre amb warehouse i uno sense, i ha d'agafar el que sí te perque es mes específic.

2 coses: - per a que ordenes? - fes una prova posant per a un mateix rango un registre amb warehouse i uno sense, i ha d'agafar el que sí te perque es mes específic.
Author
Member

Ordene perque vuic primer els que tinguen warehouseFk i els últims els nulls, quan ho he desarrollat he pensat ja en aixo.

Ordene perque vuic primer els que tinguen warehouseFk i els últims els nulls, quan ho he desarrollat he pensat ja en aixo.
guillermo marked this conversation as resolved
@ -0,0 +2,4 @@
"name": "ItemMinimumQuantity",
"base": "VnModel",
"options": {
"mysql": {
Owner

si ací poses
"mixins": {
"Loggable": true
},
amb lo que has fet de l'editor queda molt poc per a que ja logeje no?
exemple ClaimEnd

si ací poses "mixins": { "Loggable": true }, amb lo que has fet de l'editor queda molt poc per a que ja logeje no? exemple ClaimEnd
Author
Member

Se decide que la tabla también haga log en itemLog

Se decide que la tabla también haga log en itemLog
guillermo marked this conversation as resolved
@ -232,2 +211,4 @@
}
});
it('should throw an error if the quantity is greater than the minimum quantity of the item but is out of range', async() => {
Owner

no em cuadra descripcio amb l'error

no em cuadra descripcio amb l'error
guillermo marked this conversation as resolved
guillermo added 1 commit 2024-07-12 07:03:41 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
bb787b1581
refactor: refs #7704 Requested changes
guillermo added 1 commit 2024-07-12 07:11:57 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
910071bde0
refactor: refs #7704 Requested changes
guillermo requested review from jgallego 2024-07-12 07:12:03 +00:00
jgallego approved these changes 2024-07-12 07:16:17 +00:00
guillermo merged commit 9b8e2e1279 into dev 2024-07-12 07:43:46 +00:00
guillermo deleted branch 7704-itemMinimalQuantity 2024-07-12 07:43:46 +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#2717
No description provided.