2017-10-20 27 views
0

我们目前已将仓库/ Bin传输添加到Acumatica Mobile,以允许用户通过Mobile与使用Acumatica进行bin传输。将滤镜添加到Acumatica Mobile中的选择器

我们已将QtyAvailable添加到SelectorContainer语句中的From和To Bin选择器中。但是,有没有办法只过滤这些项目的记录,而不是显示所有的箱子/位置。此过滤器只会位于自己的位置。到位置仍然会显示所有位置。

回答

0

仅显示带有数量的箱/位置。可用大于0,你应该继承Where条件为LocationAvailAttribute装饰INTran.LocationID领域:

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

随着LocationAvailCstAttribute在INTran.LocationID场添加的自定义,地点选择将只显示箱/位置,为此,当前库存项目数量。可用的是大于0: enter image description here

+0

我明白这可以如何在Acumatica中实现。我的问题是如何在Acumatica Mobile产品中完成这项工作。通过在Acumatica中进行更改,逻辑在某种程度上也可以在移动产品中工作。只是想确定你的帖子。我非常清楚如何在Acumatica Code中执行此操作。只是想知道在Acumatica Mobile中做同样的事情。 –

+0

由于Acumatica移动应用程序作为一个播放器,每次您需要更改业务逻辑内的某些内容(这是其中一种情况)时,您必须通过扩展类进行更改。这些更改将应用​​于Web浏览器和移动应用程序。 – RuslanDev

+0

感谢您的信息。我已经做了一些改变。我将验证他们在Mobile产品中正常工作。 –

相关问题