@Override
 public BonSortie saveOrUpdateBonSortie(BonSortie bonSortie) throws ServiceException {
   try {
     if (bonSortie.getId() == null) {
       return bonSortieDao.create(bonSortie);
     } else {
       return bonSortieDao.update(bonSortie);
     }
   } catch (DataAccessException ex) {
     Logger.getLogger(OrdreSortieServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
   }
   return null;
 }
 @Override
 public void deleteBon(Long id) throws ServiceException {
   try {
     BonSortie bs = bonSortieDao.findById(id);
     if (bs != null) {
       if (bs.getOrdeSortie().getEtatType() != EtatType.acheve) {
         bs.setActive(false);
         bonSortieDao.update(bs);
       }
     }
   } catch (DataAccessException ex) {
     Logger.getLogger(OrdreSortieServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
   }
 }