7565-testToMaster #2567
|
@ -7,7 +7,7 @@ BEGIN
|
|||
*
|
||||
* @param vJsonData The order data in json format
|
||||
*/
|
||||
INSERT INTO `order`
|
||||
REPLACE `order`
|
||||
SET catalogueFk = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.products[0].id')),
|
||||
customerName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.customerName')),
|
||||
email = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.email')),
|
||||
|
@ -15,7 +15,8 @@ BEGIN
|
|||
message= JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.message')),
|
||||
deliveryName = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryName')),
|
||||
address = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.address')),
|
||||
deliveryPhone = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryPhone'));
|
||||
deliveryPhone = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.deliveryPhone')),
|
||||
observations = JSON_UNQUOTE(JSON_EXTRACT(vJsonData, '$.customer.customerData.observations'));
|
||||
|
||||
SELECT LAST_INSERT_ID() orderFk;
|
||||
END$$
|
||||
|
|
|
@ -51,7 +51,7 @@ describe('Client Add address path', () => {
|
|||
await page.waitToClick(selectors.clientAddresses.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Incoterms is required for a non UEE member');
|
||||
expect(message.text).toContain('Incoterms and Customs agent are required for a non UEE member');
|
||||
});
|
||||
|
||||
it(`should receive an error after clicking save button as customsAgent is empty`, async() => {
|
||||
|
|
|
@ -227,5 +227,7 @@
|
|||
"They're not your subordinate": "They're not your subordinate",
|
||||
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
||||
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency",
|
||||
"You can only have one PDA": "You can only have one PDA"
|
||||
"You can only have one PDA": "You can only have one PDA",
|
||||
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member"
|
||||
}
|
||||
}
|
|
@ -359,5 +359,6 @@
|
|||
"It was not able to create the invoice": "No se pudo crear la factura",
|
||||
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
||||
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
||||
"You can only have one PDA": "Solo puedes tener un PDA"
|
||||
"You can only have one PDA": "Solo puedes tener un PDA",
|
||||
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE"
|
||||
}
|
|
@ -92,11 +92,8 @@ module.exports = function(Self) {
|
|||
}, myOptions);
|
||||
|
||||
const isUeeMember = province.country().isUeeMember;
|
||||
if (!isUeeMember && !args.incotermsFk)
|
||||
throw new UserError(`Incoterms is required for a non UEE member`);
|
||||
|
||||
if (!isUeeMember && !args.customsAgentFk)
|
||||
throw new UserError(`Customs agent is required for a non UEE member`);
|
||||
if (!isUeeMember && (!args.incotermsFk || !args.customsAgentFk))
|
||||
throw new UserError(`Incoterms and Customs agent are required for a non UEE member`);
|
||||
|
||||
delete args.ctx; // Remove unwanted properties
|
||||
const newAddress = await models.Address.create(args, myOptions);
|
||||
|
|
|
@ -50,7 +50,7 @@ describe('Address createAddress', () => {
|
|||
}
|
||||
|
||||
expect(error).toBeDefined();
|
||||
expect(error.message).toEqual('Incoterms is required for a non UEE member');
|
||||
expect(error.message).toEqual('Incoterms and Customs agent are required for a non UEE member');
|
||||
});
|
||||
|
||||
it('should throw a non uee member error if no customsAgent is defined', async() => {
|
||||
|
@ -81,7 +81,7 @@ describe('Address createAddress', () => {
|
|||
}
|
||||
|
||||
expect(error).toBeDefined();
|
||||
expect(error.message).toEqual('Customs agent is required for a non UEE member');
|
||||
expect(error.message).toEqual('Incoterms and Customs agent are required for a non UEE member');
|
||||
});
|
||||
|
||||
it('should create a new address and set as a client default address', async() => {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<vn-autocomplete
|
||||
url="Tickets"
|
||||
label="Ticket"
|
||||
search-function="{or: [{id: $search}, {nickname: {like: '%'+$search+'%'}}]}"
|
||||
search-function="{refFk: null, or: [{id: $search}, {nickname: {like: '%'+$search+'%'}}]}"
|
||||
show-field="id"
|
||||
value-field="id"
|
||||
fields="['nickname']"
|
||||
|
|
Loading…
Reference in New Issue