feat: previas con sitema de reservas refs #6861 #2176
|
@ -71,6 +71,7 @@ pipeline {
|
|||
stage('Back') {
|
||||
steps {
|
||||
sh 'pnpm install --prefer-offline'
|
||||
sh 'pnpx puppeteer browsers install chrome'
|
||||
}
|
||||
}
|
||||
stage('Print') {
|
||||
|
|
|
@ -564,13 +564,13 @@ INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
|||
|
||||
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
|
||||
VALUES
|
||||
(1, 'PLANTS SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
||||
(2, 'FARMER KING', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
||||
(1, 'PLANTS SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'GOTHAM', 1, 46000, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
||||
(2, 'FARMER KING', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 46000, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
||||
(69, 'PACKAGING', 'Packaging nick', 4100000069, 1, '94935005K', 0, util.VN_CURDATE(), 1, 'supplier address 5', 'ASGARD', 3, 46600, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
||||
(442, 'VERDNATURA LEVANTE SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'),
|
||||
(442, 'VERDNATURA LEVANTE SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'),
|
||||
(567, 'HOLLAND', 'Holland nick', 4000020567, 1, '14364089Z', 0, util.VN_CURDATE(), 1, 'supplier address 6', 'ASGARD', 3, 46600, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
||||
(791, 'BROS SL', 'Bros nick', 5115000791, 1, '37718083S', 0, util.VN_CURDATE(), 1, 'supplier address 7', 'ASGARD', 3, 46600, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'),
|
||||
(1381, 'ORNAMENTALES', 'Ornamentales', 7185001381, 1, '07972486L', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
|
||||
(1381, 'ORNAMENTALES', 'Ornamentales', 7185001381, 1, '07972486L', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
|
||||
|
||||
INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `provinceFk`, `postalCode`, `city`, `phone`, `mobile`)
|
||||
VALUES
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Are you sure exit without saving?: ¿Seguro que quieres salir sin guardar?
|
||||
Unsaved changes will be lost: Los cambios que no hayas guardado se perderán
|
||||
No changes to save: No hay cambios que guardar
|
||||
Some fields are invalid: Algunos campos no son válidos
|
||||
Some fields are invalid: Algunos campos no son válidos
|
||||
|
|
|
@ -333,9 +333,11 @@
|
|||
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}",
|
||||
"This claim has been updated": "La reclamación con Id: {{claimId}}, ha sido actualizada",
|
||||
"This user does not have an assigned tablet": "Este usuario no tiene tablet asignada",
|
||||
"Incorrect pin": "Pin incorrecto",
|
||||
"Field are invalid": "El campo '{{tag}}' no es válido",
|
||||
"Incorrect pin": "Pin incorrecto.",
|
||||
"You already have the mailAlias": "Ya tienes este alias de correo",
|
||||
"The alias cant be modified": "Este alias de correo no puede ser modificado",
|
||||
"No tickets to invoice": "No hay tickets para facturar",
|
||||
"this warehouse has not dms": "El Almacén no acepta documentos",
|
||||
"This ticket already has a cmr saved": "Este ticket ya tiene un cmr guardado",
|
||||
"Name should be uppercase": "El nombre debe ir en mayúscula",
|
||||
|
@ -344,6 +346,5 @@
|
|||
"You cannot update these fields": "No puedes actualizar estos campos",
|
||||
"CountryFK cannot be empty": "El país no puede estar vacío",
|
||||
"Cmr file does not exist": "El archivo del cmr no existe",
|
||||
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias",
|
||||
"No tickets to invoice": "No hay tickets para facturar"
|
||||
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias"
|
||||
}
|
|
@ -26,23 +26,23 @@ module.exports = Self => {
|
|||
},
|
||||
{
|
||||
arg: 'street',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'postcode',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'city',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'countryFk',
|
||||
type: 'number'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'provinceFk',
|
||||
type: 'number'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'sageTaxTypeFk',
|
||||
|
@ -94,7 +94,7 @@ module.exports = Self => {
|
|||
},
|
||||
{
|
||||
arg: 'despiteOfClient',
|
||||
type: 'number'
|
||||
type: 'any'
|
||||
},
|
||||
{
|
||||
arg: 'hasIncoterms',
|
||||
|
|
|
@ -26,7 +26,8 @@ describe('Supplier newSupplier()', () => {
|
|||
const options = {transaction: tx};
|
||||
ctx.args = {
|
||||
name: 'NEWSUPPLIER',
|
||||
nif: '12345678Z'
|
||||
nif: '12345678Z',
|
||||
city: 'Gotham'
|
||||
};
|
||||
|
||||
const result = await models.Supplier.newSupplier(ctx, options);
|
||||
|
|
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
|||
type: 'any'
|
||||
}, {
|
||||
arg: 'phone',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
}, {
|
||||
arg: 'sageTaxTypeFk',
|
||||
type: 'any'
|
||||
|
@ -46,10 +46,10 @@ module.exports = Self => {
|
|||
type: 'any'
|
||||
}, {
|
||||
arg: 'supplierActivityFk',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
}, {
|
||||
arg: 'healthRegister',
|
||||
type: 'string'
|
||||
type: 'any'
|
||||
}, {
|
||||
arg: 'isVies',
|
||||
type: 'boolean'
|
||||
|
|
|
@ -129,10 +129,13 @@ describe('loopback model Supplier', () => {
|
|||
const options = {transaction: tx};
|
||||
|
||||
try {
|
||||
const newSupplier = await models.Supplier.create({name: 'ALFRED PENNYWORTH'}, options);
|
||||
const fetchedSupplier = await models.Supplier.findById(newSupplier.id, null, options);
|
||||
const newSupplier = {
|
||||
name: 'ALFRED PENNYWORTH', nif: '87805752D', city: 'Gotham'
|
||||
};
|
||||
const supplierCreated = await models.Supplier.create(newSupplier, options);
|
||||
const fetchedSupplier = await models.Supplier.findById(supplierCreated.id, null, options);
|
||||
|
||||
expect(Number(fetchedSupplier.account)).toEqual(4100000000 + newSupplier.id);
|
||||
expect(Number(fetchedSupplier.account)).toEqual(4100000000 + supplierCreated.id);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
|
|
@ -17,17 +17,13 @@ module.exports = Self => {
|
|||
message: 'The social name cannot be empty'
|
||||
});
|
||||
|
||||
if (this.city) {
|
||||
Self.validatesPresenceOf('city', {
|
||||
message: 'City cannot be empty'
|
||||
});
|
||||
}
|
||||
Self.validatesPresenceOf('city', {
|
||||
message: 'City cannot be empty'
|
||||
});
|
||||
|
||||
if (this.nif) {
|
||||
Self.validatesPresenceOf('nif', {
|
||||
message: 'The nif cannot be empty'
|
||||
});
|
||||
}
|
||||
Self.validatesPresenceOf('nif', {
|
||||
message: 'The nif cannot be empty'
|
||||
});
|
||||
|
||||
Self.validatesUniquenessOf('nif', {
|
||||
message: 'TIN must be unique'
|
||||
|
|
|
@ -3786,7 +3786,7 @@ packages:
|
|||
resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==}
|
||||
dependencies:
|
||||
base64-js: 1.5.1
|
||||
ieee754: 1.1.13
|
||||
ieee754: 1.2.1
|
||||
isarray: 1.0.0
|
||||
dev: false
|
||||
|
||||
|
@ -7288,8 +7288,8 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/http-proxy-agent@7.0.0:
|
||||
resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==}
|
||||
/http-proxy-agent@7.0.2:
|
||||
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
|
||||
engines: {node: '>= 14'}
|
||||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
|
@ -7367,8 +7367,8 @@ packages:
|
|||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/https-proxy-agent@7.0.2:
|
||||
resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==}
|
||||
/https-proxy-agent@7.0.4:
|
||||
resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==}
|
||||
engines: {node: '>= 14'}
|
||||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
|
@ -9780,6 +9780,7 @@ packages:
|
|||
|
||||
/mkdirp-classic@0.5.3:
|
||||
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
|
||||
/mkdirp@0.3.0:
|
||||
|
@ -10692,8 +10693,8 @@ packages:
|
|||
agent-base: 7.1.0
|
||||
debug: 4.3.4(supports-color@6.1.0)
|
||||
get-uri: 6.0.2
|
||||
http-proxy-agent: 7.0.0
|
||||
https-proxy-agent: 7.0.2
|
||||
http-proxy-agent: 7.0.2
|
||||
https-proxy-agent: 7.0.4
|
||||
pac-resolver: 7.0.0
|
||||
socks-proxy-agent: 8.0.2
|
||||
transitivePeerDependencies:
|
||||
|
@ -11155,8 +11156,8 @@ packages:
|
|||
dependencies:
|
||||
agent-base: 7.1.0
|
||||
debug: 4.3.4(supports-color@6.1.0)
|
||||
http-proxy-agent: 7.0.0
|
||||
https-proxy-agent: 7.0.2
|
||||
http-proxy-agent: 7.0.2
|
||||
https-proxy-agent: 7.0.4
|
||||
lru-cache: 7.18.3
|
||||
pac-proxy-agent: 7.0.1
|
||||
proxy-from-env: 1.1.0
|
||||
|
@ -11288,6 +11289,7 @@ packages:
|
|||
|
||||
/queue-tick@1.0.1:
|
||||
resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==}
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
|
||||
/quick-lru@4.0.1:
|
||||
|
|
Loading…
Reference in New Issue