refs #6184 saveCmr #1788

Merged
guillermo merged 58 commits from 6184-saveCmr into dev 2024-02-13 06:47:06 +00:00
2 changed files with 8 additions and 7 deletions
Showing only changes of commit c0089b1fa0 - Show all commits

View File

@ -1,8 +1,6 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('saveCmr', {
description: 'Save sign',
description: 'Save cmr',
accessType: 'WRITE',
accepts:
[
@ -34,10 +32,10 @@ module.exports = Self => {
try {
for (const ticketId of tickets) {
const cmrFk = await models.Ticket.findOne(
{where: {id: ticketId},
fields: ['cmrFk']
}, myOptions);
const cmrFk = await models.Ticket.findOne({
where: {id: ticketId},
fields: ['cmrFk']
}, myOptions);
if (cmrFk) {
const dmsTypeCmr = await models.DmsType.findOne({

View File

@ -63,6 +63,9 @@
},
"weight": {
"type": "number"
},
"cmrFk": {
"type": "number"
}
},
"relations": {