I am working on an issue with the WHSLoadList report, where Open shipments are not showing on the report in the case where work was cancelled. These shipments still end up getting added to loads, but do not show on the report.
I can see in the report data provider why these records are not included (because of the cancelled work status)
while select workLine
join workTable
group by workLine.WorkId
where workLine.ShipmentId == whsShipmentTable.ShipmentId &&
workTable.WorkId == workLine.WorkId &&
workTable.WorkStatus != WHSWorkStatus::Combined &&
workTable.WorkStatus != WHSWorkStatus::Cancelled
{
if (!prevWorkId || prevWorkId != workLine.WorkId)
{
shipFreightPieces ;
prevWorkId = workLine.WorkId;
}
}
My initial though was to create a COC on the processReport() method and then insert the missing shipments to the WHSLoadListTmp table, but when I do this the values do not show. Going through debug I can see that my code is being hit but where it temp tables I am starting to wonder if the data is being inserted into a different instance of the table. For reference, here is my COC (using dummy data just to show it was possible)
public void processReport()
{
next processReport();
WHSLoadListTmp whsLoadListTmp;
whsLoadListTmp.LoadId = '100198651';
whsLoadListTmp.ShipmentId = '66';
whsLoadListTmp.ShipmentStop = 5;
whsLoadListTmp.insert();
}
Is it even possible to do what I am trying to do, or do I need to make a whole new version of the report with it's own data provider and basically copy the base data provider and change the criteria that are causing my shipments to be missing?