#6321 - Negative tickets #1945
|
@ -25,12 +25,12 @@ module.exports = Self => {
|
|||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/recalculatePrice`,
|
||||
path: `/replaceItem`,
|
||||
verb: 'POST'
|
||||
}
|
||||
});
|
||||
|
||||
Self.recalculatePrice = async(ctx, saleFk, itemFk, quantity, options) => {
|
||||
Self.replaceItem = async(ctx, saleFk, itemFk, quantity, options) => {
|
||||
const myOptions = {userId: ctx.req.accessToken.userId};
|
||||
let tx;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ module.exports = Self => {
|
|||
s.itemFk itemFk,
|
||||
s.price price,
|
||||
al.code alertLevelCode,
|
||||
z.id zoneFk,
|
||||
z.name zoneName,
|
||||
jgallego marked this conversation as resolved
Outdated
|
||||
z.hour theoreticalhour,
|
||||
cn.isRookie,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
fdescribe('Item Lack', () => {
|
||||
describe('Item Lack', () => {
|
||||
jsegarra marked this conversation as resolved
jgallego
commented
modules/ticket/back/methods/ticket/specs/closure.spec.js dile a chatgpt que coja este arhcivo como plantilla y cambie el tuyo para dejar los beginTransaction y los rollback en un beforeEach y afterEach modules/ticket/back/methods/ticket/specs/closure.spec.js dile a chatgpt que coja este arhcivo como plantilla y cambie el tuyo para dejar los beginTransaction y los rollback en un beforeEach y afterEach
|
||||
beforeEach(async() => {
|
||||
ctx = {
|
||||
req: {
|
||||
|
|
|
@ -36,7 +36,8 @@ module.exports = Self => {
|
|||
try {
|
||||
const ticketsIds = tickets.map(({ticketFk}, index) => ticketFk);
|
||||
const ticketsCount = await Self.rawSql(`
|
||||
jgallego
commented
si el objetivo es contar tickets te sobraria la tabla sale, si el objetivo es contar tickets te sobraria la tabla sale,
si el objetivo es contar sales te sobraria la tabla ticket
jsegarra
commented
resuelto resuelto
|
||||
Select t.id tid, s.id sid, count(s.id) count from
|
||||
Select t.id tid, s.id sid, count(s.id) count
|
||||
FROM
|
||||
vn.ticket t
|
||||
LEFT JOIN vn.sale s
|
||||
ON s.ticketFk = t.id
|
||||
|
|
Loading…
Reference in New Issue
yo estoy cambiando los alertLevel, no podemos poner numero en el codigo, si no hay ..null
ok, lo reviso
Lo he valorado con otros compañeros y esto de momento lo dejamos así