Page 1 of 1

Purchase Order ItemIsAlreadyOnOrder

PostPosted: Thu Nov 05, 2015 3:06 pm
by perry
Hi,

Jiwa 7.0.129

I'm trying to disable the "Item is already on order" message if "PurchaseOrder.IsAutoReordering = true".

It looks the event is called after message box is displayed?

Code: Select all
AddHandler PurchaseOrder.Lines.ItemIsAlreadyOnOrder, AddressOf ItemIsAlreadyOnOrder


Code: Select all
Private Sub ItemIsAlreadyOnOrder(PartNo As String, ByRef Cancel As Boolean)
      Cancel = PurchaseOrder.IsAutoReordering
End Sub

Re: Purchase Order ItemIsAlreadyOnOrder  Topic is solved

PostPosted: Fri Nov 13, 2015 11:54 am
by Scott.Pearce
What you are doing there is cancelling the adding of the line. Yes, the event is fired, the form displays the message, then if cancel = true the AddInventoryItem routine is aborted.

If you want to just not show the message, then you need to hook into an event on the purchase order form called "AboutToAskItemAlreadyOnOrder" and set it's cancel to true. Alas, this event was not in 7.0.129 and I cannot see any other way of suppressing the message in that version of Jiwa :-(