Skip to main content
Solved

Default non-stock unit cost to 0.00?


jhouser
Captain II
Forum|alt.badge.img+1

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. 

Best answer by craig2

Hi @jhouser,

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!

 

View original
Did this topic help you find an answer to your question?

6 replies

ngerst
Freshman II
Forum|alt.badge.img
  • Freshman II
  • 37 replies
  • May 16, 2024

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);
        }
    }
}

 

 


craig2
Pro I
Forum|alt.badge.img+2
  • Pro I
  • 88 replies
  • Answer
  • May 16, 2024

Hi @jhouser,

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!

 


jhouser
Captain II
Forum|alt.badge.img+1
  • Author
  • Captain II
  • 103 replies
  • May 20, 2024

@craig2 Thanks, I might use that


nhorvathNAW
Freshman II
Forum|alt.badge.img
  • Freshman II
  • 34 replies
  • May 30, 2024

@craig2 This is what I may need to do as well. Just trying to determine how this would be created.

 

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.


craig2
Pro I
Forum|alt.badge.img+2
  • Pro I
  • 88 replies
  • May 30, 2024

Hey @nhorvathNAW , sure thing.  I’m weird about sharing the actual exports out of the system, but here’s a bunch of screenshots.  The basic idea on this is to proactively create a 0.00 Vendor Price whenever there’s not an entry on the list.  I may have initially used the Import Scenario to zero out the existing entries, then modified it for ongoing maintenance.

 

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!


nhorvathNAW
Freshman II
Forum|alt.badge.img
  • Freshman II
  • 34 replies
  • May 31, 2024

@craig2 This was so helpful. I truly appreciate the time you took to include all the details and included screenshots. Thank you!!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings