Solved

INItemSiteHistDay does not seem to total to QOH

  • 21 January 2022
  • 3 replies
  • 63 views

Userlevel 6
Badge +5

Hello,

I am using INItemSiteHistDay to do some inventory analysis.  As a gut check, I subtotaled on inventory ID and compared the results to the total of all warehouse quantities in the stock item screen.

Sometimes (not always) my results do not match what is displayed for the total of all warehouse quantities.

I am wondering if I am missing something in the following formulas, or if INItemSiteHistDay does not actually hold all inventory transactions.

These are the formulas I am using:

QtyIn =  INItemSiteHistDay.qtyReceived + INItemSiteHistDay.qtyTransferIn + INItemSiteHistDay.qtyAssemblyIn

 

 QtyOut = INItemSiteHistDay.qtyIssued + INItemSiteHistDay.qtySales + INItemSiteHistDay.qtyCreditMemos + INItemSiteHistDay.qtyTransferOut + INItemSiteHistDay.qtyAssemblyOut

 

Thanks for any assistance!

icon

Best answer by Naveen Boga 21 January 2022, 17:39

View original

3 replies

Userlevel 7
Badge +17

Hi, @ltussing03  I just reviewed the INItemSiteHistDay.cs DAC file, and the above-mentioned formulas are correct. 

Please find the DAC fields with formulas below. 

Hope this helps!

#region QtyIn
public abstract class qtyIn : PX.Data.BQL.BqlDecimal.Field<qtyIn>
{
}
protected Decimal? _QtyIn;
[PXQuantity]
[PXFormula(typeof(Add<INItemSiteHistDay.qtyReceived, Add<INItemSiteHistDay.qtyTransferIn, INItemSiteHistDay.qtyAssemblyIn>>))]
[PXUIField(DisplayName = "Qty. In", Visibility = PXUIVisibility.SelectorVisible)]
public virtual Decimal? QtyIn
{
get
{
return this._QtyIn;
}
set
{
this._QtyIn = value;
}
}
#endregion
#region QtyOut
public abstract class qtyOut : PX.Data.BQL.BqlDecimal.Field<qtyOut>
{
}
protected Decimal? _QtyOut;
[PXQuantity]
[PXFormula(typeof(Add<INItemSiteHistDay.qtyIssued, Add<INItemSiteHistDay.qtySales, Add<INItemSiteHistDay.qtyCreditMemos, Add<INItemSiteHistDay.qtyTransferOut, INItemSiteHistDay.qtyAssemblyOut>>>>))]
[PXUIField(DisplayName = "Qty. Out", Visibility = PXUIVisibility.SelectorVisible)]
public virtual Decimal? QtyOut
{
get
{
return this._QtyOut;
}
set
{
this._QtyOut = value;
}
}
#endregion

 

Userlevel 6
Badge +5

Thanks for confirming Naveen!

Do you have any thoughts as to why the totals of these do not always equal the quantity displayed in Stock Items warehouses quantities?

Userlevel 5
Badge +3

When is that data in these Hist tables updated? Might be tied to the posting/release of a document?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved