#6321 - Negative tickets #1945

Open
jsegarra wants to merge 97 commits from 6321_negative_tickets into dev
1 changed files with 4 additions and 4 deletions
Showing only changes of commit cc3f2da639 - Show all commits

View File

@ -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',
jsegarra marked this conversation as resolved Outdated

esta descripcion corresponde ?

esta descripcion corresponde ?
accessType: 'READ',
accepts: [
{
arg: 'id',
arg: 'itemFk',
jsegarra marked this conversation as resolved Outdated

si estamos en la seccion ticket, yo el argumento lo llamaria itemFk, porque a mitad codigo, id puede dar confusion a que es el id de la entidad, en este caso ticket

si estamos en la seccion ticket, yo el argumento lo llamaria itemFk, porque a mitad codigo, id puede dar confusion a que es el id de la entidad, en este caso ticket
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);