Merge pull request 'feat: refs #6634 Modified collection-label' (!1932) from 6634-collectionLabelPrevia into dev
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
Reviewed-on: #1932 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
f3e7162bfe
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.productionConfig ADD itemPreviousDefaultSize int NULL COMMENT 'Altura por defecto para los artículos de previa';
|
||||
UPDATE IGNORE vn.productionConfig SET itemPreviousDefaultSize = 40 WHERE id = 1;
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"name": "RoutesMonitor",
|
||||
"base": "Loggable",
|
||||
"base": "VnModel",
|
||||
"mixins": {
|
||||
"Loggable": true
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "routesMonitor"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<td id="outline" class="ellipsize">{{labelData.workerCode || '---'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="outline" class="ellipsize">{{labelCount || labelData.labelCount || 0}}</td>
|
||||
<td id="outline" class="ellipsize">{{labelData.labelCount || 0}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
||||
|
|
|
@ -18,9 +18,9 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
async serverPrefetch() {
|
||||
await this.rawSql('SET @hasPrevia := 0');
|
||||
let ticketIds;
|
||||
const res = await this.rawSqlFromDef('tickets', [this.id]);
|
||||
|
||||
if (res.length) {
|
||||
ticketIds = [];
|
||||
for (const row of res)
|
||||
|
|
|
@ -7,14 +7,16 @@ SELECT c.itemPackingTypeFk code,
|
|||
cc.code color,
|
||||
t.clientFk,
|
||||
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
|
||||
MAX(i.`size`) `size`,
|
||||
MAX(
|
||||
IF(sgd.id, IFNULL(pc.itemPreviousDefaultSize, i.`size`), i.`size`)
|
||||
) `size`,
|
||||
w.code workerCode,
|
||||
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
||||
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||
tt.labelCount,
|
||||
t.nickName,
|
||||
COUNT(*) lineCount,
|
||||
SUM(IF(sgd.id, IF(@hasPrevia, 0, @hasPrevia := 1), 1)) lineCount,
|
||||
rm.routeFk
|
||||
FROM vn.ticket t
|
||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||
|
@ -33,6 +35,8 @@ SELECT c.itemPackingTypeFk code,
|
|||
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id
|
||||
JOIN vn.productionConfig pc
|
||||
WHERE t.id IN (?)
|
||||
GROUP BY t.id
|
||||
ORDER BY cc.`code`;
|
||||
ORDER BY cc.`code`
|
Loading…
Reference in New Issue