[freeside-commits] branch master updated. b9fcddbb0539d7632c7e6660ef0d568277a63f49
Ivan
ivan at 420.am
Wed Dec 26 10:05:32 PST 2012
The branch, master has been updated
via b9fcddbb0539d7632c7e6660ef0d568277a63f49 (commit)
via d7e62d5ea2b5d3f3c7b8ba3da39cce1a606dc3d3 (commit)
via ed3f4acc185d842d4d656b508e364db918378240 (commit)
from 9cedd28800e1c77dd53adab3027494a6f2e1b2cf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b9fcddbb0539d7632c7e6660ef0d568277a63f49
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Dec 26 10:05:31 2012 -0800
fix report classes when cloning, RT#20753
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 50aeb45..c3f4f88 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -409,20 +409,8 @@ my $new_object_callback = sub {
};
-my $edit_callback = sub {
- my( $cgi, $object, $fields, $opt ) = @_;
-
- $setup_show_zero_disabled = ($object->option('setup_fee') > 0) ? 1 : 0;
-
- $recur_disabled = $object->freq ? 0 : 1;
-
- $recur_show_zero_disabled =
- $object->freq
- ? $object->option('recur_fee') > 0 ? 1 : 0
- : 1;
-
- (@agent_type) =
- map {$_->typenum} qsearch('type_pkgs', { 'pkgpart' => $object->pkgpart } );
+sub set_report_option {
+ my($cgi, $object, $fields ) = @_; #, $opt
my @report_option = ();
foreach ($object->options) {
@@ -445,6 +433,25 @@ my $edit_callback = sub {
$field->{value} = join(',', @report_option);
}
+}
+
+my $edit_callback = sub {
+ my( $cgi, $object, $fields, $opt ) = @_;
+
+ $setup_show_zero_disabled = ($object->option('setup_fee') > 0) ? 1 : 0;
+
+ $recur_disabled = $object->freq ? 0 : 1;
+
+ $recur_show_zero_disabled =
+ $object->freq
+ ? $object->option('recur_fee') > 0 ? 1 : 0
+ : 1;
+
+ (@agent_type) =
+ map {$_->typenum} qsearch('type_pkgs', { 'pkgpart' => $object->pkgpart } );
+
+ set_report_option( $cgi, $object, $fields);
+
%options = $object->options;
$object->set($_ => $object->option($_, 1))
@@ -484,13 +491,15 @@ my $clone_callback = sub {
$object->disabled('Y');
- } else { #not when cloning...
+ } else { #when explicitly cloning, not customizing
(@agent_type) =
map {$_->typenum} qsearch('type_pkgs',{ 'pkgpart' => $object->pkgpart } );
}
+ set_report_option( $cgi, $object, $fields);
+
%options = $object->options;
$object->set($_ => $options{$_})
commit d7e62d5ea2b5d3f3c7b8ba3da39cce1a606dc3d3
Merge: ed3f4ac 9cedd28
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Dec 26 10:05:28 2012 -0800
Merge branch 'master' of git.freeside.biz:/home/git/freeside
commit ed3f4acc185d842d4d656b508e364db918378240
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Dec 26 10:04:18 2012 -0800
clone package def s/POST/GET/
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index e3d9de1..57a4297 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -136,7 +136,7 @@ my $html_init;
One or more service definitions are grouped together into a package
definition and given pricing information. Customers purchase packages
rather than purchase services directly.<BR><BR>
- <FORM METHOD="POST" ACTION="${p}edit/part_pkg.cgi">
+ <FORM METHOD="GET" ACTION="${p}edit/part_pkg.cgi">
<A HREF="${p}edit/part_pkg.cgi"><I>Add a new package definition</I></A>
or
!.include('/elements/select-part_pkg.html', 'element_name' => 'clone' ). qq!
-----------------------------------------------------------------------
Summary of changes:
httemplate/browse/part_pkg.cgi | 2 +-
httemplate/edit/part_pkg.cgi | 39 ++++++++++++++++++++++++---------------
2 files changed, 25 insertions(+), 16 deletions(-)
More information about the freeside-commits
mailing list