percentage done

This commit is contained in:
Sayyid Hamid Mahdavi 2025-08-03 16:33:36 +03:30
parent 53adac2d26
commit b29e7207a9

View file

@ -38,9 +38,6 @@ class BasePromotionHandler:
class WalletPercentageHandler(BasePromotionHandler):
payee_type = 2
payee_uuid = ''
def calculate(self, **kwargs):
base_amount = kwargs.get('base_amount', 0)
@ -52,13 +49,15 @@ class WalletPercentageHandler(BasePromotionHandler):
return promotion_amount
def promote(self, promotion, **kwargs):
payee_type = self.policy.get('payee_type')
payee_uuid = self.policy.get('payee_uuid')
# promotion_amount = self.calculate(**kwargs)
try:
data = {
"uuid": str(promotion.uuid),
"payee_id": str(self.payee_uuid),
"payee_type": self.payee_type,
"payee_id": str(payee_uuid),
"payee_type": payee_type,
"amount": promotion.promotion_amount,
"details": {
'description': "for promotion",