I need to add a new filter on Write Off Balances and Credits(AR505000). Normally you have to copy the PXFilteredProcessingJoin or PXProcessingJoin field to the extension class and the IEnumerable function that comes with it. But in the Write Off Balances and Credits pages there is no IEnumerable. How would one approach adding more filters?
I was thinking of adding the IEnumerable my self:
public class ARCreateWriteOff_Extension : PXGraphExtension<ARCreateWriteOff>
{
#region Event Handlers
//THis is copied form the Graph
[PXFilterable]
// [PX.SM.PXViewDetailsButton(typeof(ARRegisterEx.refNbr), WindowMode = PXRedirectHelper.WindowMode.NewWindow)]
public PXFilteredProcessingJoin<ARRegisterEx, ARWriteOffFilter,
InnerJoin<Customer,
On<Customer.bAccountID, Equal<ARRegisterEx.customerID>,
And<Customer.smallBalanceAllow, Equal<True>>>,
LeftJoin<ARAdjust,
On<ARAdjust.adjdDocType, Equal<ARRegisterEx.docType>,
And<ARAdjust.adjdRefNbr, Equal<ARRegisterEx.refNbr>,
And<ARAdjust.released, Equal<False>,
And<ARAdjust.voided, Equal<False>>>>>,
LeftJoin<ARAdjust2,
On<ARAdjust2.adjgDocType, Equal<ARRegisterEx.docType>,
And<ARAdjust2.adjgRefNbr, Equal<ARRegisterEx.refNbr>,
And<ARAdjust2.released, Equal<False>,
And<ARAdjust2.voided, Equal<False>>>>>>>>,
Where<
Where2< MatchWithBranch<ARRegisterEx.branchID>,
And2<Match<Current<AccessInfo.userName>>,
And<ARRegisterEx.released, Equal<True>,
And<ARRegisterEx.hold, NotEqual<True>,
And<ARRegisterEx.openDoc, Equal<True>,
And<ARRegisterEx.pendingPPD, NotEqual<True>,
And2<
Where< ARRegisterEx.docBal, Greater<decimal0>,
Or<ARRegisterEx.curyDocBal, Greater<decimal0>>>,
And<ARRegisterEx.docBal, LessEqual<Current<ARWriteOffFilter.wOLimit>>,
And2< Where< Current2<ARWriteOffFilter.branchID>, IsNull,
Or<ARRegisterEx.branchID, Equal<Current<ARWriteOffFilter.branchID>>>>,
And2< Where<Current<ARWriteOffFilter.woType>, Equal<ARDocType.smallBalanceWO>,
And2< Where< ARRegisterEx.docType, Equal<ARDocType.invoice>,
Or<ARRegisterEx.docType, Equal<ARDocType.debitMemo>,
Or<ARRegisterEx.docType, Equal<ARDocType.finCharge>>>>,
And< ARAdjust.adjgRefNbr, IsNull,
Or<Current<ARWriteOffFilter.woType>, Equal<ARDocType.smallCreditWO>,
And2< Where< ARRegisterEx.docType, Equal<ARDocType.payment>,
Or<ARRegisterEx.docType, Equal<ARDocType.creditMemo>,
Or<ARRegisterEx.docType, Equal<ARDocType.prepayment>>>>,
And<ARAdjust2.adjdRefNbr, IsNull>>>>>>,
And<Where< Current<ARWriteOffFilter.customerID>, IsNull,
Or<Current<ARWriteOffFilter.customerID>, Equal<ARRegisterEx.customerID>>>>>>>>>>>>>>>>
ARDocumentList;
protected virtual IEnumerable aRDocumentList()
{
ARWriteOffFilter aRWriteOffFilter = Base.Filter.Current;
ARWriteOffFilterExt aRWriteOffFilterExt = aRWriteOffFilter.GetExtension<ARWriteOffFilterExt>();
foreach (ARRegisterEx item in ARDocumentList.Select())
{
if (1==1)//removed my customer filter to removed cluter
{
yield return item;
}
else
{
yield return item;
}
}
}
#endregion
}
}