projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dcc5535
)
correct package editor when taxproducts off
author
jeff
<jeff>
Tue, 16 Sep 2008 01:22:28 +0000
(
01:22
+0000)
committer
jeff
<jeff>
Tue, 16 Sep 2008 01:22:28 +0000
(
01:22
+0000)
httemplate/edit/elements/edit.html
patch
|
blob
|
history
httemplate/edit/part_pkg.cgi
patch
|
blob
|
history
httemplate/elements/tr-select-taxoverride.html
patch
|
blob
|
history
httemplate/elements/tr-select-taxproduct.html
patch
|
blob
|
history
diff --git
a/httemplate/edit/elements/edit.html
b/httemplate/edit/elements/edit.html
index
0250153
..
8352475
100644
(file)
--- a/
httemplate/edit/elements/edit.html
+++ b/
httemplate/edit/elements/edit.html
@@
-230,6
+230,11
@@
Example:
% 'disabled' => $f->{'disabled'},
% );
%
% 'disabled' => $f->{'disabled'},
% );
%
+% #selectlayers, others?
+% $include_common{$_} = $f->{$_}
+% foreach grep exists($f->{$_}),
+% qw( js_only html_only select_only layers_only cell_style);
+%
% #select-*
% $include_common{$_} = $f->{$_}
% foreach grep exists($f->{$_}), qw( empty_label );
% #select-*
% $include_common{$_} = $f->{$_}
% foreach grep exists($f->{$_}), qw( empty_label );
@@
-365,7
+370,7
@@
Example:
% 'object' => $object,
% 'cgi' => $cgi,
% 'onchange' => $onchange,
% 'object' => $object,
% 'cgi' => $cgi,
% 'onchange' => $onchange,
-%
'cell_style' => ( $fieldnum ? 'border-top:1px solid black' : ''
),
+%
( $fieldnum ? ('cell_style' => 'border-top:1px solid black') : ()
),
% );
<% include( @include ) %>
% );
<% include( @include ) %>
diff --git
a/httemplate/edit/part_pkg.cgi
b/httemplate/edit/part_pkg.cgi
index
3968c89
..
ccce830
100755
(executable)
--- a/
httemplate/edit/part_pkg.cgi
+++ b/
httemplate/edit/part_pkg.cgi
@@
-97,6
+97,11
@@
},
layer_fields => \%taxproduct_fields,
layer_values_callback => $taxproduct_values,
},
layer_fields => \%taxproduct_fields,
layer_values_callback => $taxproduct_values,
+ layers_only => !$taxproducts,
+ cell_style => ( !$taxproducts
+ ? 'display:none'
+ : ''
+ ),
},
{ type => 'tablebreak-tr-title',
},
{ type => 'tablebreak-tr-title',
@@
-167,6
+172,9
@@
die "access denied"
|| $curuser->access_right('Edit global package definitions')
|| ( $cgi->param('pkgnum') && $curuser->access_right('Customize customer package') );
|| $curuser->access_right('Edit global package definitions')
|| ( $cgi->param('pkgnum') && $curuser->access_right('Customize customer package') );
+my $conf = new FS::Conf;
+my $taxproducts = $conf->exists('enable_taxproducts');
+
#XXX
# - tr-part_pkg_freq: month_increments_only (from price plans)
# - test cloning
#XXX
# - tr-part_pkg_freq: month_increments_only (from price plans)
# - test cloning
diff --git
a/httemplate/elements/tr-select-taxoverride.html
b/httemplate/elements/tr-select-taxoverride.html
index
4954a55
..
e20d37e
100644
(file)
--- a/
httemplate/elements/tr-select-taxoverride.html
+++ b/
httemplate/elements/tr-select-taxoverride.html
@@
-9,10
+9,10
@@
<%init>
<%init>
-my $conf = new FS::
c
onf;
+my $conf = new FS::
C
onf;
my %opt = @_;
my $cell_style = $opt{'cell_style'}? 'STYLE="'. $opt{cell_style}. '"' : '';
my %opt = @_;
my $cell_style = $opt{'cell_style'}? 'STYLE="'. $opt{cell_style}. '"' : '';
-my $name = $opt{
name
} || 'tax_override';
+my $name = $opt{
element_name} || $opt{field
} || 'tax_override';
</%init>
</%init>
diff --git
a/httemplate/elements/tr-select-taxproduct.html
b/httemplate/elements/tr-select-taxproduct.html
index
9512224
..
759d0c0
100644
(file)
--- a/
httemplate/elements/tr-select-taxproduct.html
+++ b/
httemplate/elements/tr-select-taxproduct.html
@@
-9,10
+9,10
@@
<%init>
<%init>
-my $conf = new FS::
c
onf;
+my $conf = new FS::
C
onf;
my %opt = @_;
my $cell_style = $opt{cell_style} ? 'STYLE="'. $opt{cell_style}. '"' : '';
my %opt = @_;
my $cell_style = $opt{cell_style} ? 'STYLE="'. $opt{cell_style}. '"' : '';
-my $name = $opt{
name
} || 'taxproductnum';
+my $name = $opt{
element_name} || $opt{field
} || 'taxproductnum';
</%init>
</%init>