refs #4965 Added routeFk #1251

Merged
joan merged 5 commits from 4965-collection-label-add-routeFk into dev 2023-02-15 07:53:35 +00:00
3 changed files with 50 additions and 37 deletions

View File

@ -21,7 +21,7 @@
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td> <td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
</tr> </tr>
<tr> <tr>
<td><div id="agencyDescripton" class="ellipsize">{{labelData.agencyDescription ? labelData.agencyDescription.toUpperCase() : '---'}}</div></td> <td><div id="agencyDescripton" class="ellipsize">{{getAgencyDescripton(labelData)}}</div></td>
<td id="bold">{{labelData.lineCount || 0}}</td> <td id="bold">{{labelData.lineCount || 0}}</td>
</tr> </tr>
<tr> <tr>

View File

@ -61,6 +61,18 @@ module.exports = {
return value; return value;
}, },
getAgencyDescripton(labelData) {
let value;
if (labelData.agencyDescription)
value = labelData.agencyDescription.toUpperCase().substring(0, 11);
else
value = '---';
if (labelData.routeFk)
value = `${value} [${labelData.routeFk.toString().substring(0, 3)}]`;
return value;
},
}, },
components: { components: {
'report-body': reportBody.build() 'report-body': reportBody.build()

View File

@ -14,7 +14,8 @@ SELECT c.itemPackingTypeFk code,
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped, DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
tt.labelCount, tt.labelCount,
t.nickName, t.nickName,
COUNT(*) lineCount COUNT(*) lineCount,
rm.routeFk
FROM vn.ticket t FROM vn.ticket t
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
JOIN vn.collection c ON c.id = tc.collectionFk JOIN vn.collection c ON c.id = tc.collectionFk