|
@@ -34,7 +34,7 @@ subscription[<plan nam>-type] The type of the subscription.
|
|
|
Plan Names
|
|
|
|
|
|
free: A subscription that is freely available, libraries, friends and lovers apartment, etc. that has a computer.
|
|
|
- The value of this plan is always 1 and the subscription_date is 0.
|
|
|
+ The value of this plan is always 1 and the subscription date is 0.
|
|
|
|
|
|
mobile: Mobile telephone (only internet or calls too?) and laptop if taken somewhere else.
|
|
|
If at a location where subscription['free'] is used, she has to ask first to be able to use her own laptop
|
|
@@ -172,7 +172,7 @@ if $ARGS[0] = 'transfer_subscription':
|
|
|
allowed = allowed and func('internet_mobile', 'check_allowed_location', $ARGS[2])
|
|
|
if allowed:
|
|
|
subscription[$ARGS[2]] = subscription[$ARGS[1]]
|
|
|
- subscription_date['<<ARGS[2]>>-date'] = subscription['<<$ARGS[1]>>-date']
|
|
|
+ subscription['<<ARGS[2]>>-date'] = subscription['<<$ARGS[1]>>-date']
|
|
|
subscription['<<ARGS[2]>>-price'] = subscription['<<$ARGS[1]>>-price']
|
|
|
subscription['<<ARGS[2]>>-discount'] = subscription['<<$ARGS[1]>>-discount']
|
|
|
!! This one is always 1 because only type 1 subscriptions can be transferred, but making it "future proof"
|
|
@@ -287,7 +287,8 @@ if $ARGS[0] = 'send_sms':
|
|
|
end
|
|
|
|
|
|
!! Using the internet - if metered, it lowers the minutes left
|
|
|
-!! $ARGS[1] - the name of the subscription used
|
|
|
+!! $ARGS[1] - the name of the subscription used (this could be completely unnecessary, at this point there is an active
|
|
|
+!! $access which holds the subscription used.)
|
|
|
!! ARGS[2] - the number of minutes used
|
|
|
if $ARGS[0] = 'use_internet':
|
|
|
if $subscription['<<$ARGS[1]>>-type'] = 'metered':
|
|
@@ -300,7 +301,8 @@ end
|
|
|
!! but monthly subscription can end abruptly too if she did not pay.
|
|
|
!! Use it as a func() returns 1 or 0 based on the subscription[$ARGS[1]] value
|
|
|
!!
|
|
|
-!! $ARGS[1] - the name of the subscription
|
|
|
+!! $ARGS[1] - the name of the subscription (this could be completely unnecessary, at this point there is an active
|
|
|
+!! $access which holds the subscription used.)
|
|
|
if $ARGS[0] = 'check_internet_access':
|
|
|
if subscription[$ARGS[1]] > 0: result = 1
|
|
|
end
|