Examples of VatVO


Examples of org.jallinone.registers.vat.java.VatVO

            serverLanguageId,
            username,
            new ArrayList()
        );
        if (!res.isError()) {
          VatVO vatVO = (VatVO)((VOListResponse)res).getRows().get(0);
          customerVatValue = new BigDecimal(vatVO.getValueREG01().doubleValue()*(1d-vatVO.getDeductibleREG01().doubleValue()/100d));
          customerVatCode = vatVO.getVatCodeREG01();
          customerVatDescription = vatVO.getDescriptionSYS10();
        }
      }

      // retrieve all item rows...
      GridParams pars = new GridParams();
View Full Code Here

Examples of org.jallinone.registers.vat.java.VatVO

   */
  public VOListResponse updateVats(ArrayList oldVOs,ArrayList newVOs,String serverLanguageId,String username,ArrayList customizedFields) throws Throwable {
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      VatVO oldVO = null;
      VatVO newVO = null;
      Response res = null;

      for(int i=0;i<oldVOs.size();i++) {
        oldVO = (VatVO)oldVOs.get(i);
        newVO = (VatVO)newVOs.get(i);

        // update SYS10 table...
        TranslationUtils.updateTranslation(oldVO.getDescriptionSYS10(),newVO.getDescriptionSYS10(),newVO.getProgressiveSys10REG01(),serverLanguageId,username,conn);

        HashSet pkAttrs = new HashSet();
        pkAttrs.add("vatCodeREG01");

        HashMap attr2dbFields = new HashMap();
View Full Code Here

Examples of org.jallinone.registers.vat.java.VatVO

   */
  public VOListResponse insertVats(ArrayList list,String serverLanguageId,String username,String defCompanyCodeSys01SYS03,ArrayList customizedFields) throws Throwable {
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      VatVO vo = null;

      Map attribute2dbField = new HashMap();
      attribute2dbField.put("vatCodeREG01","VAT_CODE");
      attribute2dbField.put("progressiveSys10REG01","PROGRESSIVE_SYS10");
      attribute2dbField.put("valueREG01","VALUE");
      attribute2dbField.put("deductibleREG01","DEDUCTIBLE");
      attribute2dbField.put("enabledREG01","ENABLED");

      BigDecimal progressiveSYS10 = null;
      Response res = null;

      for(int i=0;i<list.size();i++) {
        vo = (VatVO)list.get(i);
        vo.setEnabledREG01("Y");

        // insert record in SYS10...
        progressiveSYS10 = TranslationUtils.insertTranslations(vo.getDescriptionSYS10(),username,conn);
        vo.setProgressiveSys10REG01(progressiveSYS10);

        // insert into REG01...
        res = CustomizeQueryUtil.insertTable(
            conn,
            new UserSessionParameters(username),
View Full Code Here

Examples of org.jallinone.registers.vat.java.VatVO

  public VOResponse deleteVats(ArrayList list,String serverLanguageId,String username) throws Throwable {
    PreparedStatement pstmt = null;
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      VatVO vo = null;
      for(int i=0;i<list.size();i++) {
        // logically delete the record in REG01...
        vo = (VatVO)list.get(i);
        pstmt = conn.prepareStatement(
         "update REG01_VATS set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where VAT_CODE='"+vo.getVatCodeREG01()+"'"
        );
        pstmt.setString(1,username);
        pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
        pstmt.execute();
        pstmt.close();

        // remove default vat code from customers too...
        pstmt = conn.prepareStatement(
          "update SAL07_CUSTOMERS set VAT_CODE_REG01=NULL where VAT_CODE_REG01='"+vo.getVatCodeREG01()+"'"
        );
        pstmt.setString(1,username);
        pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
        pstmt.execute();
        pstmt.close();
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.