X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=e03017db49812273d2e1fbce06855ac0342f0789;hb=ee1a01a4d001bf993b9cce54e59f119db20e49f0;hp=dea02f1ccd635d7f8e71fd863f19606fd788d241;hpb=a351f58cf394121aa1f72139356567c4785bf47f;p=freeside.git
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index dea02f1cc..e03017db4 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -88,6 +88,23 @@ print '>';
print '';
+my $conf = new FS::Conf;
+if ( $conf->exists('enable_taxclasses') ) {
+ print '
Disable new orders | ';
print '{disabled} eq "Y";
@@ -188,8 +205,8 @@ tie my %plans, 'Tie::IxHash',
},
},
'fieldorder' => [ 'free_days', 'setup_fee', 'recur_fee' ],
- 'setup' => 'what.setup_fee.value',
- 'recur' => '\'$sdate += 86400 * \' + what.free_days.value + \'; \' + what.recur_fee.value',
+ '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' => {
@@ -344,6 +361,14 @@ my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans;
+my @form_select = ();
+if ( $conf->exists('enable_taxclasses') ) {
+ push @form_select, 'taxclass';
+} else {
+ push @fixups, 'taxclass'; #hidden
+}
+
+
my $widget = new HTML::Widgets::SelectLayers(
'selected_layer' => $part_pkg->plan,
'options' => \%options,
@@ -351,6 +376,7 @@ my $widget = new HTML::Widgets::SelectLayers(
'form_action' => 'process/part_pkg.cgi',
'form_text' => [ qw(pkg comment freq clone pkgnum pkgpart), @fixups ],
'form_checkbox' => [ qw(setuptax recurtax disabled) ],
+ 'form_select' => [ @form_select ],
'fixup_callback' => sub {
#my $ = @_;
my $html = '';
|