%info = (
'name' => 'First partial month full charge, then flat-rate (selectable billing day)',
+ 'shortname' => 'Subscription (Nth of month, full charge for first)',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
'over into current period',
'type' => 'checkbox',
},
+ 'recharge_reset' => { 'name' => 'Reset usage to these values on manual '.
+ 'package recharge',
+ 'type' => 'checkbox',
+ },
+
#it would be better if this had to be turned on, its confusing
'externalid' => { 'name' => 'Optional External ID',
'default' => '',
'upbytes', 'downbytes', 'totalbytes',
'recharge_amount', 'recharge_seconds', 'recharge_upbytes',
'recharge_downbytes', 'recharge_totalbytes',
- 'externalid' ],
- 'fieldorder' => [ 'setup_fee', 'recur_fee','cutoff_day', 'seconds',
- 'upbytes', 'downbytes', 'totalbytes',
- 'recharge_amount', 'recharge_seconds', 'recharge_upbytes',
- 'recharge_downbytes', 'recharge_totalbytes',
- 'usage_rollover',
- ],
+ 'usage_rollover', 'recharge_reset', 'externalid' ],
'freq' => 'm',
'weight' => 30,
);
$$sdate = timelocal(0,0,0,$cutoff_day,$mon,$year);
- $self->option('recur_fee');
+ my $br = $self->base_recur(@_);
+
+ my $discount = $self->calc_discount(@_);
+
+ sprintf('%.2f', $br - $discount);
}
1;