public bool CanPostToClosedPeriod() { GLSetup setup = PXSelect <GLSetup> .Select(Graph); return(setup.RestrictAccessToClosedPeriods != true || !string.IsNullOrEmpty(PredefinedRoles.FinancialSupervisor) && System.Web.Security.Roles.IsUserInRole(PXAccess.GetUserName(), PredefinedRoles.FinancialSupervisor)); }
public APSetupMaint() { GLSetup setup = GLSetup.Current; Boxes1099.Cache.AllowDelete = false; Boxes1099.Cache.AllowInsert = false; Boxes1099.Cache.AllowUpdate = true; }
public override void Initialize() { base.Initialize(); GLSetup glSetup = GLSetup.Current; AddMenuActions(); }
public APScheduleMaint() { APSetup aps = APSetup.Current; GLSetup gls = GLSetup.Current; Document_History.Cache.AllowDelete = false; Document_History.Cache.AllowInsert = false; Document_History.Cache.AllowUpdate = false; CopyPaste.SetVisible(false); }
public APSetupMaint() { GLSetup setup = GLSetup.Current; Boxes1099.Cache.AllowDelete = false; Boxes1099.Cache.AllowInsert = false; Boxes1099.Cache.AllowUpdate = true; PXUIFieldAttribute.SetVisible <APSetup.applyQuantityDiscountBy>(Setup.Cache, null, PXAccess.FeatureInstalled <FeaturesSet.vendorDiscounts>() && PXAccess.FeatureInstalled <FeaturesSet.multipleUnitMeasure>()); }
public ImportSubaccountMapper(IReadOnlyCollection <Segment> segments, GLSetup glSetup, GLConsolSetup glConsolSetup, Func <string, int?> findSubIDByCD, IAppLogger logger) { GLSetup = glSetup; GLConsolSetup = glConsolSetup; _findSubIdbyCD = findSubIDByCD; Logger = logger; CalcSegmentStartIndex(segments); _subaccountCDKeyLength = segments.Sum(segment => segment.Length.Value); }
public async Task <IActionResult> GetNominalControl([FromBody] GLSetup data) { try { await _actionService.SaveSetupCmd(data); return(Ok()); } catch (Exception ex) { _logger.LogError(ex.Message, ex); return(BadRequest(ex.Message)); } }
public APScheduleMaint() { APSetup apSetup = APSetup.Current; GLSetup glSetup = GLSetup.Current; Document_History.Cache.AllowDelete = false; Document_History.Cache.AllowInsert = false; Document_History.Cache.AllowUpdate = false; Schedule_Header.Join <LeftJoin < APRegisterAccess, On <APRegisterAccess.scheduleID, Equal <Schedule.scheduleID>, And <APRegisterAccess.scheduled, Equal <True>, And <Not <Match <APRegisterAccess, Current <AccessInfo.userName> > > > > > > >(); Schedule_Header.WhereAnd <Where < Schedule.module, Equal <BatchModule.moduleAP>, And <APRegisterAccess.docType, IsNull> > >(); }
public virtual void VerifyAndSetFirstOpenedFinPeriod <TFinPeriodField, TBranchField>(PXCache rowCache, object row, PXSelectBase <OrganizationFinPeriod> finPeriodView, Type fieldModuleClosed = null) where TFinPeriodField : class, IBqlField where TBranchField : class, IBqlField { OrganizationFinPeriod finPeriod = finPeriodView.Current as OrganizationFinPeriod; if (finPeriod != null) { GLSetup glsetup = PXSetup <GLSetup> .Select(Graph); bool isClosed = finPeriod.Status == FinPeriods.TableDefinition.FinPeriod.status.Closed; if (fieldModuleClosed != null) { isClosed |= (bool?)finPeriodView.Cache.GetValue(finPeriod, fieldModuleClosed.Name) == true; } if (finPeriod.Status == FinPeriod.status.Inactive || finPeriod.Status == FinPeriod.status.Locked || isClosed && glsetup != null && glsetup.RestrictAccessToClosedPeriods == true) { string finPeriodID = (string)rowCache.GetValue <TFinPeriodField>(row); int? organizationID = PXAccess.GetParentOrganizationID((int?)rowCache.GetValue <TBranchField>(row)); OrganizationFinPeriod firstopen = rowCache.Graph.GetService <IFinPeriodRepository>().FindFirstOpenFinPeriod(finPeriodID, organizationID, fieldModuleClosed); if (firstopen == null) { string userPeriod = Mask.Format("##-####", finPeriodView.Cache.GetValueExt <OrganizationFinPeriod.finPeriodID>(finPeriodView.Current).ToString()); throw new PXSetPropertyException(GL.Messages.NoActivePeriodAfter, userPeriod); } rowCache.SetValue <TFinPeriodField>(row, firstopen.FinPeriodID); } } }
public PaymentMethodMaint() { GLSetup setup = GLSetup.Current; }
public BookMaint() { FASetup setup = FASetup.Current; GLSetup setupGL = GLSetup.Current; }
public ARFinChargesMaint() { GLSetup setup = GLSetup.Current; }
public CASetupMaint() { GLSetup setup = GLSetup.Current; }
public virtual void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { GLSetup gLSetup = PXSelect <GLSetup> .Select(sender.Graph); decimal?result = 0m; object cashAccountID = sender.GetValue(e.Row, _CashAccount); object finPeriodID = null; if (string.IsNullOrEmpty(_FinPeriodID)) { object finDate = sender.GetValue(e.Row, _FinDate); var finPeriod = ""; if (finPeriod != null) { CashAccount cashaccount = PXSelect <CashAccount, Where <CashAccount.cashAccountID, Equal <Required <CashAccount.cashAccountID> > > > .Select(sender.Graph, cashAccountID); if (cashaccount != null) { finPeriodID = sender.Graph.GetService <IFinPeriodRepository>().FindFinPeriodByDate((DateTime?)sender.GetValue(e.Row, _FinDate), PXAccess.GetParentOrganizationID(cashaccount.BranchID))?.FinPeriodID; } } } else { finPeriodID = sender.GetValue(e.Row, _FinPeriodID); } if (cashAccountID != null && finPeriodID != null) { // clear glhistory cache for ReleasePayments longrun sender.Graph.Caches <GLHistory>().ClearQueryCacheObsolete(); sender.Graph.Caches <GLHistory>().Clear(); GLHistory gLHistory = PXSelectJoin <GLHistory, InnerJoin <GLHistoryByPeriod, On <GLHistoryByPeriod.accountID, Equal <GLHistory.accountID>, And <GLHistoryByPeriod.branchID, Equal <GLHistory.branchID>, And <GLHistoryByPeriod.ledgerID, Equal <GLHistory.ledgerID>, And <GLHistoryByPeriod.subID, Equal <GLHistory.subID>, And <GLHistoryByPeriod.lastActivityPeriod, Equal <GLHistory.finPeriodID> > > > > >, InnerJoin <Branch, On <Branch.branchID, Equal <GLHistory.branchID>, And <Branch.ledgerID, Equal <GLHistory.ledgerID> > >, InnerJoin <CashAccount, On <GLHistoryByPeriod.branchID, Equal <CashAccount.branchID>, And <GLHistoryByPeriod.accountID, Equal <CashAccount.accountID>, And <GLHistoryByPeriod.subID, Equal <CashAccount.subID> > > >, InnerJoin <Account, On <GLHistoryByPeriod.accountID, Equal <Account.accountID>, And <Match <Account, Current <AccessInfo.userName> > > >, InnerJoin <Sub, On <GLHistoryByPeriod.subID, Equal <Sub.subID>, And <Match <Sub, Current <AccessInfo.userName> > > > > > > > >, Where <CashAccount.cashAccountID, Equal <Required <CashAccount.cashAccountID> >, And <GLHistoryByPeriod.finPeriodID, Equal <Required <GLHistoryByPeriod.finPeriodID> > > > > .Select(sender.Graph, cashAccountID, finPeriodID); if (gLHistory != null) { result = gLHistory.CuryFinYtdBalance; } } e.ReturnValue = result; e.Cancel = true; }
public VendorClassMaint() { GLSetup setup = GLSetup.Current; }
public WZScheduleMaint() { GLSetup gls = GLSetup.Current; }
public VendorClassMaint() { GLSetup setup = GLSetup.Current; PXUIFieldAttribute.SetVisible <VendorClass.localeName>(VendorClassRecord.Cache, null, PXDBLocalizableStringAttribute.HasMultipleLocales); }
public virtual void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { GLSetup gLSetup = PXSelect <GLSetup> .Select(sender.Graph); decimal?result = 0m; object cashAccountID = sender.GetValue(e.Row, _CashAccount); object finPeriodID = null; if (string.IsNullOrEmpty(_FinPeriodID)) { object finDate = sender.GetValue(e.Row, _FinDate); FinPeriod finPeriod = PXSelect <FinPeriod, Where <FinPeriod.startDate, LessEqual <Required <FinPeriod.startDate> >, And <FinPeriod.endDate, Greater <Required <FinPeriod.endDate> > > > > .Select(sender.Graph, finDate, finDate); if (finPeriod != null) { finPeriodID = finPeriod.FinPeriodID; } } else { finPeriodID = sender.GetValue(e.Row, _FinPeriodID); } if (cashAccountID != null && finPeriodID != null) { // clear glhistory cache for ReleasePayments longrun sender.Graph.Caches <GLHistory>().ClearQueryCache(); sender.Graph.Caches <GLHistory>().Clear(); GLHistory gLHistory = PXSelectJoin <GLHistory, InnerJoin <GLHistoryByPeriod, On <GLHistoryByPeriod.accountID, Equal <GLHistory.accountID>, And <GLHistoryByPeriod.branchID, Equal <GLHistory.branchID>, And <GLHistoryByPeriod.ledgerID, Equal <GLHistory.ledgerID>, And <GLHistoryByPeriod.subID, Equal <GLHistory.subID>, And <GLHistoryByPeriod.lastActivityPeriod, Equal <GLHistory.finPeriodID> > > > > >, InnerJoin <Branch, On <Branch.branchID, Equal <GLHistory.branchID>, And <Branch.ledgerID, Equal <GLHistory.ledgerID> > >, InnerJoin <CashAccount, On <GLHistoryByPeriod.branchID, Equal <CashAccount.branchID>, And <GLHistoryByPeriod.accountID, Equal <CashAccount.accountID>, And <GLHistoryByPeriod.subID, Equal <CashAccount.subID> > > >, InnerJoin <Account, On <GLHistoryByPeriod.accountID, Equal <Account.accountID>, And <Match <Account, Current <AccessInfo.userName> > > >, InnerJoin <Sub, On <GLHistoryByPeriod.subID, Equal <Sub.subID>, And <Match <Sub, Current <AccessInfo.userName> > > > > > > > >, Where <CashAccount.cashAccountID, Equal <Required <CashAccount.cashAccountID> >, And <GLHistoryByPeriod.finPeriodID, Equal <Required <GLHistoryByPeriod.finPeriodID> > > > > .Select(sender.Graph, cashAccountID, finPeriodID); if (gLHistory != null) { result = gLHistory.CuryFinYtdBalance; } } e.ReturnValue = result; e.Cancel = true; }
private bool AllowChangeCurrency() { GLSetup setup = PXSelect <GLSetup> .Select(this); return(setup == null); }