public DepreciationTableMethodMaint() { FASetup setup = FASetup.Current; details.Cache.AllowInsert = false; details.Cache.AllowDelete = false; }
public AssetClassMaint() { PXCache cache = AssetClass.Cache; FASetup setup = FASetup.Current; PXUIFieldAttribute.SetRequired<FixedAsset.usefulLife>(cache, true); }
public override void IsValidPeriod(PXCache sender, object Row, object NewValue) { if (NewValue != null && _ValidatePeriod != PeriodValidation.Nothing) { FinPeriod period = (FinPeriod)PXSelect<FinPeriod, Where<FinPeriod.finPeriodID, Equal<Required<FinPeriod.finPeriodID>>>>.Select(sender.Graph, (string)NewValue); if (period == null) { throw new PXSetPropertyException(Messages.NoPeriodsDefined); } FASetup setup = PXSetupOptional<FASetup>.Select(sender.Graph); if (setup == null || setup.UpdateGL == true) { if (period.Active != true) { sender.RaiseExceptionHandling(_FieldName, Row, null, new FiscalPeriodInactiveException(period.FinPeriodID, PXErrorLevel.Warning)); return; } if (period.FAClosed == true) { if (PostClosedPeriods(sender.Graph)) { sender.RaiseExceptionHandling(_FieldName, Row, null, new FiscalPeriodClosedException(period.FinPeriodID, PXErrorLevel.Warning)); return; } else { throw new FiscalPeriodClosedException(period.FinPeriodID); } } } } }
protected override void ValidateFinPeriodsStatus(PXCache sender, object row, string finPeriodID, ICalendarOrganizationIDProvider calendarOrganizationIDProvider) { FASetup setup = PXSetupOptional <FASetup> .Select(sender.Graph); if (setup == null || setup.UpdateGL == true) { base.ValidateFinPeriodsStatus(sender, row, finPeriodID, calendarOrganizationIDProvider); } }
protected virtual void FASetup_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { FASetup setup = (FASetup)e.Row; if (setup == null) { return; } PXUIFieldAttribute.SetEnabled <FASetup.summPostDepreciation>(FASetupRecord.Cache, setup, setup.SummPost != true); }
public TransferProcess() { FASetup setup = fasetup.Current; if (fasetup.Current.UpdateGL != true) { throw new PXSetupNotEnteredException <FASetup>(Messages.OperationNotWorkInInitMode, PXUIFieldAttribute.GetDisplayName <FASetup.updateGL>(fasetup.Cache)); } PXUIFieldAttribute.SetDisplayName <Account.accountClassID>(Caches[typeof(Account)], Messages.FixedAssetsAccountClass); if (fasetup.Current.AutoReleaseTransfer != true) { Assets.SetProcessCaption(Messages.Prepare); Assets.SetProcessAllCaption(Messages.PrepareAll); } }
public DisposalProcess() { fasetup.Current = null; FASetup setup = fasetup.Current; if (fasetup.Current.UpdateGL != true) { throw new PXSetupNotEnteredException <FASetup>(Messages.OperationNotWorkInInitMode, PXUIFieldAttribute.GetDisplayName <FASetup.updateGL>(fasetup.Cache)); } PXUIFieldAttribute.SetDisplayName <FADetails.receiptDate>(Caches[typeof(FADetails)], Messages.AcquiredDate); PXUIFieldAttribute.SetDisplayName <Account.accountClassID>(Caches[typeof(Account)], Messages.FixedAssetsAccountClass); if (fasetup.Current.AutoReleaseDisp != true) { Assets.SetProcessCaption(Messages.Prepare); Assets.SetProcessAllCaption(Messages.PrepareAll); } }
protected override IEnumerable periodList() { string fiscalYear = null; FASetup.Current = FASetup.Select(); if (FASetup.Current == null) { yield break; } foreach (FinPeriod per in PXSelect <FinPeriod, Where <FinPeriod.fAClosed, Equal <False> > > .Select(this)) { if (fiscalYear == null) { fiscalYear = per.FinYear; } if (per.FinYear == fiscalYear) { yield return(per); } } }
public TransactionEntry() { FASetup setup = fasetup.Current; _created = new DocumentList <FARegister>(this); }
public BookMaint() { FASetup setup = FASetup.Current; GLSetup setupGL = GLSetup.Current; }
public DisposalMethodMaint() { FASetup setup = fasetup.Current; }
public UsageScheduleMaint() { FASetup setup = FASetup.Current; }
public ServiceScheduleMaint() { FASetup setup = FASetup.Current; }