Example #1
0
        public virtual void CheckRelatedGLHistoryDoesNotExist(int?[] branchIDs)
        {
            if (branchIDs == null || branchIDs.IsEmpty())
            {
                return;
            }

            GLHistory history = GLUtility.GetRelatedToBranchGLHistory(Graph, branchIDs);

            if (history != null)
            {
                Branch branch = BranchMaint.FindBranchByID(Graph, history.BranchID);

                if (branch != null)
                {
                    throw new PXException(Messages.BranchCanNotBeDeletedBecausePostedGLTransExist,
                                          branch.BranchCD.Trim());
                }
            }
        }