添加过滤器后准备付款页面不显示 PayDate

Prepare Payments page not showing PayDate after adding a filter

我为准备付款 (AP503000) 添加了一个新过滤器。过滤器按预期工作。

经过测试,我发现支付日期 (APInvoice.PayDate) 没有在网格中显示数据 如何显示发薪日数据?

我看到很多数据来自APAdjust,缺少的数据来自APInvoice。

代码:

namespace PX.Objects.AP
{
    // Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
    public class APPayBills_Extension : PXGraphExtension<APPayBills>
    {
        #region Event Handlers

        [PXFilterable]
        public PXFilteredProcessingJoin<
            APAdjust, PayBillsFilter,
            InnerJoin<APInvoice,
                On<APInvoice.docType, Equal<APAdjust.adjdDocType>,
                And<APInvoice.refNbr, Equal<APAdjust.adjdRefNbr>>>,
            LeftJoin<APTran,
                On<APInvoice.paymentsByLinesAllowed, Equal<True>,
                And<APTran.tranType, Equal<APAdjust.adjdDocType>,
                And<APTran.refNbr, Equal<APAdjust.adjdRefNbr>,
                And<APTran.lineNbr, Equal<APAdjust.adjdLineNbr>>>>>>>>
            APDocumentList;

        protected virtual IEnumerable apdocumentlist()
        {
            PayBillsFilter row;

            row = Base.Filter.Select();

            PayBillsFilterExt payBillsFilterExt = row.GetExtension<PayBillsFilterExt>();


            foreach (APAdjust item in Base.APDocumentList.Select())
            {

                if (!string.IsNullOrEmpty(payBillsFilterExt.UsrEPEmployee))
                {
                    //To test remove all code and only leave the else ( yield return item;)
                    BAccount bAccount = PXSelect<
                        BAccount,
                        Where<BAccount.bAccountID, Equal<Required<APAdjust.vendorID>>>>
                        .Select(Base, item.VendorID);
                    BAccountExt bAccountExt = bAccount.GetExtension<BAccountExt>();

                    if (bAccountExt.UsrEmployeeID == payBillsFilterExt.UsrEPEmployee)
                    {
                        yield return item;
                    }
                }
                else
                {                    
                     yield return item;
                }
            }    
        }

        #endregion
    }
}

当您的视图是两个表 APAdjust 和 APInvoice 之间的联接时,您将生成一条 APADjust 记录。尝试这样的事情:

 protected virtual IEnumerable apdocumentlist()
 {
    var sel = new PXSelectJoin<APAdjust... (view definition) 
    foreach( var rec in sel.Select()) 
    {  
      Check your field;    
      yield rec; 
    }
  }