projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug with custom pricing packages when no primary service is selected
[freeside.git]
/
httemplate
/
edit
/
part_pkg.cgi
diff --git
a/httemplate/edit/part_pkg.cgi
b/httemplate/edit/part_pkg.cgi
index
cd07ac3
..
b3c389c
100755
(executable)
--- a/
httemplate/edit/part_pkg.cgi
+++ b/
httemplate/edit/part_pkg.cgi
@@
-93,7
+93,12
@@
Package information
<INPUT TYPE="text" NAME="comment" SIZE=32 VALUE="<%=$part_pkg->comment%>">
</TD>
</TR>
<INPUT TYPE="text" NAME="comment" SIZE=32 VALUE="<%=$part_pkg->comment%>">
</TD>
</TR>
-
+ <TR>
+ <TD ALIGN="right">Promotional code</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="promo_code" SIZE=32 VALUE="<%=$part_pkg->promo_code%>">
+ </TD>
+ </TR>
<TR>
<TD ALIGN="right">Disable new orders</TD>
<TD>
<TR>
<TD ALIGN="right">Disable new orders</TD>
<TD>
@@
-231,7
+236,7
@@
tie my %plans, 'Tie::IxHash', %{ FS::part_pkg::plan_info() };
my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
split("\n", ($clone_part_pkg||$part_pkg)->plandata );
my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
split("\n", ($clone_part_pkg||$part_pkg)->plandata );
-warn join("\n", map { "$_: $plandata{$_}" } keys %plandata ). "\n";
+
#
warn join("\n", map { "$_: $plandata{$_}" } keys %plandata ). "\n";
tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans;
tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans;
@@
-257,7
+262,9
@@
my $widget = new HTML::Widgets::SelectLayers(
'options' => \%options,
'form_name' => 'dummy',
'form_action' => 'process/part_pkg.cgi',
'options' => \%options,
'form_name' => 'dummy',
'form_action' => 'process/part_pkg.cgi',
- 'form_text' => [ qw(pkg comment clone pkgnum pkgpart), @fixups ],
+ 'form_text' => [ qw(pkg comment promo_code clone pkgnum pkgpart),
+ @fixups
+ ],
'form_checkbox' => [ qw(setuptax recurtax disabled) ],
'form_radio' => \@form_radio,
'form_select' => \@form_select,
'form_checkbox' => [ qw(setuptax recurtax disabled) ],
'form_radio' => \@form_radio,
'form_select' => \@form_select,
@@
-295,8
+302,11
@@
my $widget = new HTML::Widgets::SelectLayers(
? $plandata{$field}
: $href->{$field}{'default'} ).
qq!" onChange="fchanged(this)">!;
? $plandata{$field}
: $href->{$field}{'default'} ).
qq!" onChange="fchanged(this)">!;
- } elsif ( $href->{$field}{'type'} eq 'select_multiple' ) {
- $html .= qq!<SELECT MULTIPLE NAME="$field" onChange="fchanged(this)">!;
+ } elsif ( $href->{$field}{'type'} =~ /^select/ ) {
+ $html .= '<SELECT';
+ $html .= ' MULTIPLE'
+ if $href->{$field}{'type'} eq 'select_multiple';
+ $html .= qq! NAME="$field" onChange="fchanged(this)">!;
foreach my $record (
qsearch( $href->{$field}{'select_table'},
$href->{$field}{'select_hash'} )
foreach my $record (
qsearch( $href->{$field}{'select_table'},
$href->{$field}{'select_hash'} )