Examples of DetailSaleDocVO


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

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {}

        public void beforeLookupAction(ValueObject parentVO) {
          DetailSaleDocVO vo = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();
          wareDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC01());
          wareDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC01());
        }

        public void forceValidate() {}

      });
View Full Code Here

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

      confirmButton.setEnabled(false);
  }


  public void loadDataCompleted(boolean error,SaleDocPK pk) {
    DetailSaleDocVO vo = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();

    this.setTitle(ClientSettings.getInstance().getResources().getResource("desk selling")+(vo.getDocSequenceDOC01()!=null?" - "+vo.getDocYearDOC01()+"/"+vo.getDocSequenceDOC01():"")+" - "+vo.getName_1REG04()+" "+(vo.getName_2REG04()==null?"":vo.getName_2REG04()));

    saleTotalsPanel1.getControlTaxableIncome().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTaxableIncome().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlTaxableIncome().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlTaxableIncome().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlTotal().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTotal().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlTotal().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlTotal().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlTotalVat().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlTotalVat().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlTotalVat().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlTotalVat().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlAllowance().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlAllowance().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlAllowance().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlAllowance().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    saleTotalsPanel1.getControlDeposit().setDecimals(vo.getDecimalsREG03().intValue());
    saleTotalsPanel1.getControlDeposit().setCurrencySymbol(vo.getCurrencySymbolREG03());
    saleTotalsPanel1.getControlDeposit().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    saleTotalsPanel1.getControlDeposit().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

    discPanel.getControlDiscValue().setDecimals(vo.getDecimalsREG03().intValue());
    discPanel.getControlDiscValue().setCurrencySymbol(vo.getCurrencySymbolREG03());
    discPanel.getControlDiscValue().setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
    discPanel.getControlDiscValue().setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

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

    if (vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED)) {
      confirmButton.setEnabled(false);
      setButtonsEnabled(false);
      rowsPanel.setButtonsEnabled(false);
    }
    if (!vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(false);
    }
    if (vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      confirmButton.setEnabled(true);
    }

    if (vo.getDocStateDOC01().equals(ApplicationConsts.CONFIRMED) ||
        vo.getDocStateDOC01().equals(ApplicationConsts.CLOSED) ||
        vo.getDocStateDOC01().equals(ApplicationConsts.HEADER_BLOCKED)) {
      printButton.setEnabled(true);
    }
    else {
      printButton.setEnabled(false);
    }
View Full Code Here

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

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

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

          if (JOptionPane.showConfirmDialog(ClientUtils.getParentFrame(this),
                                        ClientSettings.getInstance().getResources().getResource("create sale invoice?"),
                                        ClientSettings.getInstance().getResources().getResource("desk selling invoice"),
                                        JOptionPane.YES_NO_OPTION)==JOptionPane.YES_OPTION) {

            DetailSaleDocVO docVO = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();
            DetailSaleDocVO invoiceVO = (DetailSaleDocVO)docVO.clone();
            Calendar cal = Calendar.getInstance();
            invoiceVO.setCompanyCodeSys01Doc01DOC01(docVO.getCompanyCodeSys01DOC01());
            invoiceVO.setDocTypeDoc01DOC01(docVO.getDocTypeDOC01());
            invoiceVO.setDocYearDoc01DOC01(docVO.getDocYearDOC01());
            invoiceVO.setDocNumberDoc01DOC01(docVO.getDocNumberDOC01());
            invoiceVO.setDocSequenceDoc01DOC01(docVO.getDocSequenceDOC01());
            invoiceVO.setDocYearDOC01(new BigDecimal(cal.get(cal.YEAR)));
            invoiceVO.setDocDateDOC01(new java.sql.Date(System.currentTimeMillis()));
            invoiceVO.setDocTypeDOC01(ApplicationConsts.SALE_INVOICE_FROM_SD_DOC_TYPE);
            invoiceVO.setDocStateDOC01(ApplicationConsts.OPENED);
            invoiceVO.setDocNumberDOC01(null);
            invoiceVO.setDocSequenceDOC01(null);

            res = ClientUtils.getData("createInvoiceFromSaleDoc",invoiceVO);
            if (!res.isError()) {
              invoiceVO = (DetailSaleDocVO)((VOResponse)res).getVo();
              new SaleInvoiceDocFromSaleDocController(null,new SaleDocPK(
                invoiceVO.getCompanyCodeSys01DOC01(),
                invoiceVO.getDocTypeDOC01(),
                invoiceVO.getDocYearDOC01(),
                invoiceVO.getDocNumberDOC01()
              ));
            }
            else
              JOptionPane.showMessageDialog(
                  ClientUtils.getParentFrame(this),
View Full Code Here

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

  public final void showRowsPanel() {
    tabbedPane.setSelectedIndex(1);
  }

  void printButton_actionPerformed(ActionEvent e) {
    DetailSaleDocVO vo = (DetailSaleDocVO)headerFormPanel.getVOModel().getValueObject();

    HashMap params = new HashMap();
    params.put("COMPANY_CODE",vo.getCompanyCodeSys01DOC01());
    params.put("DOC_TYPE",vo.getDocTypeDOC01());
    params.put("DOC_YEAR",vo.getDocYearDOC01());
    params.put("DOC_NUMBER",vo.getDocNumberDOC01());

    HashMap map = new HashMap();
    map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC01());
    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.sales.documents.java.DetailSaleDocVO

        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==e.SELECTED &&
              frame.getHeaderFormPanel().getMode()==Consts.INSERT) {
            Object companyCodeSys01 = frame.getSaleCustomerHeadPanel1().getControlCompaniesCombo().getValue();
            DetailSaleDocVO vo = (DetailSaleDocVO)frame.getHeaderFormPanel().getVOModel().getValueObject();

            // retrieve default customer code...
            HashMap map = new HashMap();
            map.put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
            map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.CUSTOMER_CODE);
            Response res = ClientUtils.getData("loadUserParam",map);
            if (!res.isError()) {
              String customerCode = (String)((VOResponse)res).getVo();
              if (customerCode!=null) {
                vo.setCustomerCodeSAL07(customerCode);
                vo.setCompanyCodeSys01DOC01(companyCodeSys01.toString());
                try {
                  frame.getSaleCustomerHeadPanel1().getControlCustomerCode().validateCode(customerCode);
                }
                catch (Exception ex) {
                }
              }
            }
            // retrieve default warehouse...
            map.put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
            map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.WAREHOUSE_CODE);
            res = ClientUtils.getData("loadUserParam",map);
            if (!res.isError()) {
              String warCode = (String)((VOResponse)res).getVo();
              if (warCode!=null) {
                vo.setWarehouseCodeWar01DOC01(warCode);
                try {
                  frame.getControlWarehouseCode().validateCode(warCode);
                }
                catch (Exception ex1) {
                }
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

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.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.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.getCustomerCodeSAL07()!=null)
        frame.getSaleCustomerHeadPanel1().getCustomerController().forceValidate();
      if (vo.getWarehouseCodeWar01DOC01()!=null)
        frame.getWareController().forceValidate();

//      if (vo.getCustomerCodeSAL07()!=null && vo.getWarehouseCodeWar01DOC01()!=null) {
//        if (frame.getHeaderFormPanel().save()) {
//          frame.showRowsPanel();
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.