Compare commits
3 Commits
91164624bc
...
917e3128a9
Author | SHA1 | Date |
---|---|---|
Guillermo Bonet | 917e3128a9 | |
Guillermo Bonet | 22ce7a4dd4 | |
Guillermo Bonet | a4b568e9b8 |
|
@ -29,10 +29,8 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getSales = async(ctx, collectionOrTicketFk, print, source, options) => {
|
Self.getSales = async(ctx, collectionOrTicketFk, print, source, options) => {
|
||||||
const models = Self.app.models;
|
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const myOptions = {userId};
|
const myOptions = {userId};
|
||||||
const $t = ctx.req.__;
|
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -59,22 +57,6 @@ module.exports = Self => {
|
||||||
|
|
||||||
if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions);
|
if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions);
|
||||||
|
|
||||||
for (let ticket of tickets) {
|
|
||||||
if (ticket.observaciones) {
|
|
||||||
let observations = ticket.observaciones.split(' ');
|
|
||||||
|
|
||||||
for (let observation of observations) {
|
|
||||||
const salesPerson = ticket.salesPersonFk;
|
|
||||||
if (observation.startsWith('#') || observation.startsWith('@')) {
|
|
||||||
await models.Chat.send(ctx,
|
|
||||||
observation,
|
|
||||||
$t('ticketCommercial', {ticket: ticket.ticketFk, salesPerson})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return getCollection(id, tickets, sales, placements, myOptions);
|
return getCollection(id, tickets, sales, placements, myOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,6 @@
|
||||||
"Shelving not valid": "Shelving not valid",
|
"Shelving not valid": "Shelving not valid",
|
||||||
"printerNotExists": "The printer does not exist",
|
"printerNotExists": "The printer does not exist",
|
||||||
"There are not picking tickets": "There are not picking tickets",
|
"There are not picking tickets": "There are not picking tickets",
|
||||||
"ticketCommercial": "The ticket {{ ticket }} for the salesperson {{ salesMan }} is in preparation. (automatically generated message)",
|
|
||||||
"This password can only be changed by the user themselves": "This password can only be changed by the user themselves",
|
"This password can only be changed by the user themselves": "This password can only be changed by the user themselves",
|
||||||
"They're not your subordinate": "They're not your subordinate",
|
"They're not your subordinate": "They're not your subordinate",
|
||||||
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
||||||
|
|
|
@ -359,7 +359,6 @@
|
||||||
"This workCenter is already assigned to this agency": "Este centro de trabajo ya está asignado a esta agencia",
|
"This workCenter is already assigned to this agency": "Este centro de trabajo ya está asignado a esta agencia",
|
||||||
"Select ticket or client": "Elija un ticket o un client",
|
"Select ticket or client": "Elija un ticket o un client",
|
||||||
"It was not able to create the invoice": "No se pudo crear la factura",
|
"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)",
|
|
||||||
"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",
|
"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",
|
||||||
"You can not use the same password": "No puedes usar la misma contraseña",
|
"You can not use the same password": "No puedes usar la misma contraseña",
|
||||||
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
||||||
|
|
Loading…
Reference in New Issue