Пример #1
0
 private bool IsCATransferOnTransitAccount(GLTran a)
 {
     return(a.Module == GL.BatchModule.CA &&
            a.AccountID == _caSetup?.TransitAcctId &&
            (a.SubID == _caSetup?.TransitSubID || !_isSubFeatureOn) &&
            CATranType.IsTransfer(a.TranType));
 }
Пример #2
0
            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) &&
                    (a.CostCodeID == b.CostCodeID || a.CostCodeID == null && b.CostCodeID == null);

                if (IsCATransferOnTransitAccount(a) && CATranType.IsTransfer(b.TranType) ||
                    a.Module == GL.BatchModule.IN)
                {
                    return(isEqual);
                }

                return(isEqual && a.TranType == b.TranType);
            }