Package (customer-visable) | |
Comment (customer-hidden) | |
-Frequency (months) of recurring fee | |
+Frequency (months) of recurring fee | 0=no recurring fee, 1=monthly, 3=quarterly, 12=yearly |
Setup fee tax exempt |
END
@@ -100,6 +88,24 @@ print '>';
print ' |
';
+my $conf = new FS::Conf;
+#false laziness w/ view/cust_main.cgi quick order
+if ( $conf->exists('enable_taxclasses') ) {
+ print 'Tax class | |
';
+} else {
+ print
+ '';
+}
+
print 'Disable new orders | ';
print '{disabled} eq "Y";
@@ -164,11 +170,15 @@ unless ( 0 ) {
#print " |
";
}
+foreach my $f ( qw( clone pkgnum ) ) {
+ print qq!';
+}
+print '';
+
# prolly should be in database
-use Tie::IxHash;
tie my %plans, 'Tie::IxHash',
'flat' => {
- 'name' => 'Flat rate',
+ 'name' => 'Flat rate (anniversary billing)',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
@@ -182,8 +192,26 @@ tie my %plans, 'Tie::IxHash',
'recur' => 'what.recur_fee.value',
},
+ 'flat_delayed' => {
+ 'name' => 'Free for X days, then flat rate (anniversary billing)',
+ 'fields' => {
+ 'free_days' => { 'name' => 'Initial free days',
+ 'default' => 0,
+ },
+ 'setup_fee' => { 'name' => 'Setup fee for this package',
+ 'default' => 0,
+ },
+ 'recur_fee' => { 'name' => 'Recurring fee for this package',
+ 'default' => 0,
+ },
+ },
+ 'fieldorder' => [ 'free_days', 'setup_fee', 'recur_fee' ],
+ 'setup' => '\'my $d = $cust_pkg->bill || $time; $d += 86400 * \' + what.free_days.value + \'; $cust_pkg->bill($d); $cust_pkg_mod_flag=1; \' + what.setup_fee.value',
+ 'recur' => 'what.recur_fee.value',
+ },
+
'prorate' => {
- 'name' => 'First month pro-rated, then flat-rate',
+ 'name' => 'First partial month pro-rated, then flat-rate (1st of month billing)',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
@@ -197,6 +225,21 @@ tie my %plans, 'Tie::IxHash',
'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; my $mstart = timelocal(0,0,0,1,$mon,$year); my $mend = timelocal(0,0,0,1, $mon == 11 ? 0 : $mon+1, $year+($mon==11)); $sdate = $mstart; ( $part_pkg->freq - 1 ) * \' + what.recur_fee.value + \' / $part_pkg->freq + \' + what.recur_fee.value + \' / $part_pkg->freq * ($mend-$mnow) / ($mend-$mstart) ; \'',
},
+ 'subscription' => {
+ 'name' => 'First partial month full charge, then flat-rate (1st of month billing)',
+ 'fields' => {
+ 'setup_fee' => { 'name' => 'Setup fee for this package',
+ 'default' => 0,
+ },
+ 'recur_fee' => { 'name' => 'Recurring fee for this package',
+ 'default' => 0,
+ },
+ },
+ 'fieldorder' => [ 'setup_fee', 'recur_fee' ],
+ 'setup' => 'what.setup_fee.value',
+ 'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; $sdate = timelocal(0,0,0,1,$mon,$year); \' + what.recur_fee.value',
+ },
+
'flat_comission_cust' => {
'name' => 'Flat rate with recurring comission per active customer',
'fields' => {
@@ -314,159 +357,108 @@ tie my %plans, 'Tie::IxHash',
;
-%>
-
-
-
-Price plan
-
-
+tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans;
-<% my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
- split("\n", $part_pkg->plandata );
- #foreach my $layer ( 'konq_kludge', keys %plans ) {
- foreach my $layer ( 'konq_kludge', keys %plans ) {
- my $visibility = "hidden";
-%>
-
-
-