Package org.jallinone.purchases.documents.java

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


                vo.getDocTypeDOC06(),
                vo.getDocYearDOC06(),
                vo.getDocNumberDOC06()
            ));
            if (!res.isError()) {
              DetailPurchaseDocVO purchaseDocVO = (DetailPurchaseDocVO)((VOResponse)res).getVo();
              DetailPurchaseDocVO oldPurchaseDocVO = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
              purchaseDocVO.setCompanyCodeSys01Doc06DOC06(vo.getCompanyCodeSys01DOC06());
              purchaseDocVO.setDocTypeDoc06DOC06(vo.getDocTypeDOC06());
              purchaseDocVO.setDocYearDoc06DOC06(vo.getDocYearDOC06());
              purchaseDocVO.setDocNumberDoc06DOC06(vo.getDocNumberDOC06());
              purchaseDocVO.setDocSequenceDoc06DOC06(vo.getDocSequenceDOC06());
              purchaseDocVO.setDocTypeDOC06(ApplicationConsts.PURCHASE_INVOICE_FROM_PD_DOC_TYPE);
              purchaseDocVO.setDocNumberDOC06(null);
              purchaseDocVO.setDocSequenceDOC06(oldPurchaseDocVO.getDocSequenceDOC06());
              purchaseDocVO.setDocStateDOC06(ApplicationConsts.OPENED);
              purchaseDocVO.setDocDateDOC06(oldPurchaseDocVO.getDocDateDOC06());
              headerFormPanel.getVOModel().setValueObject(purchaseDocVO);
              headerFormPanel.pull();
            }
          }
          else {
            // reset header data...
            try {
              DetailPurchaseDocVO purchaseDocVO = new DetailPurchaseDocVO();
              PurchaseInvoiceDocFromPurchaseDocFrame.this.controller.createPersistentObject(purchaseDocVO);
              purchaseDocVO.setDocTypeDoc06DOC06(ApplicationConsts.PURCHASE_ORDER_DOC_TYPE);
              headerFormPanel.getVOModel().setValueObject(purchaseDocVO);
              headerFormPanel.pull();
            }
            catch (Exception ex) {
            }
View Full Code Here

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


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

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

    if (vo.getDocStateDOC06().equals(ApplicationConsts.CLOSED) ||
        vo.getDocStateDOC06().equals(ApplicationConsts.CONFIRMED)) {
      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

   * Method called by GenericButton.setEnabled method to check if the button must be disabled.
   * @param button button whose abilitation must be checked
   * @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) {
    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

        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

  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

TOP

Related Classes of org.jallinone.purchases.documents.java.DetailPurchaseDocVO

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.