Package org.xrace.view.session

Examples of org.xrace.view.session.Cart


    compteNonAdmin = getCompteService().createCompte(personneCompteNoAdmin,
        "mccote", "123", false, "fr");

    //Ouf, la marche est haute entre les touristes de senior sport et les professionnels
    //experts ! Il va se contenter de faire du XC en tant que senior sport.
    final Cart cart = new Cart();

    final Tarification tarif1 = getTarificationService()
        .findByCourseCategorie(course1, categorieXss);
    final Tarification tarif2 = getTarificationService()
        .findByCourseCategorie(course2, categorieXss);

    ComposantInscription composantInscription1 = new ComposantInscription(
        personneCompteNoAdmin, tarif1);

    CartItemInscription cartItemInscription1 = new CartItemInscription(
        composantInscription1);

    ComposantInscription composantInscription2 = new ComposantInscription(
        personneCompteNoAdmin, tarif2);

    CartItemInscription cartItemInscription2 = new CartItemInscription(
        composantInscription2);

    cart.add(cartItemInscription1, getRabaisEvenementService());
    cart.add(cartItemInscription2, getRabaisEvenementService());

    /*cart.add(new CartItemInscription(tarif1, personneCompteNoAdmin,
        getInscriptionService()), getRabaisEvenementService());
    cart.add(new CartItemInscription(tarif2, personneCompteNoAdmin,
        getInscriptionService()), getRabaisEvenementService());*/
 
