Beispiel #1
0
        protected virtual void ARRetainageFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            ARRetainageFilter filter = e.Row as ARRetainageFilter;

            if (filter == null)
            {
                return;
            }

            bool isAutoRelease = ARSetup.Current.RetainageInvoicesAutoRelease == true;

            DocumentList.SetProcessDelegate(delegate(List <ARInvoiceExt> list)
            {
                ARInvoiceEntry graph = CreateInstance <ARInvoiceEntry>();
                ARInvoiceEntryRetainage retainageExt = graph.GetExtension <ARInvoiceEntryRetainage>();

                RetainageOptions retainageOptions  = new RetainageOptions();
                retainageOptions.DocDate           = filter.DocDate;
                retainageOptions.MasterFinPeriodID = FinPeriodIDAttribute.CalcMasterPeriodID <ARRetainageFilter.finPeriodID>(graph.Caches[typeof(ARRetainageFilter)], filter);

                retainageExt.ReleaseRetainageProc(list, retainageOptions, isAutoRelease);
            });
        }