Package com.structis.fichesst.shared.dto

Examples of com.structis.fichesst.shared.dto.DeductionDto


    NumberField refacturations = createNumberField(messages.refacturations());
    refacturations.setName(DeductionDto.REFACTURATIONS);
    formPanel.add(refacturations, new FormData(ANCHOR_SPEC));
    add(formPanel);

    DeductionDto dataModel = new DeductionDto();
    dataModel.initData();
    bindModel(formPanel, dataModel);

    setDefaultBackgroundColor();
  }
View Full Code Here


        okButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
          @Override
          public void componentSelected(ButtonEvent ce) {
            if (addDataForm.isValid()) {
              DeductionDto model = addDataForm.getDataModel();
              deductionGrid.getStore().add(model);
              deductionGrid.getView().refresh(true);
              // bus.fireEvent(new
              // DeductionGridUpdateEvent(deductionGrid.getStore().getModels()));
              dialog.hide();
View Full Code Here

    TextField<String> sitravaux = (TextField<String>) ComponentManager.get().get("INFORMATION_PANEL_SITRAVAUX_ID");
    NumberField montant = (NumberField) ComponentManager.get().get("INFORMATION_PANEL_MONTANT_ID");
    List<NameValuePair> values = new ArrayList<NameValuePair>();

    List<DeductionDto> listDeduction = deductionGrid.getStore().getModels();
    DeductionDto deductionDto = null;
    String deductions = "";
    double amount = 0.0;
    String information = "";
    // Grid 1
    NumberFormat numberFormat = NumberFormat.getFormat(NUMBER_FORMAT);
    double canto = 0.0;
    double badge = 0.0;
    double grue = 0.0;
    double lift = 0.0;
    double benne = 0.0;
    double nettoyage = 0.0;
    double autres = 0.0; // khong co nhan
    double prorata = 0.0;
    double refacturations = 0.0;// khong co nhan
    for (int j = 0; j < listDeduction.size(); j++) {
      deductionDto = listDeduction.get(j);
      /*
       * deductions += DateTimeFormat.getFormat(Constants.DATE_FORMAT).format (deductionDto.getDate()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getCanto()) + Constants.SEPRATE + numberFormat.format(deductionDto.getBadge()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getGrue()) + Constants.SEPRATE + numberFormat.format(deductionDto.getLift()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getBenne()) + Constants.SEPRATE + numberFormat.format(deductionDto.getNettoyage()) + Constants.SEPRATE
       * + numberFormat.format(deductionDto.getAutres()) + Constants.SEPRATE + numberFormat.format(deductionDto.getProrata()) +
       * Constants.SEPRATE + numberFormat.format(deductionDto.getRefacturations()) + Constants.SEPRATE;
       */
      deductions += append(deductionDto.getDate(), deductionDto.getCanto(), deductionDto.getBadge(), deductionDto.getGrue(),
          deductionDto.getLift(), deductionDto.getBenne(), deductionDto.getNettoyage(), deductionDto.getAutres(),
          deductionDto.getProrata(), deductionDto.getRefacturations());

      canto += deductionDto.getCanto();
      badge += deductionDto.getBadge();
      grue += deductionDto.getGrue();
      lift += deductionDto.getLift();
      benne += deductionDto.getBenne();
      nettoyage += deductionDto.getNettoyage();
      autres += deductionDto.getAutres();
      prorata += deductionDto.getProrata();
      refacturations += deductionDto.getRefacturations();
    }
    canto = canto * ratioList[0];
    badge = badge * ratioList[1];
    grue = grue * ratioList[2];
    lift = lift * ratioList[3];
    benne = benne * ratioList[4];
    nettoyage = nettoyage * ratioList[5];
    prorata = prorata * ratioList[6];
    values.add(new NameValuePair(ConstantClient.DEDUCTIONDTO_ID_STR, deductions));
    String paramPrestation = append(ratioList[0], ratioList[1], ratioList[2], ratioList[3], ratioList[4], ratioList[5], ratioList[6]);
    values.add(new NameValuePair("paramPrestation", paramPrestation));
    canto += deductionDto.getCanto();
    badge += deductionDto.getBadge();
    grue += deductionDto.getGrue();
    lift += deductionDto.getLift();
    benne += deductionDto.getBenne();
    nettoyage += deductionDto.getNettoyage();
    autres += deductionDto.getAutres();
    prorata += deductionDto.getProrata();

    information += chantier + Constants.SEPRATE + responsables + Constants.SEPRATE + societe;
    values.add(new NameValuePair("information", information));

    String generaleInformation = chantier + Constants.SEPRATE + lot.getValue() + Constants.SEPRATE + sitravaux.getValue() + Constants.SEPRATE
View Full Code Here

 
  @SuppressWarnings("unchecked")
  private void addDeductionReport(List<DeductionDto> lisDeduction, List<NameValuePair> values) {
   
    List<DeductionDto> listDeduction = lisDeduction;
    DeductionDto deductionDto = null;
    String deductions = "";
    double amount = 0.0;
    // Grid 1
    DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat(Constants.DATE_FORMAT);
    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    for (int j = 0; j < listDeduction.size(); j++) {
      deductionDto = listDeduction.get(j);
      String deductionDate = deductionDto.getDate() != null ? dateTimeFormat.format(deductionDto.getDate()) : "";
      deductions += deductionDate + Constants.SEPRATE + numberFormat.format(deductionDto.getCanto()) + Constants.SEPRATE + numberFormat.format(deductionDto.getBadge()) + Constants.SEPRATE
          + numberFormat.format(deductionDto.getGrue()) + Constants.SEPRATE + numberFormat.format(deductionDto.getLift()) + Constants.SEPRATE + numberFormat.format(deductionDto.getBenne())
          + Constants.SEPRATE + numberFormat.format(deductionDto.getNettoyage()) + Constants.SEPRATE + numberFormat.format(deductionDto.getAutres()) + Constants.SEPRATE
          + numberFormat.format(deductionDto.getProrata()) + Constants.SEPRATE + numberFormat.format(deductionDto.getRefacturations()) + Constants.SEPRATE;
    }
    if (deductions != null && deductions.length() > 0)
      deductions = deductions.substring(0, deductions.length() - 1);
    values.add(new NameValuePair(ConstantClient.DEDUCTIONDTO_ID_STR, deductions.toString()));
   
View Full Code Here

    }
    return listCautionFournieSaved;
  }
 
  private List<DeductionDto> getDeductionSaved() {
    DeductionDto deductionDto = null;
    List<DeductionDto> listDeductionSaved = new ArrayList<DeductionDto>();
    for (int i = 0; i < centerPanel.getDeductionDtoList().size(); i++) {
      deductionDto = centerPanel.getDeductionDtoList().get(i);
      if (deductionDto.getDate() != null || deductionDto.getCanto() != 0 || deductionDto.getBadge() != 0 || deductionDto.getGrue() != 0 || deductionDto.getLift() != 0
          || deductionDto.getBenne() != 0 || deductionDto.getNettoyage() != 0 || deductionDto.getAutres() != 0 || deductionDto.getProrata() != 0 || deductionDto.getRefacturations() != 0) {
        listDeductionSaved.add(deductionDto);
      }
    }
    return listDeductionSaved;
  }
View Full Code Here

TOP

Related Classes of com.structis.fichesst.shared.dto.DeductionDto

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.