Merge pull request 'warmFix getSales refs #6861' (!2686) from 6861_reservas into test
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-dev This commit looks good Details

Reviewed-on: #2686
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Sergio De la torre 2024-07-05 08:57:37 +00:00
commit 40eb5f1a31
1 changed files with 10 additions and 8 deletions

View File

@ -60,15 +60,17 @@ module.exports = Self => {
if (print) await Self.rawSql('CALL vn.collection_printSticker(?,NULL)', [id], myOptions);
for (let ticket of tickets) {
let observations = ticket.observaciones.split(' ');
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})
);
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})
);
}
}
}
}