Beispiel #1
0
 public CashBankMutation UnconfirmObject(CashBankMutation cashBankMutation, ICashMutationService _cashMutationService, ICashBankService _cashBankService)
 {
     if (_validator.ValidUnconfirmObject(cashBankMutation, _cashBankService))
     {
         CashBank             sourceCashBank = _cashBankService.GetObjectById(cashBankMutation.SourceCashBankId);
         CashBank             targetCashBank = _cashBankService.GetObjectById(cashBankMutation.TargetCashBankId);
         IList <CashMutation> cashMutations  = _cashMutationService.SoftDeleteCashMutationForCashBankMutation(cashBankMutation, sourceCashBank, targetCashBank);
         foreach (var cashMutation in cashMutations)
         {
             _cashMutationService.ReverseCashMutateObject(cashMutation, _cashBankService);
         }
         _repository.UnconfirmObject(cashBankMutation);
     }
     return(cashBankMutation);
 }
Beispiel #2
0
 public CashBankMutation UnconfirmObject(CashBankMutation cashBankMutation, ICashMutationService _cashMutationService, ICashBankService _cashBankService,
                                         IGeneralLedgerJournalService _generalLedgerJournalService, IAccountService _accountService, IClosingService _closingService)
 {
     if (_validator.ValidUnconfirmObject(cashBankMutation, _cashBankService, _closingService))
     {
         CashBank             sourceCashBank = _cashBankService.GetObjectById(cashBankMutation.SourceCashBankId);
         CashBank             targetCashBank = _cashBankService.GetObjectById(cashBankMutation.TargetCashBankId);
         IList <CashMutation> cashMutations  = _cashMutationService.SoftDeleteCashMutationForCashBankMutation(cashBankMutation, sourceCashBank, targetCashBank);
         foreach (var cashMutation in cashMutations)
         {
             _cashMutationService.ReverseCashMutateObject(cashMutation, _cashBankService);
         }
         _generalLedgerJournalService.CreateUnconfirmationJournalForCashBankMutation(cashBankMutation, sourceCashBank, targetCashBank, _accountService);
         _repository.UnconfirmObject(cashBankMutation);
     }
     return(cashBankMutation);
 }