now a claim state is 'resolved' when a refund ticket is created

This commit is contained in:
Gerard 2018-11-30 08:00:35 +01:00
parent fdf0c5f1c0
commit adebf5e0df
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ module.exports = Self => {
newRefundTicket.id, claim.ticketFk
], {transaction: transaction});
let claimState = await Self.app.models.ClaimState.findOne({where: {description: 'Resuelto'}});
await claim.updateAttribute('claimStateFk', claimState.id, {transaction: transaction});
await transaction.commit();
return newRefundTicket;