Package org.jallinone.sales.documents.java

Examples of org.jallinone.sales.documents.java.GridSaleDocVO


   * @param rowNumber selected row index
   * @param persistentObject v.o. related to the selected row
   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    // create sale order detail frame in READONLY mode...
    GridSaleDocVO vo = (GridSaleDocVO)persistentObject;
    SaleDocPK pk = new SaleDocPK(
        vo.getCompanyCodeSys01DOC01(),
        vo.getDocTypeDOC01(),
        vo.getDocYearDOC01(),
        vo.getDocNumberDOC01()
    );
    new SaleOrderDocController(frame,pk);
  }
View Full Code Here


   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response deleteRecords(ArrayList persistentObjects) throws Exception {
    ArrayList pks = new ArrayList();
    SaleDocPK pk = null;
    GridSaleDocVO vo = null;
    for(int i=0;i<persistentObjects.size();i++) {
      vo = (GridSaleDocVO)persistentObjects.get(i);
      pk = new SaleDocPK(
          vo.getCompanyCodeSys01DOC01(),
          vo.getDocTypeDOC01(),
          vo.getDocYearDOC01(),
          vo.getDocNumberDOC01()
      );
      pks.add(pk);
    }
    return ClientUtils.getData("deleteSaleDocs",pks);
  }
View Full Code Here

   */
  public boolean beforeDeleteGrid(GridControl grid) {
    if (!super.beforeDeleteGrid(grid))
      return false;

    GridSaleDocVO vo = null;
    for(int i=0;i<frame.getGrid().getSelectedRows().length;i++) {
      vo = (GridSaleDocVO)frame.getGrid().getVOListTableModel().getObjectForRow(frame.getGrid().getSelectedRows()[i]);
      if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED))
        return false;
      else if (vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED))
        return false;
    }
    return true;
  }
View Full Code Here

      saleIdHeadPanel1.getControlDocRifLookup().getLookupController().addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSaleDocVO vo = (GridSaleDocVO)saleIdHeadPanel1.getControlDocRifLookup().getLookupController().getLookupVO();
          if (vo.getDocNumberDOC01()!=null) {
            // pre-set header data...
            Response res = ClientUtils.getData("loadSaleDoc",new SaleDocPK(
                vo.getCompanyCodeSys01DOC01(),
                vo.getDocTypeDOC01(),
                vo.getDocYearDOC01(),
                vo.getDocNumberDOC01()
            ));
            if (!res.isError()) {
              DetailSaleDocVO saleDocVO = (DetailSaleDocVO)((VOResponse)res).getVo();
              DetailSaleDocVO oldSaleDocVO = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();
              saleDocVO.setCompanyCodeSys01Doc01DOC01(vo.getCompanyCodeSys01DOC01());
              saleDocVO.setDocTypeDoc01DOC01(vo.getDocTypeDOC01());
              saleDocVO.setDocYearDoc01DOC01(vo.getDocYearDOC01());
              saleDocVO.setDocNumberDoc01DOC01(vo.getDocNumberDOC01());
              saleDocVO.setDocSequenceDoc01DOC01(vo.getDocSequenceDOC01());
              saleDocVO.setDocTypeDOC01(ApplicationConsts.SALE_INVOICE_FROM_SD_DOC_TYPE);
              saleDocVO.setDocNumberDOC01(null);
              saleDocVO.setDocSequenceDOC01(null);
              saleDocVO.setDocStateDOC01(ApplicationConsts.OPENED);
              saleDocVO.setDocDateDOC01(oldSaleDocVO.getDocDateDOC01());
View Full Code Here

    return true;
  }

  public int getDecimals(int row) {
    try {
      GridSaleDocVO vo = (GridSaleDocVO) grid.getVOListTableModel().getObjectForRow(row);
      return vo.getDecimalsREG03().intValue();
    }
    catch (Exception ex) {
      return 0;
    }
  }
View Full Code Here

    }
  }

  public String getCurrencySymbol(int row) {
    try {
      GridSaleDocVO vo = (GridSaleDocVO) grid.getVOListTableModel().getObjectForRow(row);
      return vo.getCurrencySymbolREG03();
    }
    catch (Exception ex) {
      return "E";
    }
  }
View Full Code Here

      saleIdHeadPanel1.getControlDocRifLookup().getLookupController().addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSaleDocVO vo = (GridSaleDocVO)saleIdHeadPanel1.getControlDocRifLookup().getLookupController().getLookupVO();
          if (vo.getDocNumberDOC01()!=null) {
            // pre-set header data...
            Response res = ClientUtils.getData("loadSaleDoc",new SaleDocPK(
                vo.getCompanyCodeSys01DOC01(),
                vo.getDocTypeDOC01(),
                vo.getDocYearDOC01(),
                vo.getDocNumberDOC01()
            ));
            if (!res.isError()) {
              DetailSaleDocVO saleDocVO = (DetailSaleDocVO)((VOResponse)res).getVo();
              DetailSaleDocVO oldSaleDocVO = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();
              saleDocVO.setCompanyCodeSys01Doc01DOC01(vo.getCompanyCodeSys01DOC01());
              saleDocVO.setDocTypeDoc01DOC01(vo.getDocTypeDOC01());
              saleDocVO.setDocYearDoc01DOC01(vo.getDocYearDOC01());
              saleDocVO.setDocNumberDoc01DOC01(vo.getDocNumberDOC01());
              saleDocVO.setDocSequenceDoc01DOC01(vo.getDocSequenceDOC01());
              saleDocVO.setDocTypeDOC01(ApplicationConsts.SALE_INVOICE_FROM_DN_DOC_TYPE);
              saleDocVO.setDocNumberDOC01(null);
              saleDocVO.setDocSequenceDOC01(null);
              saleDocVO.setDocStateDOC01(ApplicationConsts.OPENED);
              saleDocVO.setDocDateDOC01(oldSaleDocVO.getDocDateDOC01());
View Full Code Here

    // since this method could be invoked also when selecting another row on the linked grid,
    // the pk attribute must be recalculated from the grid...
    if (getParentFrame()!=null) {
      int row = parentFrame.getGrid().getSelectedRow();
      if (row!=-1) {
        GridSaleDocVO gridVO = (GridSaleDocVO)parentFrame.getGrid().getVOListTableModel().getObjectForRow(row);
        pk = new SaleDocPK(gridVO.getCompanyCodeSys01DOC01(),gridVO.getDocTypeDOC01(),gridVO.getDocYearDOC01(),gridVO.getDocNumberDOC01());
      }
    }

    return ClientUtils.getData("loadSaleDoc",pk);
  }
View Full Code Here

    return true;
  }

  public int getDecimals(int row) {
    try {
      GridSaleDocVO vo = (GridSaleDocVO) grid.getVOListTableModel().getObjectForRow(row);
      return vo.getDecimalsREG03().intValue();
    }
    catch (Exception ex) {
      return 0;
    }
  }
View Full Code Here

    }
  }

  public String getCurrencySymbol(int row) {
    try {
      GridSaleDocVO vo = (GridSaleDocVO) grid.getVOListTableModel().getObjectForRow(row);
      return vo.getCurrencySymbolREG03();
    }
    catch (Exception ex) {
      return "E";
    }
  }
View Full Code Here

TOP

Related Classes of org.jallinone.sales.documents.java.GridSaleDocVO

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.