Skip to main content

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!

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

 


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?


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


Reply