在Acumatica中需要将采购订单号(PO Nbr)加入销售订单行(SO Line)中。以下是实现这一目标的示例代码:
1.创建PO Nbr列
public class SOLineExt : PXCacheExtension
{
#region UsrPONbr
[PXDBString(15, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
[PXUIField(DisplayName = "PO Nbr.")]
public virtual string UsrPONbr { get; set; }
public abstract class usrPONbr : IBqlField { }
#endregion
}
2.添加PO Nbr列到SO行维度表中。
public class SOLineExt2 : PXCacheExtension,
And>>
{
#region UsrPONbr
[PXString(15, IsUnicode = true)]
[PXUIField(DisplayName = "PO Nbr.", Enabled = false)]
[PXDBScalar(typeof(Search,
And>>>))]
public virtual string UsrPONbr { get; set; }
public abstract class usrPONbr : IBqlField { }
#endregion
}
3.创建PO Nbr在SO行的图形设定。
public class SOOrderEntryExt : PXGraphExtension
{
public PXSelect>,
And>,
And,
And