public async Task <IActionResult> GetPlanComptableComplet()
        {
            var noUser   = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier));
            var noClient = await _authRepo.NoClient(noUser);

            var item = await _repo.BilanEcran(noClient);

            var itemDto = _mapper.Map <List <DtoTGC001OutDC10CompteForList> >(item);

            return(Ok(itemDto));
        }
        public async Task <IActionResult> GetPlanComptableComplet()
        {
            var noUser   = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier));
            var noClient = await _authRepo.NoClient(noUser);

            var item = await _repo.ListeEnAttenteDeJournalisation(noClient, noUser);

            var itemDto = _mapper.Map <List <DtoTGC003OutDC30EcritureJournalForList> >(item);

            return(Ok(itemDto));
        }
        public async Task <IActionResult> PostJournaliser()//(DtoTGC002InpDC20JournalForCreate dto)
        {
            var dto = new DtoTGC002InpDC20JournalForCreate()
            {
                DateCompta = DateTime.Now
            };
            var noUser   = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier));
            var noClient = await _authRepo.NoClient(noUser);

            if (!await _repo.SwJournalisation(noClient, noUser))
            {
                return(BadRequest("Impossible de journaliser un journal vide"));
            }
            var items = await _repo.Journalisation(dto, noClient, noUser);

            var itemsDto = _mapper.Map <DtoTGC002OutDC20JournalForRead>(items);

            return(Ok(itemsDto));
        }