Merge branch 'dev' of https: refs #7663//gitea.verdnatura.es/verdnatura/salix into 7663-setWeight
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-09-06 11:29:53 +02:00
commit 26d47b3f38
1188 changed files with 2164 additions and 3227 deletions

View File

@ -15,9 +15,7 @@ describe('ticket assignCollection()', () => {
args: {} args: {}
}; };
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: ctx.req});
active: ctx.req
});
options = {transaction: tx}; options = {transaction: tx};
tx = await models.Sale.beginTransaction({}); tx = await models.Sale.beginTransaction({});
@ -25,7 +23,7 @@ describe('ticket assignCollection()', () => {
}); });
afterEach(async() => { afterEach(async() => {
await tx.rollback(); if (tx) await tx.rollback();
}); });
it('should throw an error when there is not picking tickets', async() => { it('should throw an error when there is not picking tickets', async() => {

View File

@ -1959,7 +1959,7 @@ INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimV
INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL);
INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL);
INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL); INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL);
INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL); INSERT INTO `ACL` VALUES (750,'InvoiceOut','transfer','WRITE','ALLOW','ROLE','administrative',NULL);
INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL); INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL);

View File

@ -1 +1,10 @@
-- Executed after dump CREATE USER 'vn'@'localhost';
GRANT SELECT,
INSERT,
UPDATE,
DELETE,
CREATE TEMPORARY TABLES,
EXECUTE,
TRIGGER
ON *.* TO 'vn'@'localhost';

View File

