Readng Expiry Dates of Work Order inputs

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Readng Expiry Dates of Work Order inputs

Postby DannyC » Wed Aug 05, 2026 3:23 pm

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   
      }
   }
}
User avatar
DannyC
Senpai
Senpai
 
Posts: 741
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 32

Re: Readng Expiry Dates of Work Order inputs

Postby Mike.Sheen » Wed Aug 05, 2026 3:57 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2622
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 824

Re: Readng Expiry Dates of Work Order inputs

Postby DannyC » Thu Aug 06, 2026 9:58 am

You need to query the IN_SOH table yourself.


As I expected.
No worries.

Thx for the confirmation.
User avatar
DannyC
Senpai
Senpai
 
Posts: 741
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 32


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 48 guests

cron