Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6553-workerBusiness
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
ff328c9f0d
|
@ -25,6 +25,9 @@
|
|||
"isManaged": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isDestiny": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"countryFk": {
|
||||
"type": "number"
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ BEGIN
|
|||
|
||||
IF(vHasDailyInvoice) AND vHasToInvoice THEN
|
||||
SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial;
|
||||
IF NOT vSerial THEN
|
||||
IF vSerial IS NULL THEN
|
||||
CALL util.throw('Cannot booking without a serial');
|
||||
END IF;
|
||||
|
||||
|
|
|
@ -320,7 +320,8 @@ module.exports = Self => {
|
|||
|
||||
// Credit management changes
|
||||
|
||||
if (changes?.rating >= 0 || changes?.recommendedCredit >= 0)
|
||||
if ((changes?.rating != null && changes.rating >= 0)
|
||||
|| (changes?.recommendedCredit != null && changes.recommendedCredit >= 0))
|
||||
await Self.changeCreditManagement(ctx, finalState, changes);
|
||||
|
||||
const oldInstance = {};
|
||||
|
|
|
@ -128,6 +128,9 @@ module.exports = Self => {
|
|||
return {[param]: value};
|
||||
}
|
||||
});
|
||||
if (ctx.req.query?.showBadDates === 'true')
|
||||
where['fp.started'] = {gte: Date.vnNew()};
|
||||
|
||||
filter = mergeFilters(filter, {where});
|
||||
|
||||
const stmts = [];
|
||||
|
@ -136,6 +139,7 @@ module.exports = Self => {
|
|||
SELECT DISTINCT fp.id,
|
||||
fp.itemFk,
|
||||
fp.warehouseFk,
|
||||
w.name warehouseName,
|
||||
fp.rate2,
|
||||
fp.rate3,
|
||||
fp.started,
|
||||
|
@ -159,6 +163,7 @@ module.exports = Self => {
|
|||
FROM priceFixed fp
|
||||
JOIN item i ON i.id = fp.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN warehouse w ON fp.warehouseFk = w.id
|
||||
`);
|
||||
|
||||
if (ctx.args.tags) {
|
||||
|
@ -184,7 +189,6 @@ module.exports = Self => {
|
|||
}
|
||||
|
||||
stmt.merge(conn.makeSuffix(filter));
|
||||
|
||||
const fixedPriceIndex = stmts.push(stmt) - 1;
|
||||
const sql = ParameterizedSQL.join(stmts, ';');
|
||||
const result = await conn.executeStmt(sql, myOptions);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-back",
|
||||
"version": "24.36.0",
|
||||
"version": "24.40.0",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "Salix backend",
|
||||
"license": "GPL-3.0",
|
||||
|
|
Loading…
Reference in New Issue