Example #1
0
    public void setReviewApproval(Integer executorId, boolean flag) {

        eLogger.audit(executorId, null,
                Constants.TABLE_BILLING_PROCESS_CONFIGURATION, configuration
                        .getId(), EventLogger.MODULE_BILLING_PROCESS,
                EventLogger.ROW_UPDATED, configuration.getReviewStatus(), null,
                null);
        configuration.setReviewStatus(flag ? Constants.REVIEW_STATUS_APPROVED
                : Constants.REVIEW_STATUS_DISAPPROVED);

    }
Example #2
0
    public Integer createUpdate(Integer executorId,
            BillingProcessConfigurationDTO dto) {
        configuration = configurationDas.findByEntity(dto.getEntity());
        if (configuration != null) {

            if (!configuration.getGenerateReport().equals(
                    dto.getGenerateReport())) {
                eLogger.audit(executorId, null,
                        Constants.TABLE_BILLING_PROCESS_CONFIGURATION,
                        configuration.getId(),
                        EventLogger.MODULE_BILLING_PROCESS,
                        EventLogger.ROW_UPDATED, new Integer(configuration
                                .getGenerateReport()), null, null);
                configuration.setGenerateReport(dto.getGenerateReport());
                configuration
                        .setReviewStatus(dto.getGenerateReport() == 1 ? Constants.REVIEW_STATUS_GENERATED
                                : Constants.REVIEW_STATUS_APPROVED);
            } else {
                eLogger.audit(executorId, null,
                        Constants.TABLE_BILLING_PROCESS_CONFIGURATION,
                        configuration.getId(),
                        EventLogger.MODULE_BILLING_PROCESS,
                        EventLogger.ROW_UPDATED, null, null, null);
            }

            configuration.setNextRunDate(dto.getNextRunDate());
        } else {
            configuration = configurationDas.create(dto.getEntity(), dto
                    .getNextRunDate(), dto.getGenerateReport());
        }

        configuration.setDaysForReport(dto.getDaysForReport());
        configuration.setDaysForRetry(dto.getDaysForRetry());
        configuration.setPeriodUnit(dto.getPeriodUnit());
        configuration.setDueDateUnitId(dto.getDueDateUnitId());
        configuration.setDueDateValue(dto.getDueDateValue());
        configuration.setDfFm(dto.getDfFm());
        configuration.setOnlyRecurring(dto.getOnlyRecurring());
        configuration.setInvoiceDateProcess(dto.getInvoiceDateProcess());
        configuration.setAutoPaymentApplication(dto.getAutoPaymentApplication());
        configuration.setMaximumPeriods(dto.getMaximumPeriods());
        configuration.setLastDayOfMonth(dto.getLastDayOfMonth());
        configuration.setProratingType(dto.getProratingType());

        return configuration.getId();
    }
Example #3
0
    /**
     * Convert a given BillingProcessConfigurationDTO into a BillingProcessConfigurationWS web-service object.
     *
     * @param dto dto to convert
     * @return converted web-service object
     */
    public static BillingProcessConfigurationWS getWS(BillingProcessConfigurationDTO dto) {
		if (null == dto)
			return null;

		BillingProcessConfigurationWS ws = new BillingProcessConfigurationWS();
		ws.setId(dto.getId());
		ws.setPeriodUnitId(dto.getPeriodUnit() != null ? dto.getPeriodUnit()
				.getId() : null);
		ws.setEntityId(dto.getEntity() != null ? dto.getEntity().getId() : null);
		ws.setNextRunDate(dto.getNextRunDate());
		ws.setGenerateReport(dto.getGenerateReport());
		ws.setRetries(dto.getRetries());
		ws.setDaysForRetry(dto.getDaysForRetry());
		ws.setDaysForReport(dto.getDaysForReport());
		ws.setReviewStatus(dto.getReviewStatus());
		ws.setDueDateUnitId(dto.getDueDateUnitId());
		ws.setDueDateValue(dto.getDueDateValue());
		ws.setDfFm(dto.getDfFm());
		ws.setOnlyRecurring(dto.getOnlyRecurring());
		ws.setInvoiceDateProcess(dto.getInvoiceDateProcess());
		ws.setMaximumPeriods(dto.getMaximumPeriods());
		ws.setAutoPaymentApplication(dto.getAutoPaymentApplication());
		ws.setLastDayOfMonth(dto.getLastDayOfMonth());
		ws.setProratingType(null != dto.getProratingType() ? dto
				.getProratingType().getOptionText() : Constants.BLANK_STRING);
		return ws;
    }
Example #4
0
    public BillingProcessConfigurationDTO getDTO() {
        BillingProcessConfigurationDTO dto = new BillingProcessConfigurationDTO();

        dto.setDaysForReport(configuration.getDaysForReport());
        dto.setDaysForRetry(configuration.getDaysForRetry());
        dto.setEntity(configuration.getEntity());
        dto.setGenerateReport(configuration.getGenerateReport());
        dto.setId(configuration.getId());
        dto.setNextRunDate(configuration.getNextRunDate());
        dto.setPeriodUnit(configuration.getPeriodUnit());
        dto.setReviewStatus(configuration.getReviewStatus());
        dto.setDueDateUnitId(configuration.getDueDateUnitId());
        dto.setDueDateValue(configuration.getDueDateValue());
        dto.setDfFm(configuration.getDfFm());
        dto.setOnlyRecurring(configuration.getOnlyRecurring());
        dto.setInvoiceDateProcess(configuration.getInvoiceDateProcess());
        dto.setMaximumPeriods(configuration.getMaximumPeriods());
        dto.setAutoPaymentApplication(configuration.getAutoPaymentApplication());
        dto.setLastDayOfMonth(configuration.getLastDayOfMonth());
        dto.setProratingType(configuration.getProratingType());

        return dto;
    }