diff --git a/db/changes/10050-pentecostes/01-clienteesGestdoc.sql b/db/changes/10050-pentecostes/01-clientesGestdoc.sql similarity index 100% rename from db/changes/10050-pentecostes/01-clienteesGestdoc.sql rename to db/changes/10050-pentecostes/01-clientesGestdoc.sql diff --git a/db/changes/10050-pentecostes/02-paisesTableCountryView.sql b/db/changes/10050-pentecostes/02-paisesTableCountryView.sql new file mode 100644 index 000000000..dad2cdb50 --- /dev/null +++ b/db/changes/10050-pentecostes/02-paisesTableCountryView.sql @@ -0,0 +1,28 @@ +ALTER TABLE `vn2008`.`Paises` +ADD COLUMN `ibanLength` TINYINT(4) NULL DEFAULT NULL AFTER `isUeeMember`; + +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`country` AS + SELECT + `p`.`Id` AS `id`, + `p`.`Pais` AS `country`, + `p`.`CEE` AS `CEE`, + `p`.`isUeeMember` AS `isUeeMember`, + `p`.`Codigo` AS `code`, + `p`.`Id_Moneda` AS `currencyFk`, + `p`.`Id_Paisreal` AS `politicalCountryFk`, + `p`.`geoFk` AS `geoFk`, + `p`.`ibanLength` AS `ibanLength` + FROM + `vn2008`.`Paises` `p`; + +UPDATE `vn2008`.`Paises` SET `ibanLength`=22 WHERE `Id`=1; +UPDATE `vn2008`.`Paises` SET `ibanLength`=25 WHERE `Id`=2; +UPDATE `vn2008`.`Paises` SET `ibanLength`=20 WHERE `Id`=3; +UPDATE `vn2008`.`Paises` SET `ibanLength`=22 WHERE `Id`=4; +UPDATE `vn2008`.`Paises` SET `ibanLength`=16 WHERE `Id`=5; +UPDATE `vn2008`.`Paises` SET `ibanLength`=25 WHERE `Id`=19; +UPDATE `vn2008`.`Paises` SET `ibanLength`=22 WHERE `Id`=30; diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index d23da60f4..576d37cc7 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -46,14 +46,15 @@ INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre ('HLK', 109, 'Bruce' , 'Banner', 109, 19), ('JJJ', 108, 'Jessica' , 'Jones' , 110, 19); -INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`) +INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`) VALUES - (1, 'España', 0, 'ES', 1), - (2, 'Italia', 1, 'IT', 1), - (3, 'Alemania', 1, 'DE', 1), - (4, 'Rumania', 1, 'RO', 1), - (5, 'Holanda', 1, 'NL', 1), - (30,'Francia', 1, 'FR', 1); + (1, 'España', 0, 'ES', 1, 22), + (2, 'Italia', 1, 'IT', 1, 25), + (3, 'Alemania', 1, 'DE', 1, 20), + (4, 'Rumania', 1, 'RO', 1, 22), + (5, 'Holanda', 1, 'NL', 1, 16), + (19,'Francia', 1, 'FR', 1, 25), + (30,'Canarias', 1, 'IC', 1, 22); INSERT INTO `vn`.`warehouse`(`id`, `name`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`) VALUES diff --git a/db/import-changes.sh b/db/import-changes.sh index b3d9d3a02..2b80654d3 100755 --- a/db/import-changes.sh +++ b/db/import-changes.sh @@ -97,7 +97,7 @@ for DIR_PATH in "$DIR/changes/"*; do for FILE in "$DIR_PATH/"*; do FILE_NAME=$(basename "$FILE") - if [[ ! "$FILE_NAME" =~ ^[0-9]{2}-[a-zA-Z0-9]+\.sql$ ]]; then + if [[ ! "$FILE_NAME" =~ ^[0-9]{2}-[a-zA-Z0-9_]+\.sql$ ]]; then echo "[WARN] Ignoring wrong file name: $FILE_NAME" continue fi diff --git a/print/report/rpt-sepa-core/assets/css/style.css b/print/report/rpt-sepa-core/assets/css/style.css index 056a89b69..0b379e0a3 100644 --- a/print/report/rpt-sepa-core/assets/css/style.css +++ b/print/report/rpt-sepa-core/assets/css/style.css @@ -10,3 +10,7 @@ padding: 0 50px !important } +.wide { + width: 100%; + height: 100% +} diff --git a/print/report/rpt-sepa-core/index.html b/print/report/rpt-sepa-core/index.html index 459cd89ee..4ec80a690 100644 --- a/print/report/rpt-sepa-core/index.html +++ b/print/report/rpt-sepa-core/index.html @@ -88,11 +88,18 @@ {{$t('client.accountNumber')}} - +
- E - S - + {{clientCountryCode.substr(0, 1)}} + {{clientCountryCode.substr(1, 1)}} +
+
+ + +
+ {{clientCountryCode.substr(0, 1)}} + {{clientCountryCode.substr(1, 1)}} +
diff --git a/print/report/rpt-sepa-core/index.js b/print/report/rpt-sepa-core/index.js index 0a4c06c95..63c54b907 100755 --- a/print/report/rpt-sepa-core/index.js +++ b/print/report/rpt-sepa-core/index.js @@ -44,6 +44,8 @@ const rptSepaCore = { c.city AS clientCity, p.name AS clientProvince, ct.country AS clientCountry, + ct.code AS clientCountryCode, + ct.ibanLength AS ibanLength, s.name AS supplierName, s.street AS supplierStreet, sc.country AS supplierCountry,