public virtual IEnumerable viewOrganization(PXAdapter adapter) { OrganizationLedgerLink link = OrganizationLedgerLinkSelect.Current; if (link != null) { OrganizationMaint.RedirectTo(link.OrganizationID); } return(adapter.Get()); }
protected virtual PXSetPropertyException CanBeLinkDeleted(OrganizationLedgerLink link) { Ledger ledger = GeneralLedgerMaint.FindLedgerByID(Base, link.LedgerID); if (ledger.BalanceType == LedgerBalanceType.Actual) { if (GLUtility.RelatedGLHistoryExists(Base, link.LedgerID, link.OrganizationID)) { Organization org = OrganizationMaint.FindOrganizationByID(Base, link.OrganizationID, true); return(new PXSetPropertyException(Messages.TheRelationBetweenTheLedgerAndTheCompanyCannotBeRemovedBecauseAtLeastOneGeneralLedgerTransactionHasBeenPosted, PXErrorLevel.RowError, LinkCache.GetValueExt <OrganizationLedgerLink.ledgerID>(link), org.OrganizationCD.Trim() )); } } return(null); }