Examples of DetailSaleDocVO


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

   * @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("insertSaleDoc",newPersistentObject);
    if (!res.isError()) {
      DetailSaleDocVO vo = (DetailSaleDocVO)((VOResponse)res).getVo();
      pk = new SaleDocPK(
          vo.getCompanyCodeSys01DOC01(),
          vo.getDocTypeDOC01(),
          vo.getDocYearDOC01(),
          vo.getDocNumberDOC01()
      );

    }
    return res;
  }
View Full Code Here

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

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

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

    frame.getDiscPanel().setParentVO(vo);
View Full Code Here

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

   * @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();
    DetailSaleDocVO vo = (DetailSaleDocVO)persistentObject;

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

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

   * 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 {
    DetailSaleDocVO vo = (DetailSaleDocVO)persistentObject;
    Calendar cal = Calendar.getInstance();
    vo.setDocYearDOC01(new BigDecimal(cal.get(cal.YEAR)));
    vo.setDocDateDOC01(new java.sql.Date(System.currentTimeMillis()));
    vo.setDocTypeDOC01(ApplicationConsts.SALE_ESTIMATE_DOC_TYPE);
    vo.setDocStateDOC01(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("DOC01_ESTIMATES");
    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.setCompanyCodeSys01DOC01(companiesList.get(0).toString());
          vo.setWarehouseCodeWar01DOC01(warCode);
        }
      }
    }
  }
View Full Code Here

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

   * @return <code>true</code> allows to go to EDIT mode, <code>false</code> the mode change is interrupted
   */
  public boolean beforeEditData(Form form) {
    if (!super.beforeEditData(form))
      return false;
    DetailSaleDocVO vo = (DetailSaleDocVO)frame.getHeaderFormPanel().getVOModel().getValueObject();
    return !vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) &&
           !vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED);
  }
View Full Code Here

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

   * @return <code>true</code> allows the deleting to continue, <code>false</code> the deleting is interrupted
   */
  public boolean beforeDeleteData(Form form) {
    if (!super.beforeDeleteData(form))
      return false;
    DetailSaleDocVO vo = (DetailSaleDocVO)frame.getHeaderFormPanel().getVOModel().getValueObject();
    return !vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) &&
           !vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED);

  }
View Full Code Here

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

   * Callback method called when the Form mode is changed.
   * @param currentMode current Form mode
   */
  public void modeChanged(int currentMode) {
    if (currentMode==Consts.INSERT) {
      DetailSaleDocVO vo = (DetailSaleDocVO)frame.getHeaderFormPanel().getVOModel().getValueObject();
      if (vo.getWarehouseCodeWar01DOC01()!=null)
        frame.getWarePanel().getWareController().forceValidate();
    }
  }
View Full Code Here

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

   * 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) {
    DetailSaleDocVO vo = (DetailSaleDocVO)parentFrame.getHeaderFormPanel().getVOModel().getValueObject();
    if (vo!=null && vo.getDocStateDOC01()!=null &&
        (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) ||
         vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED)))
      return true;
    else
      return false;
  }
View Full Code Here

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

          return;
        }
      }

      ScheduledActivityVO actVO = (ScheduledActivityVO)frame.getActPanel().getVOModel().getValueObject();
      DetailSaleDocVO docVO = new DetailSaleDocVO();
      docVO.setCompanyCodeSys01DOC01(vo.getCompanyCodeSys01SCH03());
      docVO.setDocYearDOC01(vo.getRequestYearSCH03());
      docVO.setDocTypeDOC01(ApplicationConsts.SALE_INVOICE_DOC_TYPE);
      docVO.setDocDateDOC01(new java.sql.Date(vo.getRequestDateSCH03().getTime()));
      docVO.setCurrencyCodeReg03DOC01(controlCurrencyCode.getValue().toString());
      docVO.setPricelistCodeSal01DOC01(controlPricelistCode.getValue().toString());
      docVO.setPricelistDescriptionDOC01(controlPricelistDescr.getValue().toString());
      docVO.setCustomerCodeSAL07((String)controlCustCode.getValue());
      docVO.setDocStateDOC01(ApplicationConsts.OPENED);
      docVO.setPaymentCodeReg10DOC01(controlPayCode.getValue().toString());
      docVO.setPaymentDescriptionDOC01(controlPayDescr.getValue().toString());
      docVO.setDocRefNumberDOC01(vo.getProgressiveSCH03().toString());
      docVO.setNoteDOC01(ClientSettings.getInstance().getResources().getResource("invoice from call-out request nr.")+" "+vo.getProgressiveSCH03()+"/"+vo.getRequestYearSCH03());
      docVO.setProgressiveReg04DOC01(vo.getProgressiveReg04SCH03());
      docVO.setWarehouseCodeWar01DOC01(controlWarehouseCode.getValue().toString());
      docVO.setDescriptionWar01DOC01(controlWareDescr.getValue().toString());

      InvoiceFromCallOutRequestVO invVO = new InvoiceFromCallOutRequestVO();
      invVO.setSaleVO(docVO);
      invVO.setCallOutRequest(vo);
      invVO.setCustomerAlreadyExists(!controlCustCode.isEnabled());
View Full Code Here

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

   * @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("insertSaleDoc",newPersistentObject);
    if (!res.isError()) {
      DetailSaleDocVO vo = (DetailSaleDocVO)((VOResponse)res).getVo();
      pk = new SaleDocPK(
          vo.getCompanyCodeSys01DOC01(),
          vo.getDocTypeDOC01(),
          vo.getDocYearDOC01(),
          vo.getDocNumberDOC01()
      );

    }
    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.