Package org.jallinone.purchases.documents.java

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


    return true;
  }

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


    }
  }

  public String getCurrencySymbol(int row) {
    try {
      GridPurchaseDocVO vo = (GridPurchaseDocVO) grid.getVOListTableModel().getObjectForRow(row);
      return vo.getCurrencySymbolREG03();
    }
    catch (Exception ex) {
      return "E";
    }
  }
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) {
        GridPurchaseDocVO gridVO = (GridPurchaseDocVO)parentFrame.getGrid().getVOListTableModel().getObjectForRow(row);
        pk = new PurchaseDocPK(gridVO.getCompanyCodeSys01DOC06(),gridVO.getDocTypeDOC06(),gridVO.getDocYearDOC06(),gridVO.getDocNumberDOC06());
      }
    }

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

   * @param rowNumber selected row index
   * @param persistentObject v.o. related to the selected row
   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    // create purchase order detail frame in READONLY mode...
    GridPurchaseDocVO vo = (GridPurchaseDocVO)persistentObject;
    PurchaseDocPK pk = new PurchaseDocPK(
        vo.getCompanyCodeSys01DOC06(),
        vo.getDocTypeDOC06(),
        vo.getDocYearDOC06(),
        vo.getDocNumberDOC06()
    );
    new PurchaseDocController(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();
    PurchaseDocPK pk = null;
    GridPurchaseDocVO vo = null;
    for(int i=0;i<persistentObjects.size();i++) {
      vo = (GridPurchaseDocVO)persistentObjects.get(i);
      pk = new PurchaseDocPK(
          vo.getCompanyCodeSys01DOC06(),
          vo.getDocTypeDOC06(),
          vo.getDocYearDOC06(),
          vo.getDocNumberDOC06()
      );
      pks.add(pk);
    }
    return ClientUtils.getData("deletePurchaseDocs",pks);
  }
View Full Code Here

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

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

   * @param rowNumber selected row index
   * @param persistentObject v.o. related to the selected row
   */
  public void doubleClick(int rowNumber,ValueObject persistentObject) {
    // create purchase invoice detail frame in READONLY mode...
    GridPurchaseDocVO vo = (GridPurchaseDocVO)persistentObject;
    PurchaseDocPK pk = new PurchaseDocPK(
        vo.getCompanyCodeSys01DOC06(),
        vo.getDocTypeDOC06(),
        vo.getDocYearDOC06(),
        vo.getDocNumberDOC06()
    );
    if (pk.getDocTypeDOC06().equals(ApplicationConsts.PURCHASE_INVOICE_DOC_TYPE))
      new PurchaseInvoiceDocController(frame,pk);
    else if (pk.getDocTypeDOC06().equals(ApplicationConsts.PURCHASE_INVOICE_FROM_DN_DOC_TYPE))
      new PurchaseInvoiceDocFromDelivNotesController(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();
    PurchaseDocPK pk = null;
    GridPurchaseDocVO vo = null;
    for(int i=0;i<persistentObjects.size();i++) {
      vo = (GridPurchaseDocVO)persistentObjects.get(i);
      pk = new PurchaseDocPK(
          vo.getCompanyCodeSys01DOC06(),
          vo.getDocTypeDOC06(),
          vo.getDocYearDOC06(),
          vo.getDocNumberDOC06()
      );
      pks.add(pk);
    }
    return ClientUtils.getData("deletePurchaseDocs",pks);
  }
View Full Code Here

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

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

    return true;
  }

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

TOP

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

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.