public virtual IEnumerable release(PXAdapter adapter) { CASetup setup = casetup.Current; CAEnqFilter filter = Filter.Current; List <CATran> tranList = new List <CATran>(); foreach (CATran transToRelease in PXSelect <CATran, Where2 <Where <Required <CAEnqFilter.includeUnreleased>, Equal <boolTrue>, Or <CATran.released, Equal <boolTrue> > >, And <CATran.cashAccountID, Equal <Required <CAEnqFilter.accountID> >, And <CATran.tranDate, Between <Required <CAEnqFilter.startDate>, Required <CAEnqFilter.endDate> > > > >, OrderBy <Asc <CATran.tranDate, Asc <CATran.extRefNbr, Asc <CATran.tranID> > > > > .Select(this, filter.IncludeUnreleased, filter.AccountID, filter.StartDate, filter.EndDate)) { if (transToRelease.Selected == true) { tranList.Add(transToRelease); } } Save.Press(); if (tranList.Count == 0) { throw new PXException(Messages.NoDocumentSelected); } else { PXLongOperation.StartOperation(this, delegate() { CATrxRelease.GroupReleaseTransaction(tranList, setup.ReleaseAP == true, setup.ReleaseAR == true, true); }); } return(adapter.Get()); }
protected virtual void CASetup_RowUpdating(PXCache sender, PXRowUpdatingEventArgs e) { CASetup row = (CASetup)e.NewRow; if (e.NewRow == null || row == null || row.TransitAcctId == null) { return; } CashAccount cashAccount = PXSelect <CashAccount, Where <CashAccount.accountID, Equal <Required <CASetup.transitAcctId> > > > .Select( this, row.TransitAcctId); if (cashAccount == null) { return; } if (cashAccount.SubID != (int)row.TransitSubID) { Sub subAccount = PXSelect <Sub, Where <Sub.subID, Equal <Required <CASetup.transitSubID> > > > .Select( this, row.TransitSubID); sender.RaiseExceptionHandling <CASetup.transitSubID>(row, subAccount.SubCD, new PXSetPropertyException(Messages.WrongSubIdForCashAccount)); } }
protected virtual void CASetup_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { CASetup row = (CASetup)e.Row; PXUIFieldAttribute.SetVisible <CASetup.curyRateTypeID>(sender, null, PXAccess.FeatureInstalled <FeaturesSet.multicurrency>()); PXUIFieldAttribute.SetEnabled <CASetup.holdEntry>(sender, null, row == null || row.RequestApproval != true); }
protected virtual void CASetup_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { CASetup row = (CASetup)e.Row; PXUIFieldAttribute.SetVisible <CASetup.curyRateTypeID>(sender, null, (bool)CMSetup.Current.MCActivated); PXUIFieldAttribute.SetEnabled <CASetup.holdEntry>(sender, null, row == null || row.RequestApproval != true); }
public CATranEnq() { PXUIFieldAttribute.SetVisible <CATranExt.reconNbr>(CATranListRecords.Cache, null, false); CASetup setup = casetup.Current; Views["_AddTrxFilter.curyInfoID_CurrencyInfo.CuryInfoID_"] = new PXView(this, false, new Select <AddTrxFilter>(), new PXSelectDelegate(AddFilter.Get)); }
protected virtual void CASetup_RequestApproval_FieldUpdated(PXCache sedner, PXFieldUpdatedEventArgs e) { CASetup row = (CASetup)e.Row; if (row != null && row.RequestApproval == true) { row.HoldEntry = true; } }
public CashTransferEntry() { CASetup setup = CASetup.Current; Views["_AddTrxFilter.curyInfoID_CurrencyInfo.CuryInfoID_"] = new PXView(this, false, new Select <AddTrxFilter>(), new PXSelectDelegate(AddFilter.Get)); this.FieldSelecting.AddHandler <CATransfer.tranIDOut_CATran_batchNbr>(CATransfer_TranIDOut_CATran_BatchNbr_FieldSelecting); this.FieldSelecting.AddHandler <CATransfer.tranIDIn_CATran_batchNbr>(CATransfer_TranIDIn_CATran_BatchNbr_FieldSelecting); }
public CABatchEntry() { CASetup setup = casetup.Current; RowUpdated.AddHandler <CABatch>(ParentFieldUpdated); this.APPaymentApplications.Cache.AllowInsert = false; this.APPaymentApplications.Cache.AllowUpdate = false; this.APPaymentApplications.Cache.AllowDelete = false; }
public virtual void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { CASetup caSetup = PXSelect <CASetup> .Select(sender.Graph); decimal?result = 0m; object cashAccountID = sender.GetValue(e.Row, _CashAccount); CADailySummary caBalance = PXSelectGroupBy <CADailySummary, Where <CADailySummary.cashAccountID, Equal <Required <CADailySummary.cashAccountID> > >, Aggregate <Sum <CADailySummary.amtReleasedClearedCr, Sum <CADailySummary.amtReleasedClearedDr, Sum <CADailySummary.amtReleasedUnclearedCr, Sum <CADailySummary.amtReleasedUnclearedDr, Sum <CADailySummary.amtUnreleasedClearedCr, Sum <CADailySummary.amtUnreleasedClearedDr, Sum <CADailySummary.amtUnreleasedUnclearedCr, Sum <CADailySummary.amtUnreleasedUnclearedDr> > > > > > > > > > . Select(sender.Graph, cashAccountID); if ((caBalance != null) && (caBalance.CashAccountID != null)) { result = caBalance.AmtReleasedClearedDr - caBalance.AmtReleasedClearedCr; if ((bool)caSetup.CalcBalDebitClearedUnreleased) { result += caBalance.AmtUnreleasedClearedDr; } if ((bool)caSetup.CalcBalCreditClearedUnreleased) { result -= caBalance.AmtUnreleasedClearedCr; } if ((bool)caSetup.CalcBalDebitUnclearedReleased) { result += caBalance.AmtReleasedUnclearedDr; } if ((bool)caSetup.CalcBalCreditUnclearedReleased) { result -= caBalance.AmtReleasedUnclearedCr; } if ((bool)caSetup.CalcBalDebitUnclearedUnreleased) { result += caBalance.AmtUnreleasedUnclearedDr; } if ((bool)caSetup.CalcBalCreditUnclearedUnreleased) { result -= caBalance.AmtUnreleasedUnclearedCr; } } e.ReturnValue = result; e.Cancel = true; }
public CABalValidate() { CASetup setup = CASetup.Current; CABalValidateList.SetProcessDelegate <CATranEntryLight>(Validate); CABalValidateList.SetProcessCaption(Messages.Validate); CABalValidateList.SetProcessAllCaption(Messages.ValidateAll); PXUIFieldAttribute.SetEnabled <CashAccount.selected>(CABalValidateList.Cache, null, true); PXUIFieldAttribute.SetEnabled <CashAccount.cashAccountCD>(CABalValidateList.Cache, null, false); PXUIFieldAttribute.SetEnabled <CashAccount.descr>(CABalValidateList.Cache, null, false); }
public CABalValidate() { CASetup setup = CASetup.Current; CABalanceValidationPeriodFilter filter = PeriodsFilter.Current; CABalValidateList.SetProcessDelegate <CATranEntryLight>((CATranEntryLight graph, CashAccount cashAccount) => Validate(graph, cashAccount, filter)); CABalValidateList.SetProcessCaption(Messages.Validate); CABalValidateList.SetProcessAllCaption(Messages.ValidateAll); PXUIFieldAttribute.SetEnabled <CashAccount.selected>(CABalValidateList.Cache, null, true); PXUIFieldAttribute.SetEnabled <CashAccount.cashAccountCD>(CABalValidateList.Cache, null, false); PXUIFieldAttribute.SetEnabled <CashAccount.descr>(CABalValidateList.Cache, null, false); }
protected override IEnumerable periodList() { string fiscalYear = null; CASetup.Current = CASetup.Select(); if (CASetup.Current == null) { yield break; } foreach (FinPeriod per in PXSelect <FinPeriod, Where <FinPeriod.cAClosed, Equal <boolFalse> > > .Select(this)) { if (fiscalYear == null) { fiscalYear = per.FinYear; } if (per.FinYear == fiscalYear) { yield return(per); } } }
public CashForecastEntry() { CASetup setup = casetup.Current; }
public PXSelect <GL.Account> account; //Required for the correct order of Cache creation - otherwise CashAccount (derived) is used instead of Account. public EntryTypeMaint() { CASetup setup = CASetup.Current; }
protected virtual void CASetup_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { CASetup row = (CASetup)e.Row; PXUIFieldAttribute.SetEnabled <CASetup.holdEntry>(sender, null, row == null || row.RequestApproval != true); }
public CATranEnq() { PXUIFieldAttribute.SetVisible <CATranExt.reconNbr>(CATranListRecords.Cache, null, false); CASetup setup = casetup.Current; }