8144-devToTest_2448 #3216

Merged
alexm merged 256 commits from 8144-devToTest_2448 into test 2024-11-19 07:36:04 +00:00
7 changed files with 30 additions and 11 deletions
Showing only changes of commit 7f39edf014 - Show all commits

View File

@ -57,10 +57,10 @@ module.exports = Self => {
ROW_NUMBER () OVER (PARTITION BY s.id ORDER BY pickingOrder) currentItemShelving,
COUNT(*) OVER (PARTITION BY s.id ORDER BY s.id) totalItemShelving,
sh.code,
p2.code parkingCode,
p2.pickingOrder pickingOrder,
p.code parkingCodePrevia,
p.pickingOrder pickingOrderPrevia,
p2.code parkingCodePrevia,
p2.pickingOrder pickingOrderPrevia,
p.code parkingCode,
p.pickingOrder pickingOrder,
iss.id itemShelvingSaleFk,
iss.isPicked,
iss.itemShelvingFk

View File

@ -3,7 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setQ
vItemShelvingSaleFk INT(10),
vQuantity DECIMAL(10,0),
vIsItemShelvingSaleEmpty BOOLEAN,
vSectorFk INT
vSectorFk INT,
vShelvingFk VARCHAR(10)
)
BEGIN
/**
@ -24,6 +25,7 @@ BEGIN
DECLARE vItemFk INT;
DECLARE vTotalQuantity INT;
DECLARE vStateCode VARCHAR(45);
DECLARE vCurrentShelvingFk VARCHAR(10);
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
@ -45,18 +47,25 @@ BEGIN
iss.saleFk,
iss.itemShelvingFk,
SUM(IFNULL(iss.quantity,0)),
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED')
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED'),
ish.shelvingFk
INTO vItemFk,
vSaleFk,
vItemShelvingFk,
vReservedQuantity,
vStateCode
vStateCode,
vCurrentShelvingFk
FROM itemShelvingSale iss
JOIN sale s ON s.id = iss.saleFk
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk
WHERE iss.id = vItemShelvingSaleFk
AND NOT iss.isPicked;
IF NOT (vCurrentShelvingFk <=> vShelvingFk) THEN
CALL util.throw('The shelving can not be different from the shelving reserved');
END IF;
IF vQuantity > vReservedQuantity
OR (vQuantity < vReservedQuantity AND NOT vIsItemShelvingSaleEmpty)
OR (vQuantity = vReservedQuantity AND vIsItemShelvingSaleEmpty) THEN

View File

@ -80,7 +80,7 @@ proc: BEGIN
UPDATE stockBought s
JOIN tStockSold ts ON ts.workerFk = s.workerFk
SET s.bought = IF(s.bought < ts.sold, ROUND(s.bought - ts.sold, 1), 0)
SET s.bought = IF(s.bought < ABS(ts.sold), 0, ROUND(s.bought - ABS(ts.sold), 1))
WHERE s.dated = vDated;
DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold;

View File

@ -50,8 +50,11 @@ module.exports = Self => {
i.id itemFk,
i.name itemName,
ti.quantity,
ROUND((ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id))
/ (vc.trolleyM3 * 1000000),1) volume,
ROUND((ac.conversionCoefficient *
(ti.quantity / b.packing) *
buy_getVolume(b.id)
) / (vc.trolleyM3 * 1000000),
2) volume,
b.packagingFk packagingFk,
b.packing
FROM tmp.item ti

View File

@ -1,7 +1,7 @@
export * from './module';
import './main';
import './summary';
import './descriptor';
import './descriptor-popover';
import './descriptor-menu';
import './summary';

View File

@ -34,6 +34,12 @@
"params": {
"invoice-out": "$ctrl.invoiceOut"
}
},
{
"url": "/:id",
"state": "invoiceOut.card",
"abstract": true,
"component": "vn-invoice-out-card"
}
]
}

View File

@ -37,6 +37,7 @@ module.exports = Self => {
'name',
'subName',
'itemPackingTypeFk',
'size',
'tag5',
'value5',
'tag6',