Validate Job Cost Entry Backorders  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Validate Job Cost Entry Backorders

Postby nsbandara » Mon Oct 01, 2018 6:05 pm

Hi,

We have a requirement for a plugin to prevent back orders for all inventory transactions in Jiwa 7.2. Although sales orders, work orders , warehouse transfers etc have save start events JiwaFinancials.Jiwa.JiwaJobCosting.CostEntry does not provide any event that we can subscribe to validate backordered items.

Is there any possible work around to prevent cost entry being saved with back orders ?


Image
Attachments
job cost entry.JPG
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11

Re: Validate Job Cost Entry Backorders

Postby SBarnes » Mon Oct 01, 2018 6:40 pm

Looks like you can't get at it with the business object so the other option is to capture the user clicking on the toolbar in the form, the following is an example of how I did this in the sales order form for printing

Code: Select all
    public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
      if (JiwaForm.GetType() == typeof(JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm))
      {
         JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm salesform = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
         salesform.UltraToolbarsManager1.ToolClick += UltraToolbarsManager1_ToolClick;
         JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder salesorder = salesform.SalesOrder;
         
      }
       }


with the click being

Code: Select all
public void UltraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
         string key = e.Tool.Key;
    if (key == "ID_RecordSalesOrderPrint")
        {
        }
}


The id you would be looking for in the case of save would be ID_RecordSave, given that job costing uses the maintenance form the same idea should work. Use a JiwaFinancials.Jiwa.JiwaApplication.Exceptions.ClientCancelledException to stop Jiwa saving if you find back orders.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Validate Job Cost Entry Backorders  Topic is solved

Postby nsbandara » Mon Oct 01, 2018 9:05 pm

Thank you Stuart.

Suggested solution would work for us.

By the way I think it would be ideal if Jiwa can provide on save and on activate/process events for all transaction type business objects.
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 10 guests