diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-04 11:33:16 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-04 11:33:16 +0700 |
| commit | 7840645f90d9ec8bebaeb7c7239b7df9a7e04f53 (patch) | |
| tree | 7aa88160e565da354626a35d20e8ef75f48e0694 | |
| parent | bcc35009da39e9ee8b5e181006d3690316b83c59 (diff) | |
Add has flash sale condition on voucher API
| -rw-r--r-- | indoteknik_api/controllers/api_v1/voucher.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/voucher.py b/indoteknik_api/controllers/api_v1/voucher.py index f82e1aef..aef46375 100644 --- a/indoteknik_api/controllers/api_v1/voucher.py +++ b/indoteknik_api/controllers/api_v1/voucher.py @@ -57,7 +57,10 @@ 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 else: can_apply = True |
