修改选择器父批次/序列号以在材料屏幕中添加过滤器 (AM300000)

问题描述 投票:0回答:1

您好,我想修改材料屏幕中的父批次/序列号,以仅显示剩余数量值大于 0 的选择器记录。

选择器屏幕

我尝试使用以下这些方法修改选择器,但它仍然显示剩余数量为 0.00 的选择器记录。

 [PXMergeAttributes(Method = MergeMethod.Append)][PXRestrictor(typeof(Where<AMProdItemSplit.qtyRemaining.IsGreater<decimal0>>), "Qty Remaining is zero")]
protected virtual void _(Events.CacheAttached<AMMTran.parentLotSerialNbr> e) { }

[PXMergeAttributes(Method = MergeMethod.Replace)]
[PXDBString(INLotSerialStatus.lotSerialNbr.LENGTH, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Parent Lot/Serial Nbr.", Enabled = true, FieldClass = "LotSerial")]
  [PXDefault("")]
[PXSelector(
   typeof(Search2<AMProdItemSplit.lotSerialNbr,
                InnerJoin<AMProdItem,
                    On<AMProdItem.prodOrdID, Equal<AMProdItemSplit.prodOrdID>,
                    And<AMProdItem.orderType, Equal<AMProdItemSplit.orderType>>>>,
                Where<AMProdItem.orderType, Equal<Current<AMMTran.orderType>>,
                    And<AMProdItem.prodOrdID, Equal<Current<AMMTran.prodOrdID>>,
                    And<AMProdItemSplit.qtyRemaining, Greater<decimal0>>>>>),
    typeof(AMProdItemSplit.lotSerialNbr),
    typeof(AMProdItemSplit.qty),            // Display: Total Quantity
    typeof(AMProdItemSplit.qtyComplete),    // Display: Quantity Completed
    typeof(AMProdItemSplit.qtyScrapped),    // Display: Quantity Scrapped
    typeof(AMProdItemSplit.qtyRemaining),   // Display: Quantity Remaining
    SubstituteKey = typeof(AMProdItemSplit.lotSerialNbr)
)]
protected virtual void _(Events.CacheAttached<AMMTran.parentLotSerialNbr> e)
{
}

请让我知道我缺少什么,谢谢!

acumatica acumatica-kb
1个回答
0
投票

尝试向字段添加 PXRestrictor 属性:

[PXRestrictor(typeof(Where<AMProdItemSplit.qtyRemaining, Greater<decimal0>>), 
    "Remaining Quantity is 0.")]  

 
© www.soinside.com 2019 - 2024. All rights reserved.