diff --git a/modules/ticket/back/methods/ticket/itemLackDetail.js b/modules/ticket/back/methods/ticket/itemLackDetail.js index 1d0feda2d..c96526719 100644 --- a/modules/ticket/back/methods/ticket/itemLackDetail.js +++ b/modules/ticket/back/methods/ticket/itemLackDetail.js @@ -2,11 +2,11 @@ const {ParameterizedSQL} = require('loopback-connector'); module.exports = Self => { Self.remoteMethod('itemLackDetail', { - description: 'Download a ticket delivery note document', + description: 'Retrieve detail from ticket', accessType: 'READ', accepts: [ { - arg: 'id', + arg: 'itemFk', type: 'number', description: 'The item id', }, @@ -24,7 +24,7 @@ module.exports = Self => { }, }); - Self.itemLackDetail = async(id, options) => { + Self.itemLackDetail = async(itemFk, options) => { const conn = Self.dataSource.connector; const myOptions = {}; @@ -71,7 +71,7 @@ module.exports = Self => { AND t.landed >= util.VN_CURDATE() AND t.landed < util.VN_CURDATE() + INTERVAL ? + 1 DAY `, - [id, 2]); + [itemFk, 2]); const sql = ParameterizedSQL.join([stmt], ';'); const result = await conn.executeStmt(sql, myOptions);