Examples of DetailPurchaseDocVO


Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

    purchaseDiscChargesPanel1.getControlDiscValue().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));
  }


  public void loadDataCompleted(boolean error,PurchaseDocPK pk) {
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();

    this.setTitle(ClientSettings.getInstance().getResources().getResource("purchase invoice")+(vo.getDocSequenceDOC06()!=null?" - "+vo.getDocYearDOC06()+"/"+vo.getDocSequenceDOC06():"")+" - "+vo.getName_1REG04()+" "+(vo.getName_2REG04()==null?"":vo.getName_2REG04()));
    updateCurrencySettings(vo);

    rowsPanel.setParentVO(vo);
    rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.PURCHASE_DOC_PK,pk);
    rowsPanel.getGrid().reloadData();

    if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED)) {
      confirmButton.setEnabled(false);
      setButtonsEnabled(false);
      rowsPanel.setButtonsEnabled(false);
    }
    if (!vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(false);
    }
    if (vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(true);
    }

    if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      printButton.setEnabled(true);
    }
    else {
      printButton.setEnabled(false);
    }
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

   * @return <code>true</code> if no policy is defined in the form/grid for the specified button, <code>false</code> if there exists a disabilitation policy for the specified button (through addButtonsNotEnabledOnState form/grid method)
   */
  public boolean isButtonDisabled(GenericButton button) {
    if (headerFormPanel==null || headerFormPanel.getVOModel()==null)
      return true;
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
    if (vo!=null && vo.getDocStateDOC06()!=null && vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED))
      return true;
    else
      return false;
  }
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

        headerFormPanel.executeReload();
        if (getInvoices()!=null)
          getInvoices().reloadCurrentBlockOfData();

          // check if there is only one instalment and this instalment has 0 instalment days
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
          res = ClientUtils.getData("validatePaymentCode",new LookupValidationParams(vo.getPaymentCodeReg10DOC06(),new HashMap()));
          if (res.isError()) {
            OptionPane.showMessageDialog(
                  ClientUtils.getParentFrame(this),
                  res.getErrorMessage(),
                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
                    ClientSettings.getInstance().getResources().getResource("invoice closing"),
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE
              )==JOptionPane.YES_OPTION) {
                res = ClientUtils.getData("payImmediately",new Object[]{
                        vo.getCompanyCodeSys01DOC06(),
                        vo.getDocTypeDOC06(),
                        vo.getDocYearDOC06(),
                        vo.getDocNumberDOC06(),
                        vo.getDocSequenceDOC06()
                });

                if (res.isError())
                  OptionPane.showMessageDialog(
                        ClientUtils.getParentFrame(this),
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

  public void enabledConfirmButton() {
    confirmButton.setEnabled(true);
  }

  void printButton_actionPerformed(ActionEvent e) {
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();

    HashMap params = new HashMap();
    params.put("COMPANY_CODE",vo.getCompanyCodeSys01DOC06());
    params.put("DOC_TYPE",vo.getDocTypeDOC06());
    params.put("DOC_YEAR",vo.getDocYearDOC06());
    params.put("DOC_NUMBER",vo.getDocNumberDOC06());

    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
    map.put(ApplicationConsts.FUNCTION_CODE_SYS06,headerFormPanel.getFunctionId());
    map.put(ApplicationConsts.EXPORT_PARAMS,params);
    Response res = ClientUtils.getData("getJasperReport",map);
    if (!res.isError()) {
      JasperPrint print = (JasperPrint)((VOResponse)res).getVo();
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

    rowsPanel.setButtonsEnabled(enabled);
  }


  public void loadDataCompleted(boolean error,PurchaseDocPK pk) {
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();

    this.setTitle(ClientSettings.getInstance().getResources().getResource("debiting note")+(vo.getDocSequenceDOC06()!=null?" - "+vo.getDocYearDOC06()+"/"+vo.getDocSequenceDOC06():"")+" - "+vo.getName_1REG04()+" "+(vo.getName_2REG04()==null?"":vo.getName_2REG04()));

    purchaseTotalsPanel1.getControlTaxableIncome().setDecimals(vo.getDecimalsREG03().intValue());
    purchaseTotalsPanel1.getControlTaxableIncome().setCurrencySymbol(vo.getCurrencySymbolREG03());
    purchaseTotalsPanel1.getControlTaxableIncome().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    purchaseTotalsPanel1.getControlTaxableIncome().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    purchaseTotalsPanel1.getControlTotal().setDecimals(vo.getDecimalsREG03().intValue());
    purchaseTotalsPanel1.getControlTotal().setCurrencySymbol(vo.getCurrencySymbolREG03());
    purchaseTotalsPanel1.getControlTotal().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    purchaseTotalsPanel1.getControlTotal().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    purchaseTotalsPanel1.getControlTotalVat().setDecimals(vo.getDecimalsREG03().intValue());
    purchaseTotalsPanel1.getControlTotalVat().setCurrencySymbol(vo.getCurrencySymbolREG03());
    purchaseTotalsPanel1.getControlTotalVat().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    purchaseTotalsPanel1.getControlTotalVat().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    rowsPanel.setParentVO(vo);
    rowsPanel.getGrid().getOtherGridParams().put(ApplicationConsts.PURCHASE_DOC_PK,pk);
    rowsPanel.getGrid().reloadData();

    if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED)) {
      confirmButton.setEnabled(false);
      setButtonsEnabled(false);
      rowsPanel.setButtonsEnabled(false);
    }
    if (!vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(false);
    }
    if (vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(true);
    }

    if (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.HEADER_BLOCKED)) {
      printButton.setEnabled(true);
    }
    else {
      printButton.setEnabled(false);
    }
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

   * @return <code>true</code> if no policy is defined in the form/grid for the specified button, <code>false</code> if there exists a disabilitation policy for the specified button (through addButtonsNotEnabledOnState form/grid method)
   */
  public boolean isButtonDisabled(GenericButton button) {
    if (headerFormPanel.getVOModel()==null)
      return false;
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
    if (vo!=null && vo.getDocStateDOC06()!=null &&
        (vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED) ||
         vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED)))
      return true;
    else
      return false;
  }
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

        headerFormPanel.executeReload();
        if (getInvoices()!=null)
          getInvoices().reloadCurrentBlockOfData();

          // check if there is only one instalment and this instalment has 0 instalment days
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
          res = ClientUtils.getData("validatePaymentCode",new LookupValidationParams(vo.getPaymentCodeReg10DOC06(),new HashMap()));
          if (res.isError()) {
            OptionPane.showMessageDialog(
                  ClientUtils.getParentFrame(this),
                  res.getErrorMessage(),
                  ClientSettings.getInstance().getResources().getResource("debiting note closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
                    ClientSettings.getInstance().getResources().getResource("debiting note closing"),
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE
              )==JOptionPane.YES_OPTION) {
                res = ClientUtils.getData("payImmediately",new Object[]{
                        vo.getCompanyCodeSys01DOC06(),
                        vo.getDocTypeDOC06(),
                        vo.getDocYearDOC06(),
                        vo.getDocNumberDOC06(),
                        vo.getDocSequenceDOC06()
                });

                if (res.isError())
                  OptionPane.showMessageDialog(
                        ClientUtils.getParentFrame(this),
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

  public void enabledConfirmButton() {
    confirmButton.setEnabled(true);
  }

  void printButton_actionPerformed(ActionEvent e) {
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();

    HashMap params = new HashMap();
    params.put("COMPANY_CODE",vo.getCompanyCodeSys01DOC06());
    params.put("DOC_TYPE",vo.getDocTypeDOC06());
    params.put("DOC_YEAR",vo.getDocYearDOC06());
    params.put("DOC_NUMBER",vo.getDocNumberDOC06());

    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
    map.put(ApplicationConsts.FUNCTION_CODE_SYS06,headerFormPanel.getFunctionId());
    map.put(ApplicationConsts.EXPORT_PARAMS,params);
    Response res = ClientUtils.getData("getJasperReport",map);
    if (!res.isError()) {
      JasperPrint print = (JasperPrint)((VOResponse)res).getVo();
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

   * The method can pre-set some v.o. attributes, so that some input controls will have a predefined value associated.
   * @param persistentObject new value object
   */
  public void createPersistentObject(ValueObject persistentObject) throws Exception {
    DetailPurchaseDocRowVO vo = (DetailPurchaseDocRowVO)persistentObject;
    DetailPurchaseDocVO parentVO = panel.getParentVO();
    Calendar cal = Calendar.getInstance();
    vo.setCompanyCodeSys01DOC07(parentVO.getCompanyCodeSys01DOC06());
    vo.setDocYearDOC07(parentVO.getDocYearDOC06());
    vo.setDocTypeDOC07(parentVO.getDocTypeDOC06());
    vo.setDocNumberDOC07(parentVO.getDocNumberDOC06());
    vo.setDeliveryDateDOC07(new java.sql.Date(System.currentTimeMillis()));
    vo.setCurrencyCodeReg03DOC06(panel.getParentVO().getCurrencyCodeReg03DOC06());
    vo.setVariantCodeItm11DOC07("*");
    vo.setVariantCodeItm12DOC07("*");
    vo.setVariantCodeItm13DOC07("*");
 
View Full Code Here

Examples of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    Response res = ClientUtils.getData("insertPurchaseDoc",newPersistentObject);
    if (!res.isError()) {
      DetailPurchaseDocVO vo = (DetailPurchaseDocVO)((VOResponse)res).getVo();
      pk = new PurchaseDocPK(
          vo.getCompanyCodeSys01DOC06(),
          vo.getDocTypeDOC06(),
          vo.getDocYearDOC06(),
          vo.getDocNumberDOC06()
      );

    }
    return res;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.