pricerc wrote:what about selective inventory? I see a SelectiveInventory flag and a InvSelections collection?
Yes - that's possible - this will get passed to the stored procedure used to get the items to process.
I've updated the plugin (attached) to do this. I've also shown how you can override the stored procedure invoked (but commented that line out).
The relevant bit changed is as follows:
- Code: Select all
// Process backorders
JiwaFinancials.Jiwa.JiwaBOProcess.StdFunctions boProcess = JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaBOProcess.StdFunctions>(null);
boProcess.SetupProcessBackOrdersUnattended();
boProcess.SelectiveInventory = true;
//boProcess.StoredProcName = "your_sp_name"; // Make sure this accepts the same parameters as usp_Jiwa_GetBackOrderProcessList, and also returns an identical set of columns
// Filter only the inventory items on the BookIn
foreach(JiwaFinancials.Jiwa.JiwaLandedCost.BookIn.Line bookInLine in bookIn.Lines)
{
JiwaFinancials.Jiwa.JiwaBOProcess.clsInventorySelection inventoryItem = new JiwaFinancials.Jiwa.JiwaBOProcess.clsInventorySelection() { InventoryID = bookInLine.Inventory.InventoryID, PartNo = bookInLine.Inventory.PartNo, Description = bookInLine.Inventory.Description };
boProcess.InvSelections.AddItem(ref inventoryItem);
}
boProcess.Process();