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 {
|
||||
server back_1:3000;
|
||||
server back_2:3000;
|
||||
|
|
|
@ -70,15 +70,17 @@ module.exports = Self => {
|
|||
discount: 100
|
||||
}, {transaction: transaction});
|
||||
|
||||
if (sale.ticket().client().salesPerson()) {
|
||||
await sendMessage(ctx, {
|
||||
itemFk: sale.itemFk,
|
||||
ticketFk: sale.ticketFk,
|
||||
recipientFk: sale.item().itemType().worker().userFk,
|
||||
recipientFk: sale.ticket().client().salesPerson().userFk,
|
||||
quantity: sale.quantity,
|
||||
concept: sale.concept,
|
||||
nickname: address.nickname
|
||||
}, transaction);
|
||||
}
|
||||
}
|
||||
|
||||
let claim = await Self.findById(params.claimFk);
|
||||
claim = await claim.updateAttributes({
|
||||
|
@ -99,24 +101,15 @@ module.exports = Self => {
|
|||
include: [
|
||||
{
|
||||
relation: 'ticket',
|
||||
scope: {fields: ['warehouseFk', 'companyFk']}
|
||||
},
|
||||
{
|
||||
relation: 'item',
|
||||
scope: {
|
||||
fields: ['typeFk'],
|
||||
fields: ['clientFk', 'warehouseFk', 'companyFk'],
|
||||
include: {
|
||||
relation: 'itemType',
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['workerFk'],
|
||||
include: {
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'userFk'],
|
||||
relation: 'salesPerson'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}],
|
||||
|
|
|
@ -73,7 +73,7 @@ module.exports = Self => {
|
|||
case 'search':
|
||||
return /^\d+$/.test(value)
|
||||
? {or: [{'i.id': value}, {'ib.code': value}]}
|
||||
: {'i.name': {like: `%${value}%`}};
|
||||
: {or: [{'i.name': {like: `%${value}%`}}, {'ib.code': value}]};
|
||||
case 'id':
|
||||
return {'i.id': value};
|
||||
case 'description':
|
||||
|
|
Loading…
Reference in New Issue