Examples of PaymentVO


Examples of org.jallinone.registers.payments.java.PaymentVO

    payController.addLookupListener(new LookupListener() {

      public void codeValidated(boolean validated) {}

      public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        PaymentVO vo = (PaymentVO)payController.getLookupVO();
        if (payController.getLookupVO()==null) {
        }
        else {
           detailSaleDocVO.setPaymentCodeReg10DOC01(vo.getPaymentCodeREG10());
           detailSaleDocVO.setPaymentDescriptionDOC01(vo.getDescriptionSYS10());
           controlPayDescr.setText(detailSaleDocVO.getPaymentDescriptionDOC01());
        }
      }

      public void beforeLookupAction(ValueObject parentVO) {
        GridCustomerVO vo = (GridCustomerVO)customerController.getLookupVO();
        customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
        customerDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
        customerDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER);
      }

      public void forceValidate() {}
View Full Code Here

Examples of org.jallinone.registers.payments.java.PaymentVO

                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
View Full Code Here

Examples of org.jallinone.registers.payments.java.PaymentVO

                  ClientSettings.getInstance().getResources().getResource("debiting note closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
View Full Code Here

Examples of org.jallinone.registers.payments.java.PaymentVO

       companiesList.add(docVO.getCompanyCodeSys01DOC06());
       res = payAction.validatePaymentCode(new LookupValidationParams(docVO.getPaymentCodeReg10DOC06(),new HashMap()),serverLanguageId,username,new ArrayList(),companiesList);
       if (res.isError()) {
         throw new Exception(res.getErrorMessage());
       }
       PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);

       gridParams = new GridParams();
       gridParams.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,docVO.getCompanyCodeSys01DOC06());
       gridParams.getOtherGridParams().put(ApplicationConsts.PAYMENT_CODE_REG10,docVO.getPaymentCodeReg10DOC06());
       res = payAction.loadPaymentInstalments(gridParams,serverLanguageId,username);
       if (res.isError()) {
         throw new Exception(res.getErrorMessage());
       }
       rows = ((VOListResponse)res).getRows();

