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
e9f65cd2a6
|
@ -9,25 +9,31 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The warehouse id'
|
description: 'The warehouse id',
|
||||||
|
required: true
|
||||||
}, {
|
}, {
|
||||||
arg: 'companyId',
|
arg: 'companyId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The company id'
|
description: 'The company id',
|
||||||
|
required: true
|
||||||
}, {
|
}, {
|
||||||
arg: 'dmsTypeId',
|
arg: 'dmsTypeId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The dms type id'
|
description: 'The dms type id',
|
||||||
|
required: true
|
||||||
}, {
|
}, {
|
||||||
arg: 'reference',
|
arg: 'reference',
|
||||||
type: 'String'
|
type: 'String',
|
||||||
|
required: true
|
||||||
}, {
|
}, {
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String'
|
type: 'String',
|
||||||
|
required: true
|
||||||
}, {
|
}, {
|
||||||
arg: 'hasFile',
|
arg: 'hasFile',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: 'True if has an attached file'
|
description: 'True if has an attached file',
|
||||||
|
required: true
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
|
|
|
@ -120,16 +120,19 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTicketId(params, options) {
|
async function getTicketId(params, options) {
|
||||||
const currentDate = new Date();
|
const minDate = new Date();
|
||||||
currentDate.setHours(null, null, null);
|
minDate.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const maxDate = new Date();
|
||||||
|
maxDate.setHours(23, 59, 59, 59);
|
||||||
|
|
||||||
let ticket = await Self.app.models.Ticket.findOne({
|
let ticket = await Self.app.models.Ticket.findOne({
|
||||||
where: {
|
where: {
|
||||||
addressFk: params.addressFk,
|
addressFk: params.addressFk,
|
||||||
companyFk: params.companyFk,
|
companyFk: params.companyFk,
|
||||||
warehouseFk: params.warehouseFk,
|
warehouseFk: params.warehouseFk,
|
||||||
shipped: currentDate,
|
shipped: {between: [minDate, maxDate]},
|
||||||
landed: currentDate
|
landed: {between: [minDate, maxDate]}
|
||||||
}
|
}
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
|
|
|
@ -7,36 +7,34 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The claim id',
|
description: 'The claim id',
|
||||||
http: {source: 'path'}
|
http: {source: 'path'}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The warehouse id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'companyId',
|
arg: 'companyId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The company id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'dmsTypeId',
|
arg: 'dmsTypeId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The dms type id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'reference',
|
arg: 'reference',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'hasFile',
|
arg: 'hasFile',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: ''
|
description: 'True if has an attached file',
|
||||||
|
required: true
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
|
|
|
@ -7,36 +7,34 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The client id',
|
description: 'The client id',
|
||||||
http: {source: 'path'}
|
http: {source: 'path'}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The warehouse id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'companyId',
|
arg: 'companyId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The company id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'dmsTypeId',
|
arg: 'dmsTypeId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The dms type id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'reference',
|
arg: 'reference',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'hasFile',
|
arg: 'hasFile',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: ''
|
description: 'True if has an attached file',
|
||||||
|
required: true
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
|
|
|
@ -105,15 +105,18 @@ module.exports = Self => {
|
||||||
|
|
||||||
|
|
||||||
async function getTicketId(params, options) {
|
async function getTicketId(params, options) {
|
||||||
const currentDate = new Date();
|
const minDate = new Date();
|
||||||
currentDate.setHours(null, null, null);
|
minDate.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const maxDate = new Date();
|
||||||
|
maxDate.setHours(23, 59, 59, 59);
|
||||||
|
|
||||||
let ticket = await Self.app.models.Ticket.findOne({
|
let ticket = await Self.app.models.Ticket.findOne({
|
||||||
where: {
|
where: {
|
||||||
addressFk: params.addressFk,
|
addressFk: params.addressFk,
|
||||||
warehouseFk: params.warehouseFk,
|
warehouseFk: params.warehouseFk,
|
||||||
shipped: currentDate,
|
shipped: {between: [minDate, maxDate]},
|
||||||
landed: currentDate
|
landed: {between: [minDate, maxDate]}
|
||||||
}
|
}
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
|
|
|
@ -7,36 +7,34 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The ticket id',
|
description: 'The ticket id',
|
||||||
http: {source: 'path'}
|
http: {source: 'path'}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'warehouseId',
|
arg: 'warehouseId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The warehouse id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'companyId',
|
arg: 'companyId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The company id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'dmsTypeId',
|
arg: 'dmsTypeId',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: ''
|
description: 'The dms type id',
|
||||||
},
|
required: true
|
||||||
{
|
}, {
|
||||||
arg: 'reference',
|
arg: 'reference',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
description: ''
|
required: true
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
arg: 'hasFile',
|
arg: 'hasFile',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: ''
|
description: 'True if has an attached file',
|
||||||
|
required: true
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
|
|
Loading…
Reference in New Issue