fix: refs #7028 fix confirm deny #3290

Merged
carlossa merged 23 commits from 7028-itemRequestConfDeny into dev 2024-12-16 10:59:56 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 5f43c0440c - Show all commits

View File

@ -97,8 +97,8 @@ module.exports = Self => {
const query = `CALL vn.sale_calculateComponent(?, NULL)`;
await Self.rawSql(query, [sale.id], myOptions);
const requesterId = request.ticket().client().salesPersonFk;
if (requesterId) {
const salesPerson = request.ticket().client().salesPersonFk;
Outdated
Review

const salesPerson

const salesPerson
if (salesPerson) {
const url = await Self.app.models.Url.getUrl();
const message = $t('Bought units from buy request', {
quantity: sale.quantity,
@ -108,7 +108,7 @@ module.exports = Self => {
url: `${url}ticket/${sale.ticketFk}/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();

View File

@ -65,8 +65,8 @@ module.exports = Self => {
}
}, myOptions);
const requesterId = request.ticket().client().salesPersonFk;
if (requesterId) {
const salesPerson = request.ticket().client().salesPersonFk;
Outdated
Review

const salesPerson

const salesPerson
if (salesPerson) {
const url = await models.Url.getUrl();
const message = $t('Deny buy request', {
ticketId: request.ticketFk,
@ -74,7 +74,7 @@ module.exports = Self => {
observation: params.response
});
await models.Chat.sendCheckingPresence(ctx, requesterId, message, myOptions);
await models.Chat.sendCheckingPresence(ctx, salesPerson, message, myOptions);
await request.updateAttributes(params, myOptions);
}
carlossa marked this conversation as resolved Outdated
Outdated
Review

, myOptions);

, myOptions);