Skip to content
Snippets Groups Projects

voucher model modified

Merged Piotr Gawron requested to merge 211-voucher-data into master

Voucher number follow naming schema: {ND_NUMBER}-{DATE}-{VOUCHER_TYPE_CODE}-{VOUCHER_PARTNER_CODE}-{SEQ_NUMBER}{CHECKSUM}

Single voucher is issued for some hours to be used. These hours can be used in few sessions by corresponding voucher partner.

Closes #211 (closed)

Edited by Piotr Gawron

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 85 85 GLOBAL_STUDY_ID = 1
    86 86
    87 87 VOUCHER_STATUS_NEW = "NEW"
    88 VOUCHER_STATUS_IN_USE = "IN_USE"
    88 89 VOUCHER_STATUS_USED = "USED"
    89 90 VOUCHER_STATUS_EXPIRED = "EXPIRED"
    90 91 VOUCHER_STATUS_CHOICES = (
    91 92 (VOUCHER_STATUS_NEW, 'New'),
    93 (VOUCHER_STATUS_IN_USE, 'In use'),
    92 94 (VOUCHER_STATUS_USED, 'Used'),
    93 95 (VOUCHER_STATUS_EXPIRED, 'Expired'),
    94 96 )
  • 59 59 </div>
    60 60 </div><!-- /.box-footer -->
    61 61 </form>
    62 </div>
    62 {% if voucher.id %}
    63 <h3 class="box-title">List of voucher partner sessions
    64 {% if voucher.status == 'NEW' or voucher.status == 'IN_USE' %}
    65
  • Screen_Shot_2018-06-05_at_09.37.57

    Hi,

    Is it expected that when I try to create voucher partners, they are disabled?

  • Piotr Gawron added 1 commit

    added 1 commit

    • 7949ed91 - multiple === operators changed into "in" operator

    Compare with previous version

  • Disabled means that person cannot log in. So the value is correct. The thing is that voucher partners shouldn't be able to log in at all. So in this context it shouldn't be visible.

  • Screen_Shot_2018-06-06_at_14.55.02

    the help message still mentions contact attempt on the add price button ;)

  • with this merge request is there a way to already create a voucher with the UI?

  • Yes, but you need to change single parameter in the database:

    update web_studycolumns set vouchers=true, voucher_types=true where id in (select id from web_study);

    Now you should have access to add voucher button in the subject page.

  • thanks, I have the button now (maybe it could be hidden for diseases and resigned subjects?). However, the list of voucher types is empty. I think that's because my db table web_studysubject_voucher_types is empty. Should I add something there?

  • You can do it in Configuration->Voucher types

  • ok, thanks. beside my minor comments above, it looks good I think.

  • Valentin Groues mentioned in commit e0d00b85

    mentioned in commit e0d00b85

  • Piotr Gawron mentioned in merge request !141 (merged)

    mentioned in merge request !141 (merged)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading