Page 1 of 1

Validate Job Cost Entry Backorders

PostPosted: Mon Oct 01, 2018 6:05 pm
by nsbandara
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

Re: Validate Job Cost Entry Backorders

PostPosted: Mon Oct 01, 2018 6:40 pm
by SBarnes
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.

Re: Validate Job Cost Entry Backorders  Topic is solved

PostPosted: Mon Oct 01, 2018 9:05 pm
by nsbandara
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.