private bool IsCATransferOnTransitAccount(GLTran a) { return(a.Module == GL.BatchModule.CA && a.AccountID == _caSetup?.TransitAcctId && (a.SubID == _caSetup?.TransitSubID || !_isSubFeatureOn) && CAAPARTranType.IsTransfer(a.TranType)); }
public bool Equals(GLTran a, GLTran b) { var isEqual = a.SummPost == b.SummPost && a.Module == b.Module && a.BatchNbr == b.BatchNbr && a.RefNbr == b.RefNbr && a.CuryInfoID == b.CuryInfoID && a.BranchID == b.BranchID && a.AccountID == b.AccountID && a.SubID == b.SubID && a.ReclassificationProhibited == b.ReclassificationProhibited && (a.CATranID == b.CATranID || a.CATranID == null && b.CATranID == null) && (a.ProjectID == b.ProjectID || a.ProjectID == null && b.ProjectID == null) && (a.TaskID == b.TaskID || a.TaskID == null && b.TaskID == null); if (IsCATransferOnTransitAccount(a) && CAAPARTranType.IsTransfer(b.TranType) || a.Module == GL.BatchModule.IN) { return(isEqual); } return(isEqual && a.TranType == b.TranType); }