View Full Code Here


    assertEquals(1, vex.countErrors("Personne.error.fusion.meme.personne"));
  }

  public void testCanMergeCourseCommun() throws Exception
  {
    final Cart cart = new Cart();

    final Tarification tarif1 = getTarificationService()
        .findByCourseCategorie(course1, categorieXsx);

    ComposantInscription composantInscription1 = new ComposantInscription(
        personneCompteAdmin, tarif1);

    CartItemInscription cartItemInscription1 = new CartItemInscription(
        composantInscription1);

    cart.add(cartItemInscription1, getRabaisEvenementService());

    /*cart.add(new CartItemInscription(tarif1, personneCompteAdmin,
        getInscriptionService()), getRabaisEvenementService());*/

    final Facture fact = getFactureService().createFacture(
View Full Code Here

  protected void createComponents()
  {
    Form form = new Form("form");

    final XRaceSession session = getXRaceSession();
    final Cart cart = session.getCart();

    form.add(new CartConfirmationListView("cartConfirmationListView"));
    form.add(new CurrencyLabel("total", new PropertyModel(cart, "total")));
    form.add(new CurrencyLabel("sousTotal", new PropertyModel(cart,
        "sousTotal")));
    form.add(new CurrencyLabel("escompte", new PropertyModel(cart,
        "escompte")));
    form.add(new CheckBox("acceptedConditions", new PropertyModel(this,
        "acceptedConditions")));

    form.add(new TextArea("conditions", new Model(ResourceBundle.getBundle(
        "org/xrace/XRaceApplication").getString("Global.conditions"))));
    form.add((new Label("policyTitle", new ResourceModel(
        "Global.policyTitle"))));
    form.add((new MultiLineLabel("policy", new ResourceModel(
        "Global.policy"))));

    form.add(new Button("pay", new ResourceModel("pay"))
    {
      private static final long serialVersionUID = 3534043602619164257L;

      @Override
      public void onSubmit()
      {
        if (cart.getItems().size() < 1)
        {
          error(getLocalizer().getString("emptyCartError", this));
        }
        else if (!acceptedConditions)
        {
View Full Code Here

    final Course courseXC2 = getCourseService().getCourseParNom(evenement2,
        "Cross-Country");
    final Course courseDH2 = getCourseService().getCourseParNom(evenement2,
        "Downhill");

    final Cart cartJdoe1 = new Cart();
    final Cart cartJdoe2 = new Cart();

    final Tarification tarificationXseH1 = getTarificationService()
        .findByCourseCategorie(courseXC1, categorieXseH);
    final Tarification tarificationXseH2 = getTarificationService()
        .findByCourseCategorie(courseXC2, categorieXseH);
    final Tarification tarificationXsxH2 = getTarificationService()
        .findByCourseCategorie(courseXC2, categorieXsxH);
    final Tarification tarificationDssH2 = getTarificationService()
        .findByCourseCategorie(courseDH2, categorieDssH);

    ComposantInscription composantInscription1 = new ComposantInscription(
        personneJDoe, tarificationXseH1);
    CartItemInscription cartItemInscription1 = new CartItemInscription(
        composantInscription1);
    cartJdoe1.add(cartItemInscription1, getRabaisEvenementService());

    ComposantInscription composantInscription2 = new ComposantInscription(
        personneJDoe, tarificationXseH2);
    CartItemInscription cartItemInscription2 = new CartItemInscription(
        composantInscription2);
    cartJdoe1.add(cartItemInscription2, getRabaisEvenementService());

    ComposantInscription composantInscription3 = new ComposantInscription(
        personneOKnussen, tarificationXsxH2);
    CartItemInscription cartItemInscription3 = new CartItemInscription(
        composantInscription3);
    cartJdoe1.add(cartItemInscription3, getRabaisEvenementService());

    facture = getFactureService().createFacture(personneJDoe, cartJdoe1);
    completeTransactions(personneJDoe, facture);

    ComposantInscription composantInscription4 = new ComposantInscription(
        personneJDoe, tarificationDssH2);
    CartItemInscription cartItemInscription4 = new CartItemInscription(
        composantInscription4);
    cartJdoe2.add(cartItemInscription4, getRabaisEvenementService());

    facture = getFactureService().createFacture(personneJDoe, cartJdoe2);
    completeTransactions(personneJDoe, facture);
  }
View Full Code Here

    Choix choixBBQ = getChoixService().findChoixByEvenement(evenement4)
        .get(2);
    Choix choixNavetteLevis = getChoixService().findChoixByEvenement(
        evenement4).get(6);

    final Cart cartNCote1 = new Cart();

    ComposantInscription composantInscription1 = new ComposantInscription(
        personneNCote, tarificationXmxF1);

    CartItemInscription cartItemInscription1 = new CartItemInscription(
        composantInscription1);
    cartNCote1.add(cartItemInscription1, getRabaisEvenementService());

    ComposantInscription composantInscription2 = new ComposantInscription(
        personneNCote, tarificationDssF2);
    CartItemInscription cartItemInscription2 = new CartItemInscription(
        composantInscription2);

    cartNCote1.add(cartItemInscription2, getRabaisEvenementService());

    facture = getFactureService().createFacture(personneNCote, cartNCote1);
    completeTransactions(personneNCote, facture);

    final Cart cartNCote2 = new Cart();

    ComposantInscription composantInscription3 = new ComposantInscription(
        personneNCote, tarificationXmxF4);
    CartItemInscription cartItemInscription3 = new CartItemInscription(
        composantInscription3);
    cartNCote1.add(cartItemInscription3, getRabaisEvenementService());

    ComposantInscription composantInscription4 = new ComposantInscription(
        personneNCote, tarificationDssF4);
    CartItemInscription cartItemInscription4 = new CartItemInscription(
        composantInscription4);
    cartNCote1.add(cartItemInscription4, getRabaisEvenementService());

    cartNCote2.add(new CartItemArticle(personneNCote, new Article(
        choixAmeneAmi)), getRabaisEvenementService());
    cartNCote2.add(
        new CartItemArticle(personneNCote, new Article(choixBBQ)),
        getRabaisEvenementService());
    cartNCote2.add(new CartItemArticle(personneNCote, new Article(
        choixNavetteLevis)), getRabaisEvenementService());

    facture = getFactureService().createFacture(personneNCote, cartNCote2);
    completeTransactions(personneNCote, facture);
  }
View Full Code Here

TOP

Related Classes of org.xrace.view.session.Cart

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.