Example #1
0
        /// <summary>
        /// Create an unidentifed record
        /// </summary>
        /// <param name="ledgerType"></param>
        /// <param name="unidentified"></param>
        /// <returns></returns>
        private int CreateUnidentified(string ledgerType, IUnidentifiedMoney unidentified)
        {
            // ReSharper disable RedundantAssignment
            int result = 0;
            // ReSharper restore RedundantAssignment
            UnidentifiedDTO unidentifiedDTO = new UnidentifiedDTO(unidentified.ContractKey
                , unidentified.Reference, unidentified.Amount, unidentified.IsOpenCredit, _batchHeaderDTO.UserAdded);

            result = _dataAccess.CreateUnidentified(ledgerType
              , unidentifiedDTO);

            return result;
        }
Example #2
0
        /// <summary>
        /// Create the Batch Detail for an unidentifed claim or a claim not ready for fee payment
        /// </summary>
        /// <param name="ledgerType"></param>
        /// <param name="money"></param>
        /// <returns></returns>
        private int CreateBatchDetail(string ledgerType, IUnidentifiedMoney money)
        {
            TransactionCode transactionCode = money.IsOpenCredit ? TransactionCode.OC : TransactionCode.UND;

            BatchDetailDTO batchDetailDTO = new BatchDetailDTO(
                _batchHeaderDTO.Key
                , 0, 0, money.Key
                , TransactionType.P.ToString(), TransactionCategory.PYMT.ToString()
                , transactionCode.ToString(), DateTime.Now
                , money.Amount, _batchHeaderDTO.PayerCheckAmount
                , _batchHeaderDTO.PayerCheckDate, _batchHeaderDTO.PayerCheckNumber
                , _batchHeaderDTO.UserAdded
                );

            int result = _dataAccess.CreateBatchDetail(
                TransactionChoice.WithTransaction
                , ledgerType
                , batchDetailDTO);

            return result;
        }