#1400 report.sepaCore IBAN portugal

This commit is contained in:
Carlos Jimenez Ruiz 2019-06-07 09:18:54 +02:00
parent 7a44a5aab8
commit 777b0b3a38
7 changed files with 54 additions and 12 deletions

View File

@ -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;

View File

@ -46,14 +46,15 @@ INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre
('HLK', 109, 'Bruce' , 'Banner', 109, 19), ('HLK', 109, 'Bruce' , 'Banner', 109, 19),
('JJJ', 108, 'Jessica' , 'Jones' , 110, 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 VALUES
(1, 'España', 0, 'ES', 1), (1, 'España', 0, 'ES', 1, 22),
(2, 'Italia', 1, 'IT', 1), (2, 'Italia', 1, 'IT', 1, 25),
(3, 'Alemania', 1, 'DE', 1), (3, 'Alemania', 1, 'DE', 1, 20),
(4, 'Rumania', 1, 'RO', 1), (4, 'Rumania', 1, 'RO', 1, 22),
(5, 'Holanda', 1, 'NL', 1), (5, 'Holanda', 1, 'NL', 1, 16),
(30,'Francia', 1, 'FR', 1); (19,'Francia', 1, 'FR', 1, 25),
(30,'Canarias', 1, 'IC', 1, 22);
INSERT INTO `vn`.`warehouse`(`id`, `name`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`) INSERT INTO `vn`.`warehouse`(`id`, `name`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`)
VALUES VALUES

View File

@ -97,7 +97,7 @@ for DIR_PATH in "$DIR/changes/"*; do
for FILE in "$DIR_PATH/"*; do for FILE in "$DIR_PATH/"*; do
FILE_NAME=$(basename "$FILE") 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" echo "[WARN] Ignoring wrong file name: $FILE_NAME"
continue continue
fi fi

View File

@ -10,3 +10,7 @@
padding: 0 50px !important padding: 0 50px !important
} }
.wide {
width: 100%;
height: 100%
}

View File

@ -88,11 +88,18 @@
<td colspan="2">{{$t('client.accountNumber')}}</td> <td colspan="2">{{$t('client.accountNumber')}}</td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2" v-if=!ibanLength>
<section class="field square"> <section class="field square">
<span>E</span> <span>{{clientCountryCode.substr(0, 1)}}</span>
<span>S</span> <span>{{clientCountryCode.substr(1, 1)}}</span>
<span v-for="i in 22"></span> </section>
<section class="field wide"></section>
</td>
<td colspan="2" v-if=ibanLength>
<section class="field square">
<span>{{clientCountryCode.substr(0, 1)}}</span>
<span>{{clientCountryCode.substr(1, 1)}}</span>
<span v-for="i in ibanLength"></span>
</section> </section>
</td> </td>
</tr> </tr>

View File

@ -44,6 +44,8 @@ const rptSepaCore = {
c.city AS clientCity, c.city AS clientCity,
p.name AS clientProvince, p.name AS clientProvince,
ct.country AS clientCountry, ct.country AS clientCountry,
ct.code AS clientCountryCode,
ct.ibanLength AS ibanLength,
s.name AS supplierName, s.name AS supplierName,
s.street AS supplierStreet, s.street AS supplierStreet,
sc.country AS supplierCountry, sc.country AS supplierCountry,