Page 1 of 1

Readng Expiry Dates of Work Order inputs

PostPosted: Wed Aug 05, 2026 3:23 pm
by DannyC
Sort of similar to viewtopic.php?f=26&t=2550

I want to read the expiry dates of all input lines on Work Orders. Client wants to display a little popup to advise if an item is expired.
Like with the outputs, I guess I need to use a similar implementation of the IJiwaSOHConsumer?

Will this work when the work order is only at Forecast status? I reckon this might be where the complexity lies. When W/O is at Started or Closed is too late for this client. The popup needs to show at forecast. I know no inputs have been allocated yet from SOH so I'll need some way to know what the likely SOH lines would get allocated based on FIFO.

If I could have a starting point beyond what I have here that should at least give me some guidance.
Code: Select all
if (workOrder.Status == JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.WorkOrder.Statuses.Forecast)
{
   foreach(JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.Stage stage in workOrder.Stages)
   {
      foreach(JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.InputItem inputItem in stage.InputItems)
      {
         //look for expiry dates   
      }
   }
}

Re: Readng Expiry Dates of Work Order inputs

PostPosted: Wed Aug 05, 2026 3:57 pm
by Mike.Sheen
See viewtopic.php?f=26&t=2550#p9734 - same as that, but for InputItems.

Will this work when the work order is only at Forecast status?


No, it's not taken any stock.

You need to query the IN_SOH table yourself.

Re: Readng Expiry Dates of Work Order inputs

PostPosted: Thu Aug 06, 2026 9:58 am
by DannyC
You need to query the IN_SOH table yourself.


As I expected.
No worries.

Thx for the confirmation.