Merge branch 'dev' into 6921_addFromDelivery
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-04-18 14:52:57 +00:00
commit f4afda8cb2
3 changed files with 23 additions and 14 deletions

View File

@ -13,11 +13,16 @@ proc:BEGIN
* @param vCollectionFk Id de colección
*/
DECLARE vHasTooMuchCollections BOOL;
DECLARE vItemPackingTypeFk VARCHAR(1);
DECLARE vWarehouseFk INT;
DECLARE vLockName VARCHAR(215);
DECLARE vLockTime INT DEFAULT 15;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
DO RELEASE_LOCK('collection_assign');
IF vLockName IS NOT NULL THEN
DO RELEASE_LOCK(vLockName);
END IF;
RESIGNAL;
END;
@ -28,7 +33,7 @@ proc:BEGIN
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0
INTO vHasTooMuchCollections
FROM tCollection
JOIN productionConfig pc ;
JOIN productionConfig pc;
DROP TEMPORARY TABLE tCollection;
@ -37,7 +42,18 @@ proc:BEGIN
LEAVE proc;
END IF;
IF NOT GET_LOCK('collection_assign',vLockTime) THEN
SELECT warehouseFk, itemPackingTypeFk
INTO vWarehouseFk, vItemPackingTypeFk
FROM operator
WHERE workerFk = vUserFk;
SET vLockName = CONCAT_WS('/',
'collection_assign',
vWarehouseFk,
vItemPackingTypeFk
);
IF NOT GET_LOCK(vLockName, vLockTime) THEN
LEAVE proc;
END IF;
@ -90,6 +106,6 @@ proc:BEGIN
SET workerFk = vUserFk
WHERE id = vCollectionFk;
DO RELEASE_LOCK('collection_assign');
DO RELEASE_LOCK(vLockName);
END$$
DELIMITER ;

View File

@ -4,16 +4,9 @@ BEGIN
DECLARE vRate DOUBLE DEFAULT 1;
DECLARE vDated DATE;
DECLARE vExpenseFk VARCHAR(10);
DECLARE vIsBooked BOOLEAN DEFAULT FALSE;
SELECT isBooked INTO vIsBooked
FROM invoiceIn ii
WHERE id = vInvoiceInFk;
CALL invoiceIn_checkBooked(vInvoiceInFk);
IF vIsBooked THEN
CALL util.throw('A booked invoice cannot be modified');
END IF;
SELECT MAX(rr.dated) INTO vDated
FROM referenceRate rr
JOIN invoiceIn ii ON ii.id = vInvoiceInFk

View File

@ -81,7 +81,7 @@
<vn-th>City</vn-th>
<vn-th shrink>PC</vn-th>
<vn-th>Client</vn-th>
<vn-th>Warehouse</vn-th>
<vn-th>State</vn-th>
<vn-th number shrink>Packages</vn-th>
<vn-th shrink></vn-th>
<vn-th shrink>Packaging</vn-th>
@ -109,7 +109,7 @@
{{ticket.nickname}}
</span>
</vn-td>
<vn-td>{{ticket.warehouseName}}</vn-td>
<vn-td>{{ticket.ticketStateName}}</vn-td>
<vn-td number shrink>{{ticket.packages}}</vn-td>
<vn-td shrink>{{ticket.volume}}</vn-td>
<vn-td shrink>{{ticket.ipt}}</vn-td>