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.
Default non-stock unit cost to 0.00?
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
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/b7757f93-6ecd-4f9c-b902-35b10ea34208.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/fa50e492-0fc0-4e08-bd67-a31b952efb6d.png)
Join fields are:
- bAccountID = vendorID
- orderType = orderType, orderNbr = orderNbr
- vendorID = vendorID, inventoryID = inventoryID
- inventoryID = inventoryID
Probably have to fine-tune Conditions to your needs:
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/d24b4970-d7bb-4c6b-87de-7fffad7e6877.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/ad5b88c4-8afb-43a7-bcb4-854fe6a0d553.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/b6dc2b55-2523-4842-9f73-8d62e4771499.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/884657ec-4790-4167-b86b-02a0068e7019.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/b8f8d325-3814-4023-b8a0-a9f2111b98eb.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/89daf425-585a-420f-a9c9-be4689fd9e89.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/cd6387da-2439-4a89-9927-7fc7f56d9cd8.png)
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.