Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17359

CiviDiscount 3.1 autodiscount - age fields transposed

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      In cividiscount 3.1 CRM/CiiviDiscount/Form/Admin.php the values for age 'high' and 'low' are transposed when they're converted for storing in autodiscount, corrected function below:

        function adjustAgeFields(&$fields) {
          if (!empty($fields['contact'])) {
            if (!empty($fields['contact']['age_low'])) {
              $fields['contact']['birth_date_low'] = '- ' . $fields['contact']['age_low']['='] . ' years';
              unset($fields['contact']['age_low']);
            }
            if (!empty($fields['contact']['age_high'])) {
              $fields['contact']['birth_date_high'] = '- ' . $fields['contact']['age_high']['='] . ' years';
              unset($fields['contact']['age_high']);
            }
          }
        }
      

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              zorgalina Zorga Lina
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: