Examples of DetailPurchaseDocVO


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

      wareController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)form.getVOModel().getValueObject();
          if (vo.getWarehouseCodeWar01DOC06()==null || vo.getWarehouseCodeWar01DOC06().equals("")) {
            vo.setDescriptionWar01DOC06(null);
            vo.setAddressWar01DOC06(null);
            vo.setCityWar01DOC06(null);
            vo.setProvinceWar01DOC06(null);
            vo.setZipWar01DOC06(null);
            vo.setCountryWar01DOC06(null);
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)form.getVOModel().getValueObject();
          wareDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
          wareDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
        }

        public void forceValidate() {}

      });
View Full Code Here

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();
    updateCurrencySettings(vo);

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

    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);
      printLabelsButton.setEnabled(true);
    }
    else {
      printButton.setEnabled(false);
View Full Code Here

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

   * 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 = null;
    if (headerFormPanel!=null && headerFormPanel.getVOModel()!=null)
      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

  }


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

    HashMap map = new HashMap();
    map.put(
      ApplicationConsts.PURCHASE_DOC_PK,
      new PurchaseDocPK(
        vo.getCompanyCodeSys01DOC06(),
        vo.getDocTypeDOC06(),
        vo.getDocYearDOC06(),
        vo.getDocNumberDOC06()
      )
    );
    Response res = ClientUtils.getData("createBarcodeLabelsDataFromPurchaseDoc",map);
    if (res.isError()) {
      JOptionPane.showMessageDialog(
        ClientUtils.getParentFrame(this),
        res.getErrorMessage(),
        ClientSettings.getInstance().getResources().getResource("print barcode labels"),
        JOptionPane.ERROR_MESSAGE
      );
    }
    else {
      Object reportId = ((VOResponse)res).getVo();


      HashMap params = new HashMap();
      params.put("REPORT_ID",reportId);

      map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC06());
      map.put(ApplicationConsts.FUNCTION_CODE_SYS06,"BARCODE_LABELS");
      map.put(ApplicationConsts.EXPORT_PARAMS,params);
      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

    }
  }


  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.setVariantCodeItm11DOC07("*");
    vo.setVariantCodeItm12DOC07("*");
    vo.setVariantCodeItm13DOC07("*");
    vo.setVariantCodeItm14DOC07("*");
 
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

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

  public void afterInsertData() {
    if (parentFrame!=null) {
      parentFrame.getGrid().reloadCurrentBlockOfData();
    }

    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)frame.getHeaderFormPanel().getVOModel().getValueObject();
    frame.getRowsPanel().setParentVO(vo);
    frame.getRowsPanel().getGrid().getOtherGridParams().put(ApplicationConsts.PURCHASE_DOC_PK,pk);
    frame.getRowsPanel().getGrid().reloadData();

    frame.setButtonsEnabled(true);
View Full Code Here

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

   * @param persistentObject value object to delete
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response deleteRecord(ValueObject persistentObject) throws Exception {
    ArrayList pks = new ArrayList();
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)persistentObject;

    pks.add(pk);
    Response res = ClientUtils.getData("deletePurchaseDocs",pks);
    if (!res.isError()) {
      if (parentFrame!=null) {
View Full Code Here

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

   * Callback method called by the Form panel when the Form is set to INSERT mode.
   * 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 {
    DetailPurchaseDocVO vo = (DetailPurchaseDocVO)persistentObject;
    Calendar cal = Calendar.getInstance();
    vo.setDocYearDOC06(new BigDecimal(cal.get(cal.YEAR)));
    vo.setDocDateDOC06(new java.sql.Date(System.currentTimeMillis()));
    vo.setDocTypeDOC06(ApplicationConsts.PURCHASE_DEBIT_NOTE_DOC_TYPE);
    vo.setDocStateDOC06(ApplicationConsts.OPENED);

    // pre-set warehouse code if previously defined (stored in SYS19 table...)
    ClientApplet applet = ( (ApplicationClientFacade) MDIFrame.getInstance().getClientFacade()).getMainClass();
    ButtonCompanyAuthorizations bca = applet.getAuthorizations().getCompanyBa();
    final ArrayList companiesList = bca.getCompaniesList("DOC06_DEBITINGNOTES");
    if (companiesList.size()>0) {
      HashMap map = new HashMap();
      // retrieve default warehouse...
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,companiesList.get(0));
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.WAREHOUSE_CODE);
      Response res = ClientUtils.getData("loadUserParam",map);
      if (!res.isError()) {
        String warCode = (String)((VOResponse)res).getVo();
        if (warCode!=null) {
          vo.setWarehouseCodeWar01DOC06(warCode);
        }
      }
    }
  }
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.