我们目前已经将仓库/仓位转移添加到Acumatica Mobile,以允许用户通过Mobile进行仓位转移,而不是使用Acumatica。
我们已经在with SelectorContainer语句中将QtyAvailable添加到From和to Bin选择器中。然而,有没有一种方法可以只过滤出项目的那些记录,而不是显示所有的垃圾箱/位置。此筛选器将仅位于from位置。目标位置仍将显示所有位置。
发布于 2017-10-30 08:03:40
仅显示具有数量的箱位/位置。大于0,则应扩展LocationAvailAttribute修饰INTran.LocationID字段的Where条件:
using PX.Data;
using System;
namespace PX.Objects.IN
{
public class INTransferEntryExt : PXGraphExtension<INTransferEntry>
{
[PXRemoveBaseAttribute(typeof(LocationAvailAttribute))]
[PXMergeAttributes(Method = MergeMethod.Append)]
[LocationAvailCst(typeof(INTran.inventoryID), typeof(INTran.subItemID),
typeof(INTran.siteID), typeof(INTran.tranType), typeof(INTran.invtMult))]
public virtual void INTran_LocationID_CacheAttached(PXCache sender)
{
}
public class LocationAvailCstAttribute : LocationAvailAttribute
{
public LocationAvailCstAttribute(Type inventoryType, Type subItemType,
Type siteIDType, Type TranType, Type InvtMultType)
: base(inventoryType, subItemType, siteIDType, TranType, InvtMultType)
{
var attr = _Attributes[_SelAttrIndex] as PXDimensionSelectorAttribute;
var dimAttr = attr.GetAttribute<PXDimensionAttribute>();
var selAttr = attr.GetAttribute<PXSelectorAttribute>();
var select = selAttr.GetSelect();
select = select.WhereAnd<Where<INLocationStatus.qtyAvail, Greater<Zero>>>();
var newAttr = new PXDimensionSelectorAttribute(DimensionName,
select.GetType(), typeof(INLocation.locationCD),
new Type[]
{
typeof(INLocation.locationCD),
typeof(INLocationStatus.qtyOnHand),
typeof(INLocationStatus.qtyAvail),
typeof(INLocationStatus.active),
typeof(INLocation.primaryItemID),
typeof(INLocation.primaryItemClassID),
typeof(INLocation.receiptsValid),
typeof(INLocation.salesValid),
typeof(INLocation.transfersValid),
typeof(INLocation.projectID),
typeof(INLocation.taskID)
});
_Attributes[_SelAttrIndex] = newAttr;
newAttr.ValidComboRequired = attr.ValidComboRequired;
newAttr.CacheGlobal = attr.CacheGlobal;
newAttr.DirtyRead = attr.DirtyRead;
newAttr.DescriptionField = attr.DescriptionField;
}
}
}
}在INTran.LocationID字段中添加自定义LocationAvailCstAttribute后,位置选择器将仅显示当前库存项目数量的仓位/位置。Available大于0:

https://stackoverflow.com/questions/46852910
复制相似问题