fix: refs #7028 requesterId fix salesPerson
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
576641d09d
commit
5f43c0440c
|
@ -97,8 +97,8 @@ module.exports = Self => {
|
||||||
const query = `CALL vn.sale_calculateComponent(?, NULL)`;
|
const query = `CALL vn.sale_calculateComponent(?, NULL)`;
|
||||||
await Self.rawSql(query, [sale.id], myOptions);
|
await Self.rawSql(query, [sale.id], myOptions);
|
||||||
|
|
||||||
const requesterId = request.ticket().client().salesPersonFk;
|
const salesPerson = request.ticket().client().salesPersonFk;
|
||||||
if (requesterId) {
|
if (salesPerson) {
|
||||||
const url = await Self.app.models.Url.getUrl();
|
const url = await Self.app.models.Url.getUrl();
|
||||||
const message = $t('Bought units from buy request', {
|
const message = $t('Bought units from buy request', {
|
||||||
quantity: sale.quantity,
|
quantity: sale.quantity,
|
||||||
|
@ -108,7 +108,7 @@ module.exports = Self => {
|
||||||
url: `${url}ticket/${sale.ticketFk}/summary`,
|
url: `${url}ticket/${sale.ticketFk}/summary`,
|
||||||
urlItem: `${url}item/${sale.itemFk}/summary`
|
urlItem: `${url}item/${sale.itemFk}/summary`
|
||||||
});
|
});
|
||||||
await models.Chat.sendCheckingPresence(ctx, requesterId, message, myOptions);
|
await models.Chat.sendCheckingPresence(ctx, salesPerson, message, myOptions);
|
||||||
}
|
}
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,8 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
const requesterId = request.ticket().client().salesPersonFk;
|
const salesPerson = request.ticket().client().salesPersonFk;
|
||||||
if (requesterId) {
|
if (salesPerson) {
|
||||||
const url = await models.Url.getUrl();
|
const url = await models.Url.getUrl();
|
||||||
const message = $t('Deny buy request', {
|
const message = $t('Deny buy request', {
|
||||||
ticketId: request.ticketFk,
|
ticketId: request.ticketFk,
|
||||||
|
@ -74,7 +74,7 @@ module.exports = Self => {
|
||||||
observation: params.response
|
observation: params.response
|
||||||
});
|
});
|
||||||
|
|
||||||
await models.Chat.sendCheckingPresence(ctx, requesterId, message, myOptions);
|
await models.Chat.sendCheckingPresence(ctx, salesPerson, message, myOptions);
|
||||||
await request.updateAttributes(params, myOptions);
|
await request.updateAttributes(params, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue