Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
3cb7319efa
|
@ -1,4 +1,12 @@
|
||||||
|
|
||||||
|
set_real_ip_from 0.0.0.0/0;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
log_format upstreamlog
|
||||||
|
'[$time_local] $remote_addr -> $proxy_host:$upstream_addr '
|
||||||
|
'"$request" $status $body_bytes_sent '
|
||||||
|
'"$http_referer" "$http_user_agent"';
|
||||||
|
access_log /var/log/nginx/access.log upstreamlog;
|
||||||
|
|
||||||
upstream back {
|
upstream back {
|
||||||
server back_1:3000;
|
server back_1:3000;
|
||||||
server back_2:3000;
|
server back_2:3000;
|
||||||
|
|
|
@ -70,15 +70,17 @@ module.exports = Self => {
|
||||||
discount: 100
|
discount: 100
|
||||||
}, {transaction: transaction});
|
}, {transaction: transaction});
|
||||||
|
|
||||||
|
if (sale.ticket().client().salesPerson()) {
|
||||||
await sendMessage(ctx, {
|
await sendMessage(ctx, {
|
||||||
itemFk: sale.itemFk,
|
itemFk: sale.itemFk,
|
||||||
ticketFk: sale.ticketFk,
|
ticketFk: sale.ticketFk,
|
||||||
recipientFk: sale.item().itemType().worker().userFk,
|
recipientFk: sale.ticket().client().salesPerson().userFk,
|
||||||
quantity: sale.quantity,
|
quantity: sale.quantity,
|
||||||
concept: sale.concept,
|
concept: sale.concept,
|
||||||
nickname: address.nickname
|
nickname: address.nickname
|
||||||
}, transaction);
|
}, transaction);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let claim = await Self.findById(params.claimFk);
|
let claim = await Self.findById(params.claimFk);
|
||||||
claim = await claim.updateAttributes({
|
claim = await claim.updateAttributes({
|
||||||
|
@ -99,24 +101,15 @@ module.exports = Self => {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'ticket',
|
relation: 'ticket',
|
||||||
scope: {fields: ['warehouseFk', 'companyFk']}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'item',
|
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['typeFk'],
|
fields: ['clientFk', 'warehouseFk', 'companyFk'],
|
||||||
include: {
|
include: {
|
||||||
relation: 'itemType',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['workerFk'],
|
|
||||||
include: {
|
include: {
|
||||||
relation: 'worker',
|
relation: 'salesPerson'
|
||||||
scope: {
|
|
||||||
fields: ['id', 'userFk'],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -73,7 +73,7 @@ module.exports = Self => {
|
||||||
case 'search':
|
case 'search':
|
||||||
return /^\d+$/.test(value)
|
return /^\d+$/.test(value)
|
||||||
? {or: [{'i.id': value}, {'ib.code': value}]}
|
? {or: [{'i.id': value}, {'ib.code': value}]}
|
||||||
: {'i.name': {like: `%${value}%`}};
|
: {or: [{'i.name': {like: `%${value}%`}}, {'ib.code': value}]};
|
||||||
case 'id':
|
case 'id':
|
||||||
return {'i.id': value};
|
return {'i.id': value};
|
||||||
case 'description':
|
case 'description':
|
||||||
|
|
Loading…
Reference in New Issue