public static void DefaultInvtAcctSub(PXGraph graph, INItemSite itemsite, InventoryItem item, INSite site, INPostClass postclass)
 {
     if (site != null && site.OverrideInvtAccSub == true)
     {
         itemsite.InvtAcctID = site.InvtAcctID;
         itemsite.InvtSubID  = site.InvtSubID;
     }
     else if (postclass != null)
     {
         itemsite.InvtAcctID = INReleaseProcess.GetAccountDefaults <INPostClass.invtAcctID>(graph, item, site, postclass);
         itemsite.InvtSubID  = INReleaseProcess.GetAccountDefaults <INPostClass.invtSubID>(graph, item, site, postclass);
     }
 }
        public static void DefaultItemSiteByItem(PXGraph graph, INItemSite itemsite, InventoryItem item, INSite site, INPostClass postclass)
        {
            if (item != null)
            {
                itemsite.PendingStdCost     = item.PendingStdCost;
                itemsite.PendingStdCostDate = item.PendingStdCostDate;
                itemsite.StdCost            = item.StdCost;
                itemsite.StdCostDate        = item.StdCostDate;
                itemsite.LastStdCost        = item.LastStdCost;

                itemsite.BasePrice = item.BasePrice;

                itemsite.MarkupPct = item.MarkupPct;
                itemsite.RecPrice  = item.RecPrice;

                itemsite.ABCCodeID            = item.ABCCodeID;
                itemsite.ABCCodeIsFixed       = item.ABCCodeIsFixed;
                itemsite.MovementClassID      = item.MovementClassID;
                itemsite.MovementClassIsFixed = item.MovementClassIsFixed;

                itemsite.PreferredVendorID         = item.PreferredVendorID;
                itemsite.PreferredVendorLocationID = item.PreferredVendorLocationID;
                itemsite.ReplenishmentClassID      = site != null ? site.ReplenishmentClassID : null;
                itemsite.DfltReceiptLocationID     = site.ReceiptLocationID;
                itemsite.DfltShipLocationID        = site.ShipLocationID;

                DefaultItemReplenishment(graph, itemsite);
                DefaultSubItemReplenishment(graph, itemsite);
            }
        }
Beispiel #3
0
        public static void DefaultItemSiteByItem(PXGraph graph, INItemSite itemsite, InventoryItem item, INSite site, INPostClass postclass)
        {
            if (item != null)
            {
                itemsite.PendingStdCost     = item.PendingStdCost;
                itemsite.PendingStdCostDate = item.PendingStdCostDate;
                itemsite.StdCost            = item.StdCost;
                itemsite.StdCostDate        = item.StdCostDate;
                itemsite.LastStdCost        = item.LastStdCost;

                itemsite.PendingBasePrice     = item.PendingBasePrice;
                itemsite.PendingBasePriceDate = item.PendingBasePriceDate;
                itemsite.BasePrice            = item.BasePrice;
                itemsite.BasePriceDate        = item.BasePriceDate;
                itemsite.LastBasePrice        = item.LastBasePrice;

                itemsite.MarkupPct = item.MarkupPct;
                itemsite.RecPrice  = item.RecPrice;

                itemsite.ABCCodeID            = item.ABCCodeID;
                itemsite.ABCCodeIsFixed       = item.ABCCodeIsFixed;
                itemsite.MovementClassID      = item.MovementClassID;
                itemsite.MovementClassIsFixed = item.MovementClassIsFixed;

                itemsite.PreferredVendorID         = item.PreferredVendorID;
                itemsite.PreferredVendorLocationID = item.PreferredVendorLocationID;
                itemsite.ReplenishmentClassID      = site != null ? site.ReplenishmentClassID : null;
                itemsite.DfltReceiptLocationID     = site.ReceiptLocationID;
                itemsite.DfltShipLocationID        = site.ShipLocationID;

                DefaultItemReplenishment(graph, itemsite);
                DefaultSubItemReplenishment(graph, itemsite);
            }
            if (itemsite.InvtAcctID == null)
            {
                if (site.OverrideInvtAccSub == true)
                {
                    itemsite.InvtAcctID = site.InvtAcctID;
                    itemsite.InvtSubID  = site.InvtSubID;
                }
                else if (postclass != null)
                {
                    itemsite.InvtAcctID = INReleaseProcess.GetAccountDefaults <INPostClass.invtAcctID>(graph, item, site, postclass);
                    itemsite.InvtSubID  = INReleaseProcess.GetAccountDefaults <INPostClass.invtSubID>(graph, item, site, postclass);
                }
                itemsite.StdCost = item.StdCost;
            }
        }