@ -3920,6 +3920,16 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli
(1, '2001-05-17', 1, 5), (1, '2001-05-17', 1, 5),
(1, '2001-05-18', 1, 5); (1, '2001-05-18', 1, 5);
INSERT INTO vn.medicalReview
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
VALUES(1, 1106, 1, '2000-01-01', '08:10', 1, 200.0, NULL, '');
INSERT INTO vn.medicalReview
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
VALUES(2, 1106, 2, '2001-01-01', '09:10', 0, 10.0, NULL, NULL);
INSERT INTO vn.medicalReview
(id, workerFk, centerFk, `date`, `time`, isFit, amount, invoice, remark)
VALUES(3, 9, 2, '2000-01-01', '8:00', 1, 150.0, NULL, NULL);
INSERT INTO vn.payrollComponent INSERT INTO vn.payrollComponent
(id, name, isSalaryAgreed, isVariable, isException) (id, name, isSalaryAgreed, isVariable, isException)
VALUES VALUES
@ -3957,3 +3967,7 @@ VALUES
(4, 'Referencia Transferencias', 'trnRef'), (4, 'Referencia Transferencias', 'trnRef'),
(5, 'Referencia Nominas', 'payRef'), (5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'aba'); (6, 'ABA', 'aba');
INSERT IGNORE INTO ormConfig
SET id =1,
selectLimit = 1000;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`clean`() CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`clean`()
BEGIN BEGIN
DECLARE vDateShort DATETIME; DECLARE vDateShort DATETIME;
DECLARE vDateLong DATETIME; DECLARE vDateLong DATETIME;
@ -15,5 +15,5 @@ BEGIN
DELETE FROM bi.defaulters WHERE `date` < vDateLong; DELETE FROM bi.defaulters WHERE `date` < vDateLong;
DELETE FROM bi.defaulting WHERE `date` < vDateLong; DELETE FROM bi.defaulting WHERE `date` < vDateLong;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`() CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bi`.`facturacion_media_anual_update`()
BEGIN BEGIN
TRUNCATE TABLE bs.clientAnnualConsumption; TRUNCATE TABLE bs.clientAnnualConsumption;
@ -12,5 +12,5 @@ BEGIN
GROUP BY clientFk, year, month GROUP BY clientFk, year, month
) vol ) vol
GROUP BY clientFk; GROUP BY clientFk;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`carteras_add`() CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`carteras_add`()
BEGIN BEGIN
/** /**
* Inserta en la tabla @bs.carteras las ventas desde el año pasado * Inserta en la tabla @bs.carteras las ventas desde el año pasado
@ -23,5 +23,5 @@ BEGIN
GROUP BY w.code, t.`year`, t.`month`; GROUP BY w.code, t.`year`, t.`month`;
DROP TEMPORARY TABLE tmp.time; DROP TEMPORARY TABLE tmp.time;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`() CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`nightTask_launchAll`()
BEGIN BEGIN
/** /**
* Runs all nightly tasks. * Runs all nightly tasks.
@ -76,5 +76,5 @@ BEGIN
END IF; END IF;
END LOOP; END LOOP;
CLOSE vQueue; CLOSE vQueue;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,6 +1,6 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`() CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `bs`.`salesByItemTypeDay_addLauncher`()
BEGIN BEGIN
CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE()); CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE());
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_end`(IN `v_calc` INT)
BEGIN BEGIN
DECLARE v_cache_name VARCHAR(255); DECLARE v_cache_name VARCHAR(255);
DECLARE v_params VARCHAR(255); DECLARE v_params VARCHAR(255);
@ -21,5 +21,5 @@ BEGIN
IF v_cache_name IS NOT NULL THEN IF v_cache_name IS NOT NULL THEN
DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, ''))); DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
END IF; END IF;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100))
proc: BEGIN proc: BEGIN
DECLARE v_valid BOOL; DECLARE v_valid BOOL;
DECLARE v_lock_id VARCHAR(100); DECLARE v_lock_id VARCHAR(100);
@ -83,5 +83,5 @@ proc: BEGIN
-- Si se debe recalcular mantiene el bloqueo y devuelve su identificador. -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador.
SET v_refresh = TRUE; SET v_refresh = TRUE;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`claim_changeState` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`claim_changeState`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2024-06-06 07:52:46.000' STARTS '2024-06-06 07:52:46.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`client_unassignSalesPerson` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`client_unassignSalesPerson`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2023-06-01 03:30:00.000' STARTS '2023-06-01 03:30:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`client_userDisable` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`client_userDisable`
ON SCHEDULE EVERY 1 MONTH ON SCHEDULE EVERY 1 MONTH
STARTS '2023-06-01 00:00:00.000' STARTS '2023-06-01 00:00:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`collection_make` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`collection_make`
ON SCHEDULE EVERY 5 MINUTE ON SCHEDULE EVERY 5 MINUTE
STARTS '2022-09-15 00:00:00.000' STARTS '2022-09-15 00:00:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`department_doCalc` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`department_doCalc`
ON SCHEDULE EVERY 15 SECOND ON SCHEDULE EVERY 15 SECOND
STARTS '2019-11-15 00:00:00.000' STARTS '2019-11-15 00:00:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`envialiaThreHoldChecker` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`envialiaThreHoldChecker`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2022-01-28 09:52:46.000' STARTS '2022-01-28 09:52:46.000'
ON COMPLETION NOT PRESERVE ON COMPLETION NOT PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`greuge_notify` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`greuge_notify`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2023-01-01 00:07:00.000' STARTS '2023-01-01 00:07:00.000'
ON COMPLETION NOT PRESERVE ON COMPLETION NOT PRESERVE

View File

@ -1,11 +1,11 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`itemImageQueue_check` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`itemImageQueue_check`
ON SCHEDULE EVERY 1 HOUR ON SCHEDULE EVERY 1 HOUR
STARTS '2023-07-28 00:00:00.000' STARTS '2023-07-28 00:00:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE
ENABLE ENABLE
DO BEGIN DO BEGIN
DELETE FROM itemImageQueue DELETE FROM itemImageQueue
WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig); WHERE attempts >= (SELECT downloadMaxAttempts FROM itemConfig);
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`itemShelvingSale_doReserve`
ON SCHEDULE EVERY 15 SECOND ON SCHEDULE EVERY 15 SECOND
STARTS '2023-10-16 00:00:00' STARTS '2023-10-16 00:00:00'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`mysqlConnectionsSorter_kill`
ON SCHEDULE EVERY 1 MINUTE ON SCHEDULE EVERY 1 MINUTE
STARTS '2021-10-28 09:56:27.000' STARTS '2021-10-28 09:56:27.000'
ON COMPLETION NOT PRESERVE ON COMPLETION NOT PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`printQueue_check` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`printQueue_check`
ON SCHEDULE EVERY 10 MINUTE ON SCHEDULE EVERY 10 MINUTE
STARTS '2022-01-28 09:52:46.000' STARTS '2022-01-28 09:52:46.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`raidUpdate` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`raidUpdate`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2017-12-29 00:05:00.000' STARTS '2017-12-29 00:05:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`route_doRecalc` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`route_doRecalc`
ON SCHEDULE EVERY 10 SECOND ON SCHEDULE EVERY 10 SECOND
STARTS '2021-07-08 07:32:23.000' STARTS '2021-07-08 07:32:23.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`vehicle_notify` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`vehicle_notify`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2022-01-01 00:07:00.000' STARTS '2022-01-01 00:07:00.000'
ON COMPLETION NOT PRESERVE ON COMPLETION NOT PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`workerJourney_doRecalc` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`workerJourney_doRecalc`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2023-07-22 04:00:00.000' STARTS '2023-07-22 04:00:00.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`worker_updateChangedBusiness` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`worker_updateChangedBusiness`
ON SCHEDULE EVERY 1 DAY ON SCHEDULE EVERY 1 DAY
STARTS '2000-01-01 00:00:05.000' STARTS '2000-01-01 00:00:05.000'
ON COMPLETION NOT PRESERVE ON COMPLETION NOT PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`zoneGeo_doCalc` CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`zoneGeo_doCalc`
ON SCHEDULE EVERY 15 SECOND ON SCHEDULE EVERY 15 SECOND
STARTS '2019-09-13 15:30:47.000' STARTS '2019-09-13 15:30:47.000'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`MIDNIGHT`(vDate DATE)
RETURNS datetime RETURNS datetime
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`addressTaxArea`(vAddresId INT, vCompanyId INT)
RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`address_getGeo`(vSelf INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`barcodeToItem`(vBarcode VARCHAR(22))
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getUnitVolume`(vSelf INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getVolume`(vSelf INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT, CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`catalog_componentReverse`(vWarehouse INT,
vCost DECIMAL(10,3), vCost DECIMAL(10,3),
vM3 DECIMAL(10,3), vM3 DECIMAL(10,3),
vAddressFk INT, vAddressFk INT,

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientGetMana`(vClient INT)
RETURNS decimal(10,2) RETURNS decimal(10,2)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientGetSalesPerson`(vClientFk INT, vDated DATE)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`clientTaxArea`(vClientId INT, vCompanyId INT)
RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,8 +1,8 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getDebt`(`vClient` INT, `vDate` DATE)
RETURNS decimal(10,2) RETURNS decimal(10,2)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA
BEGIN BEGIN
/** /**
* Returns the risk of a customer. * Returns the risk of a customer.
@ -34,5 +34,5 @@ BEGIN
tmp.risk; tmp.risk;
RETURN vDebt; RETURN vDebt;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getFromPhone`(vPhone VARCHAR(255))
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPerson`(vClientFk INT, vDated DATE)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonByTicket`(vTicketFk INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonCode`(vClientFk INT, vDated DATE)
RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_getSalesPersonCodeByTicket`(vTicketFk INT)
RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`client_hasDifferentCountries`(vClientFk INT)
RETURNS tinyint(1) RETURNS tinyint(1)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`collection_isPacked`(vSelf INT)
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`currency_getCommission`(vSelf INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`currentRate`(vCurrencyFk INT, vDated DATE)
RETURNS decimal(10,4) RETURNS decimal(10,4)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50))
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`duaTax_getRate`(vDuaFk INT, vTaxClassFk INT)
RETURNS decimal(5,2) RETURNS decimal(5,2)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ekt_getEntry`(vEktFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ekt_getTravel`(vEntryAssignFk INT, vEktFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT, CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCommission`(vTravelFk INT,
vCurrencyFk INT, vCurrencyFk INT,
vSupplierFk INT vSupplierFk INT
) )

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT, CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getCurrency`(vCurrency INT,
vSupplierFk INT vSupplierFk INT
) )
RETURNS int(11) RETURNS int(11)

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_isIntrastat`(vSelf INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`entry_isInventoryOrPrevious`(vSelf INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT)
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`firstDayOfWeek`(vYear INT, vWeek INT)
RETURNS date RETURNS date
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getAlert3State`(vTicket INT)
RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getDueDate`(vDated DATE, vDayToPay INT)
RETURNS date RETURNS date
NOT DETERMINISTIC NOT DETERMINISTIC
NO SQL NO SQL

View File

@ -1,8 +1,8 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getInventoryDate`() CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getInventoryDate`()
RETURNS date RETURNS date
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN
RETURN (SELECT inventoried FROM config LIMIT 1); RETURN (SELECT inventoried FROM config LIMIT 1);
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getNewItemId`() CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getNewItemId`()
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT)
RETURNS date RETURNS date
NOT DETERMINISTIC NOT DETERMINISTIC
NO SQL NO SQL

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getShipmentHour`(vTicket INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getSpecialPrice`(vItemFk int(11),vClientFk int(11))
RETURNS decimal(10,2) RETURNS decimal(10,2)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getTicketTrolleyLabelCount`(vTicket INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getUser`() CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getUser`()
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`getUserId`(userName varchar(30))
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`() CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasAnyNegativeBase`()
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`() CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasAnyPositiveBase`()
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasItemsInSector`(vTicketFk INT, vSectorFk INT)
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`hasSomeNegativeBase`(vTicket INT)
RETURNS tinyint(1) RETURNS tinyint(1)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`( CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`intrastat_estimateNet`(
vSelf INT, vSelf INT,
vStems INT vStems INT
) )

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOutAmount`(vInvoiceRef VARCHAR(15))
RETURNS decimal(10,2) RETURNS decimal(10,2)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2), CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getMaxIssued`(vSerial VARCHAR(2),
vCompanyFk INT, vCompanyFk INT,
vYear INT vYear INT
) )

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getPath`(vSelf INT)
RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceOut_getWeight`(vInvoiceRef VARCHAR(15)
) )
RETURNS decimal(10,2) RETURNS decimal(10,2)
NOT DETERMINISTIC NOT DETERMINISTIC

View File

@ -1,18 +1,23 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(15)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`invoiceSerial`(
vClientFk INT,
vCompanyFk INT,
vType CHAR(15)
)
RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN
/** /**
* Obtiene la serie de una factura * Obtiene la serie de una factura
* dependiendo del area del cliente. * dependiendo del area del cliente.
* *
* @param vClientFk Id del cliente * @param vClientFk Id del cliente
* @param vCompanyFk Id de la empresa * @param vCompanyFk Id de la empresa
* @param vType Tipo de factura ['global','multiple','quick'] * @param vType Tipo de factura (vn.invoiceOutSerial.type[ENUM])
* @return vSerie de la factura * @return vSerie de la factura
*/ */
DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci; DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci;
DECLARE vTransactionCode INT(2);
DECLARE vSerie CHAR(2); DECLARE vSerie CHAR(2);
IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN
@ -23,9 +28,15 @@ BEGIN
FROM client FROM client
WHERE id = vClientFk; WHERE id = vClientFk;
SELECT code INTO vSerie SELECT CodigoTransaccion INTO vTransactionCode
FROM invoiceOutSerial FROM taxArea
WHERE `type` = vType AND taxAreaFk = vTaxArea; WHERE code = vTaxArea;
SELECT ios.code INTO vSerie
FROM invoiceOutSerial ios
JOIN taxArea ta ON ta.code = ios.taxAreaFk
WHERE ios.`type` = vType
AND ta.CodigoTransaccion = vTransactionCode;
RETURN vSerie; RETURN vSerie;
END$$ END$$

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`isLogifloraDay`(vShipped DATE, vWarehouse INT)
RETURNS tinyint(1) RETURNS tinyint(1)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemTag_getIntValue`(vValue VARCHAR(255))
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getFhImage`(itemFk INT)
RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getPackage`(vItemFk INT)
RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`item_getVolume`(vSelf INT, vPackaging VARCHAR(10))
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`itemsInSector_get`(vTicketFk INT, vSectorFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`lastDayOfWeek`(vYear INT, vWeek INT)
RETURNS date RETURNS date
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10)) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`machine_checkPlate`(vPlate VARCHAR(10))
RETURNS tinyint(1) RETURNS tinyint(1)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8)
RETURNS int(11) RETURNS int(11)
DETERMINISTIC DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`orderTotalVolume`(vOrderId INT)
RETURNS decimal(10,3) RETURNS decimal(10,3)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`orderTotalVolumeBoxes`(vOrderId INT)
RETURNS decimal(10,3) RETURNS decimal(10,3)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1), CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`packaging_calculate`(isPackageReturnable TINYINT(1),
packagingReturnFk INT(11), packagingReturnFk INT(11),
base DECIMAL(10,2), base DECIMAL(10,2),
price DECIMAL(10,2), price DECIMAL(10,2),

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE)
RETURNS double RETURNS double
NOT DETERMINISTIC NOT DETERMINISTIC
BEGIN BEGIN

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal`(vTicketFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal_`(vTicketFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`routeProposal_beta`(vTicketFk INT)
RETURNS int(11) RETURNS int(11)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`( CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`(
vSelf INT vSelf INT
)RETURNS tinyint(1) )RETURNS tinyint(1)
READS SQL DATA READS SQL DATA

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT) CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`specie_IsForbidden`(vItemFk INT, vAddressFk INT)
RETURNS tinyint(1) RETURNS tinyint(1)
NOT DETERMINISTIC NOT DETERMINISTIC
READS SQL DATA READS SQL DATA

Some files were not shown because too many files have changed in this diff Show More