cambio landed por created
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e37b3d8277
commit
f1c30ca6d1
|
@ -83,9 +83,8 @@ module.exports = function(Self) {
|
|||
throw new UserError('Invalid account');
|
||||
|
||||
await Self.rawSql(
|
||||
`CALL vn.ledger_doCompensation(?, ?, ?, ?, ?, ?, ?)`,
|
||||
`CALL vn.ledger_doCompensation(CURDATE(), ?, ?, ?, ?, ?, ?)`,
|
||||
[
|
||||
Date(),
|
||||
args.compensationAccount,
|
||||
args.bankFk,
|
||||
accountingType.receiptDescription + args.compensationAccount,
|
||||
|
|
|
@ -20,12 +20,6 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getSuggestedTickets = async id => {
|
||||
const ticketsInRoute = await Self.app.models.Ticket.find({
|
||||
where: {routeFk: id},
|
||||
fields: ['id']
|
||||
});
|
||||
const idsToExclude = ticketsInRoute.map(ticket => ticket.id);
|
||||
|
||||
const route = await Self.app.models.Route.findById(id);
|
||||
|
||||
const zoneAgencyModes = await Self.app.models.ZoneAgencyMode.find({
|
||||
|
@ -48,8 +42,8 @@ module.exports = Self => {
|
|||
where: {
|
||||
agencyModeFk: route.agencyModeFk,
|
||||
zoneFk: {inq: zoneIds},
|
||||
id: {nin: idsToExclude},
|
||||
created: {between: [minDate, maxDate]}
|
||||
routeFk: null,
|
||||
landed: {between: [minDate, maxDate]}
|
||||
},
|
||||
include: [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue