Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 8408-Disponible-por-zonas-y-horas

This commit is contained in:
Pako Natek 2025-02-07 14:37:20 +01:00
commit e22a21290b
4 changed files with 17 additions and 3 deletions

View File

@ -10,7 +10,6 @@ BEGIN
IF NEW.isBooked = OLD.isBooked AND ( IF NEW.isBooked = OLD.isBooked AND (
NOT (NEW.supplierFk <=> OLD.supplierFk) OR NOT (NEW.supplierFk <=> OLD.supplierFk) OR
NOT (NEW.dated <=> OLD.dated) OR
NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.travelFk <=> OLD.travelFk) OR
NOT (NEW.companyFk <=> OLD.companyFk) OR NOT (NEW.companyFk <=> OLD.companyFk) OR
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR

View File

@ -248,9 +248,10 @@ module.exports = Self => {
const models = Self.app.models; const models = Self.app.models;
const loopBackContext = LoopBackContext.getCurrentContext(); const loopBackContext = LoopBackContext.getCurrentContext();
const accessToken = {req: loopBackContext.active.accessToken};
const editVerifiedDataWithoutTaxDataChecked = models.ACL.checkAccessAcl( const accessToken = {req: {accessToken: loopBackContext.active.accessToken}};
const editVerifiedDataWithoutTaxDataChecked = await models.ACL.checkAccessAcl(
accessToken, accessToken,
'Client', 'Client',
'editVerifiedDataWithoutTaxDataCheck', 'editVerifiedDataWithoutTaxDataCheck',

View File

@ -32,6 +32,12 @@ module.exports = Self => {
description: 'The client id', description: 'The client id',
http: {source: 'query'} http: {source: 'query'}
}, },
{
arg: 'companyFk',
type: 'integer',
description: 'The company id',
http: {source: 'query'}
},
{ {
arg: 'fi', arg: 'fi',
type: 'string', type: 'string',
@ -148,6 +154,7 @@ module.exports = Self => {
i.hasPdf, i.hasPdf,
i.customsAgentFk, i.customsAgentFk,
c.socialName AS clientSocialName, c.socialName AS clientSocialName,
i.companyFk,
co.code AS companyCode, co.code AS companyCode,
ca.fiscalName AS customsAgentName ca.fiscalName AS customsAgentName
FROM invoiceOut i FROM invoiceOut i

View File

@ -22,6 +22,11 @@ module.exports = Self => {
type: 'integer', type: 'integer',
description: 'The item id', description: 'The item id',
}, },
{
arg: 'name',
type: 'string',
description: 'The item name',
},
{ {
arg: 'typeFk', arg: 'typeFk',
type: 'integer', type: 'integer',
@ -112,6 +117,8 @@ module.exports = Self => {
: {'it.code': {like: `%${value}%`}}; : {'it.code': {like: `%${value}%`}};
case 'categoryFk': case 'categoryFk':
return {'it.categoryFk': value}; return {'it.categoryFk': value};
case 'name':
return {'i.name': {like: `%${value}%`}};
case 'buyerFk': case 'buyerFk':
return {'it.workerFk': value}; return {'it.workerFk': value};
case 'warehouseFk': case 'warehouseFk':