ビン/場所のみをで表示する。 LocationAvailCstAttributeが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;
}
}
}
}
、場所セレクタのみビン/場所が表示されます、そのために:LocationAvailAttributeはINTran.LocationIDフィールドを装飾するための条件はどこで利用可能な0より大きいは、あなたが拡張する必要があります現在の在庫アイテム数。利用可能な数が0を超えています:
私はこれがAcumaticaでどのように成果を上げられたかを理解しています。私の質問は、これがAcumatica Mobile製品でどのように行われるのかということです。 Acumaticaの変更を加えることで、ロジックはモバイル製品でも何とか動作しますか?あなたの投稿について確かめたいだけです。私はAcumaticaコードでこれを行う方法についてかなり明確でした。ちょうどAcumaticaモバイルで同じことをすることに不思議だった。 –
Acumaticaモバイルアプリはプレーヤーとして機能するため、ビジネスロジック内で何かを変更する必要があるたびに(これはシナリオの1つです)、拡張クラスを使用して変更する必要があります。これらの変更は、Webブラウザとモバイルアプリの両方に適用されます。 – RuslanDev
情報ありがとうございます。私はすでにいくつかの変更を加えました。彼らがモバイル製品で正しく動作していることを確認します。 –