/*
       // create expirations in DOC19 ONLY if:
       // - there are more than one instalment OR
       // - there is only one instalment and this instalment has more than 0 instalment days
       if (rows.size()>1 || (rows.size()==1 && ((PaymentInstalmentVO)rows.get(0)).getInstalmentDaysREG17().intValue()>0 )) {
*/

      HashMap map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,docVO.getCompanyCodeSys01DOC06());
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.ROUNDING_COSTS_CODE);
      res = userParamAction.loadUserParam(map,serverLanguageId,username);
      if (res.isError()) {
        throw new Exception(res.getErrorMessage());
      }
      String roundingAccountCode = ((VOResponse)res).getVo().toString();


      // create ALWAYS expirations in DOC19...
       PaymentInstalmentVO inVO = null;
       pstmt = conn.prepareStatement(
           "insert into DOC19_EXPIRATIONS(COMPANY_CODE_SYS01,DOC_TYPE,DOC_YEAR,DOC_NUMBER,DOC_SEQUENCE,PROGRESSIVE,"+
           "DOC_DATE,EXPIRATION_DATE,NAME_1,NAME_2,VALUE,DESCRIPTION,CUSTOMER_SUPPLIER_CODE,PROGRESSIVE_REG04,CURRENCY_CODE_REG03,"+
           "PAYMENT_TYPE_CODE_REG11,PAYED,REAL_PAYMENT_TYPE_CODE_REG11,PAYED_DATE,PAYED_VALUE,REAL_ACCOUNT_CODE_ACC02,ROUNDING_ACCOUNT_CODE_ACC02,ALREADY_PAYED,CREATE_USER,CREATE_DATE) "+
           "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
       );

       long startTime = docVO.getDocDateDOC06().getTime(); // invoice date...
       if (payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_END_MONTH)) {
         Calendar cal = Calendar.getInstance();
         cal.setTimeInMillis(startTime);
         if (cal.get(cal.MONTH)==10 || cal.get(cal.MONTH)==3 || cal.get(cal.MONTH)==5 || cal.get(cal.MONTH)==8)
           cal.set(cal.DAY_OF_MONTH,30);
         else if (cal.get(cal.MONTH)==1) {
           if (cal.get(cal.YEAR)%4==0)
             cal.set(cal.DAY_OF_MONTH,29);
           else
             cal.set(cal.DAY_OF_MONTH,28);
         } else
           cal.set(cal.DAY_OF_MONTH,31);
         startTime = cal.getTime().getTime();
       }
       BigDecimal amount = null;
       for(int i=0;i<rows.size();i++) {
         inVO = (PaymentInstalmentVO)rows.get(i);
         pstmt.setString(1,docVO.getCompanyCodeSys01DOC06());
         pstmt.setString(2,docVO.getDocTypeDOC06());
         pstmt.setBigDecimal(3,docVO.getDocYearDOC06());
         pstmt.setBigDecimal(4,docVO.getDocNumberDOC06());
         pstmt.setBigDecimal(5,docVO.getDocSequenceDOC06());
         pstmt.setBigDecimal(6,CompanyProgressiveUtils.getInternalProgressive(docVO.getCompanyCodeSys01DOC06(),"DOC19_EXPIRATIONS","PROGRESSIVE",conn));
         pstmt.setDate(7,docVO.getDocDateDOC06());
         pstmt.setDate(8,new java.sql.Date(startTime + inVO.getInstalmentDaysREG17().longValue()*86400*1000)); // expiration date
         pstmt.setString(9,docVO.getName_1REG04());
         pstmt.setString(10,docVO.getName_2REG04());

         if (docVO.getDocTypeDOC06().equals(ApplicationConsts.PURCHASE_DEBIT_NOTE_DOC_TYPE))
           amount = docVO.getTotalDOC06().multiply(inVO.getPercentageREG17()).divide(new BigDecimal(-100),BigDecimal.ROUND_HALF_UP).setScale(docVO.getDecimalsREG03().intValue(),BigDecimal.ROUND_HALF_UP); // value
         else
           amount = docVO.getTotalDOC06().multiply(inVO.getPercentageREG17()).divide(new BigDecimal(100),BigDecimal.ROUND_HALF_UP).setScale(docVO.getDecimalsREG03().intValue(),BigDecimal.ROUND_HALF_UP); // value

         pstmt.setBigDecimal(11,CurrencyConversionUtils.convertCurrencyToCurrency(amount,conv));

         if (docVO.getDocTypeDOC06().equals(ApplicationConsts.PURCHASE_DEBIT_NOTE_DOC_TYPE))
           pstmt.setString(12,t1+" "+docVO.getDocSequenceDOC06()+"/"+docVO.getDocYearDOC06()+" - "+t2+" "+t3+" "+(i+1)+" - "+inVO.getPaymentTypeDescriptionSYS10()); // description
         else
           pstmt.setString(12,t4+" "+docVO.getDocSequenceDOC06()+"/"+docVO.getDocYearDOC06()+" - "+t2+" "+t3+" "+(i+1)+" - "+inVO.getPaymentTypeDescriptionSYS10()); // description

         pstmt.setString(13,docVO.getSupplierCodePUR01());
         pstmt.setBigDecimal(14,docVO.getProgressiveReg04DOC06());
         pstmt.setString(15,companyCurrencyCode);
         pstmt.setString(16,payVO.getPaymentTypeCodeReg11REG10());
         pstmt.setString(17,"N");
         pstmt.setString(18,null);
         pstmt.setDate(19,null);
         pstmt.setBigDecimal(20,null);
         pstmt.setString(21,payVO.getAccountCodeAcc02REG11());
         pstmt.setString(22,roundingAccountCode);
         pstmt.setBigDecimal(23,new BigDecimal(0));
         pstmt.setString(24,username);
         pstmt.setTimestamp(25,new java.sql.Timestamp(System.currentTimeMillis()));

View Full Code Here

Examples of org.jallinone.registers.payments.java.PaymentVO

                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
View Full Code Here

Examples of org.jallinone.registers.payments.java.PaymentVO

                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
                  JOptionPane.ERROR_MESSAGE
            );
          }
          else {
            PaymentVO payVO = (PaymentVO)((VOListResponse)res).getRows().get(0);
            if (payVO.getInstalmentNumberREG10().intValue()==1 &&
                payVO.getStepREG10().intValue()==0 &&
                payVO.getFirstInstalmentDaysREG10().intValue()==0 &&
                payVO.getStartDayREG10().equals(ApplicationConsts.START_DAY_INVOICE_DATE)) {
              // there is only one instalment and this instalment has 0 instalment days:
              // prompt user for an immediate payment...
              if (OptionPane.showConfirmDialog(
                    ClientUtils.getParentFrame(this),
                    "create payment immediately",
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.