hotFix: saveSign

This commit is contained in:
Alex Moreno 2024-01-25 11:09:56 +01:00
parent bfbe8302b6
commit 578bcd3cce
3 changed files with 22 additions and 21 deletions

View File

@ -1,6 +1,6 @@
import './index';
fdescribe('component vnRoleCard', () => {
describe('component vnRoleCard', () => {
let controller;
let $httpBackend;

View File

@ -1,6 +1,6 @@
import './index';
fdescribe('component vnRoleDescriptor', () => {
describe('component vnRoleDescriptor', () => {
let controller;
let $httpBackend;

View File

@ -72,7 +72,8 @@ module.exports = Self => {
async function createGestDoc(id) {
const ticket = await models.Ticket.findById(id,
{include: [
{
include: [
{
relation: 'warehouse',
scope: {
@ -125,7 +126,7 @@ module.exports = Self => {
if (await gestDocExists(ticketId))
throw new UserError('Ticket is already signed');
if (location) setLocation(ticketId);
if (location) await setLocation(ticketId);
if (!gestDocCreated) await createGestDoc(ticketId);
await models.TicketDms.create({ticketFk: ticketId, dmsFk: dms[0].id}, myOptions);
const ticket = await models.Ticket.findById(ticketId, null, myOptions);
@ -135,7 +136,7 @@ module.exports = Self => {
where: {
code: 'DELIVERED'
}
}, options);
}, myOptions);
await models.Ticket.state(ctx, {
ticketFk: ticketId,