Package org.xrace.model.facturation

Examples of org.xrace.model.facturation.Facture


      // --------- Informations sur l'article -------
      final Article article = dossier.getArticle();
      final Choix choix = article.getChoix();

      // --------- Information sur la facture et la transaction -------
      final Facture facture = dossier.getFacture();
      final FactureItem factureItem = dossier.getFactureItem();
      final Transaction transaction = dossier.getTransaction();

      // --------- Personne qui a effectué la transaction -------
      final Personne personneTransaction = dossier
          .getPersonneTransaction();

      row.createCell((short) 3).setCellValue(
          new HSSFRichTextString(choix.getDescription()));
      row.createCell((short) 4).setCellValue(
          new HSSFRichTextString(article.getTextFieldValue()));
      if (factureItem != null)
      {
        HSSFUtils.createCurrencyCell(wb, row, 5, factureItem.getPrix());
        prixTotalChoix += factureItem.getPrix();
      }
      row.createCell((short) 6).setCellValue(article.getQuantite());
      qteTotalChoix += article.getQuantite();

      if (personneTransaction != null)
      {
        row.createCell((short) 7).setCellValue(
            new HSSFRichTextString(personneTransaction
                .getNomPrenom()));
      }

      if (facture != null)
      {
        row.createCell((short) 8).setCellValue(facture.getId());
      }

      if (transaction != null)
      {
        row.createCell((short) 9).setCellValue(
View Full Code Here


    completeTransactions(personneJDoe, facture);
  }

  private void createTestFacturesNCote()
  {
    Facture facture;

    final Personne personneNCote = getPersonneService()
        .findByNomPrenomExact("Côté", "Nathalie").get(0);

    final Discipline disciplineXC = getDisciplineService().findByNom("XC");
View Full Code Here

    {
      throw new BaseValidationException("Impossible de créer la facture "
          + "car le panier d'achat est vide");
    }

    final Facture facture = new Facture();
    facture.setPersonne(personne);
    facture.setPaye(false);
    facture.setCreation(new Date());
    facture.setSoustotal(cart.getSousTotal());
    facture.setEscompte(cart.getEscompte());
    facture.setTotal(cart.getTotal());

    save(facture);

    for (final CartItem item : cart.getItems())
    {
      if (item instanceof CartItemInscription)
      {
        final CartItemInscription cartItemInscription = (CartItemInscription) item;

        cartItemInscription.getInscription().setPrix(
            cartItemInscription.getPrix());
        inscriptionService.save(cartItemInscription.getInscription());

        facture.getFactureItems().add(
            factureItemService.createFactureItem(facture,
                cartItemInscription.getInscription(),
                cartItemInscription.getPrix()));

      }
      else
      {
        final CartItemArticle cartItemArticle = (CartItemArticle) item;

        final Article article = cartItemArticle.getArticle();
        article.setPrix(item.getPrixUnitaire());
        article.setQuantite(item.getQuantite());
        articleService.save(article);

        facture.getFactureItems().add(
            factureItemService.createFactureItem(facture, article,
                cartItemArticle.getPrix()));
      }
    }
View Full Code Here

TOP

Related Classes of org.xrace.model.facturation.Facture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.