diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-04 13:10:26 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-04 13:10:26 +0700 |
| commit | cda676bfacedf7489e091887e104a551536ffe77 (patch) | |
| tree | 30c85fd83c7880548d869c438e868f83d4ae7574 | |
| parent | 7840645f90d9ec8bebaeb7c7239b7df9a7e04f53 (diff) | |
Add has flash sale condition on voucher API
| -rw-r--r-- | indoteknik_api/controllers/api_v1/voucher.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indoteknik_api/controllers/api_v1/voucher.py b/indoteknik_api/controllers/api_v1/voucher.py index aef46375..4e099fc0 100644 --- a/indoteknik_api/controllers/api_v1/voucher.py +++ b/indoteknik_api/controllers/api_v1/voucher.py @@ -57,10 +57,9 @@ class Voucher(controller.Controller): if not has_match_manufacture: apply_status = 'UM' # Unqualified Manufacture elif subtotal < min_purchase_amount: + apply_status = 'MPA' # Minimum Purchase Amount if has_flashsale_products: - apply_status = 'HFMPA' # Has Flashsale Minimum Purchase Amount - else: - apply_status = 'MPA' # Minimum Purchase Amount + apply_status += '-HF' # Has Flashsale else: can_apply = True |
