public Ledger GetLedgerByCode(string ledger_code, string company_code)
        {
            Log.Info("Accessing LedgerBusinessEngine GetLedgerByCode function");
            return(ExecuteFaultHandledOperation(() =>
            {
                ILedgerRepository ledger_repo = _data_repository_factory.GetDataRepository <ILedgerRepository>();
                LedgerData ledger_data = ledger_repo.GetByCode(ledger_code, company_code);
                Log.Info("LedgerBusinessEngine GetLedgerByCode function completed");

                if (ledger_data.LedgerKey != 0)
                {
                    Ledger ledger = MapLedgerDataToLedger(ledger_data);

                    return ledger;
                }
                else
                {
                    NotFoundException ex = new NotFoundException(string.Format("Ledger with code {0} is not in database", ledger_code));
                    throw new FaultException <NotFoundException>(ex, ex.Message);
                }
            }));
        }