public static CashierSettings loadSettings() {
    final CashierSettings cashierSettings = new CashierSettings();

    getBoolProperty(
        ADJUSTMENT_REASEON_FIELD,
        Boolean.FALSE,
        new Action1<Boolean>() {
          @Override
          public void apply(Boolean parameter) {
            cashierSettings.setAdjustmentReasonField(parameter);
          }
        });

    getBoolProperty(
        ALLOW_BILL_ADJUSTMENT,
        Boolean.FALSE,
        new Action1<Boolean>() {
          @Override
          public void apply(Boolean parameter) {
            cashierSettings.setAllowBillAdjustment(parameter);
          }
        });

    getBoolProperty(
        AUTOFILL_PAYMENT_AMOUNT,
        Boolean.FALSE,
        new Action1<Boolean>() {
          @Override
          public void apply(Boolean parameter) {
            cashierSettings.setAutoFillPaymentAmount(parameter);
          }
        });

    getIntProperty(
        ROUND_TO_NEAREST_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setCashierRoundingToNearest(parameter);
          }
        });

    getIntProperty(
        CASHIER_SHIFT_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setDefaultShiftReportId(parameter);
          }
        });

    getIntProperty(
        RECEIPT_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setDefaultReceiptReportId(parameter);
          }
        });

    String property = administrationService.getGlobalProperty(ROUNDING_MODE_PROPERTY);
    if (!StringUtils.isEmpty(property)) {
      cashierSettings.setCashierRoundingMode(property);
    }

    getBoolProperty(
        TIMESHEET_REQUIRED_PROPERTY,
        new Action1<Boolean>() {
          @Override
          public void apply(Boolean parameter) {
            cashierSettings.setCashierTimesheetRequired(parameter);
          }
        });

    getIntProperty(
        PATIENT_DASHBOARD_2_BILL_COUNT,
        DEFAULT_PATIENT_DASHBOARD_2_BILL_COUNT,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setPatientDashboard2BillCount(parameter);
          }
        });

    getIntProperty(
        DEPARTMENT_COLLECTIONS_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setDepartmentCollectionsReportId(parameter);
          }
        });

    getIntProperty(
        DEPARTMENT_REVENUE_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setDepartmentRevenueReportId(parameter);
          }
        });

    getIntProperty(
        SHIFT_SUMMARY_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setShiftSummaryReportId(parameter);
          }
        });

    getIntProperty(
        DAILY_SHIFT_SUMMARY_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setDailyShiftSummaryReportId(parameter);
          }
        });

    getIntProperty(
        PAYMENTS_BY_PAYMENT_MODE_REPORT_ID_PROPERTY,
        new Action1<Integer>() {
          @Override
          public void apply(Integer parameter) {
            cashierSettings.setPaymentsByPaymentModeReportId(parameter);
          }
        });

    return cashierSettings;
  }
  public static void saveSettings(CashierSettings cashierSettings) {
    if (cashierSettings == null) {
      throw new IllegalArgumentException("The settings to save must be defined.");
    }

    setBoolProperty(ADJUSTMENT_REASEON_FIELD, cashierSettings.getAdjustmentReasonField());
    setBoolProperty(ALLOW_BILL_ADJUSTMENT, cashierSettings.getAllowBillAdjustment());
    setBoolProperty(AUTOFILL_PAYMENT_AMOUNT, cashierSettings.getAutoFillPaymentAmount());
    setIntProperty(CASHIER_SHIFT_REPORT_ID_PROPERTY, cashierSettings.getDefaultShiftReportId());
    setIntProperty(ROUND_TO_NEAREST_PROPERTY, cashierSettings.getCashierRoundingToNearest());
    setIntProperty(RECEIPT_REPORT_ID_PROPERTY, cashierSettings.getDefaultReceiptReportId());
    setStringProperty(ROUNDING_MODE_PROPERTY, cashierSettings.getCashierRoundingMode());
    setBoolProperty(TIMESHEET_REQUIRED_PROPERTY, cashierSettings.getCashierTimesheetRequired());
    setIntProperty(PATIENT_DASHBOARD_2_BILL_COUNT, cashierSettings.getPatientDashboard2BillCount());
    setIntProperty(
        DEPARTMENT_COLLECTIONS_REPORT_ID_PROPERTY,
        cashierSettings.getDepartmentCollectionsReportId());
    setIntProperty(
        DEPARTMENT_REVENUE_REPORT_ID_PROPERTY, cashierSettings.getDepartmentRevenueReportId());
    setIntProperty(SHIFT_SUMMARY_REPORT_ID_PROPERTY, cashierSettings.getShiftSummaryReportId());
    setIntProperty(
        DAILY_SHIFT_SUMMARY_REPORT_ID_PROPERTY, cashierSettings.getDailyShiftSummaryReportId());
    setIntProperty(
        PAYMENTS_BY_PAYMENT_MODE_REPORT_ID_PROPERTY,
        cashierSettings.getPaymentsByPaymentModeReportId());
  }