fix: refs #8191 Deleted msg send rocket in getSales.js
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
91164624bc
commit
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue