I need unit cost of non-stock item to default to 0.00 on Requisitions, PO’s, etc. Currently it defaults to the last cost. Anyone know if this can be done? I haven’t found a setting.
I haven't found a setting for this either, but I've been working on a similar issue. Here's a snippet of the code I've been experimenting with.
Without customization, achieving the specific requirement of having the unit cost default to 0.00 for previously ordered parts might be challenging directly through settings alone (that I have found). Acumatica is designed to retain last costs and vendor-specific pricing, which generally helps maintain consistent purchasing records.
using PX.Data;
using PX.Objects.PO;
using PX.Objects.IN;
public class POOrderEntry_Extension : PXGraphExtension<POOrderEntry>
{
protected void POLine_InventoryID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
POLine row = e.Row as POLine;
if (row == null) return;
InventoryItem item = PXSelectorAttribute.Select<InventoryItem.inventoryID>(cache, row) as InventoryItem;
if (item != null && item.StkItem == false) // Non-stock item
{
cache.SetValueExt<POLine.curyUnitCost>(row, 0.00m);
}
}
}
Hi
I have a similar situation with Stock Items (our pricing gets negotiated for every order), and solved it with a Business Event that adds a zero price to the Vendor Prices (AP.20.20.00) screen if not there already. A little janky, but it works for us!
Any chance you are willing to share your GI / Business Event?
I have some Non Stock Items that have a number of Vendors associated with them and I am having trouble determining the best way to trigger a business event to catch all the Non Stock Items.
Hey
Join fields are:
- bAccountID = vendorID
- orderType = orderType, orderNbr = orderNbr
- vendorID = vendorID, inventoryID = inventoryID
- inventoryID = inventoryID
Probably have to fine-tune Conditions to your needs:
Hopefully that at least gets you pointed in the right direction!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.