summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
commit8861d46820af163c7de7839178b6120c9b32ab2c (patch)
treeebd723b2d1ea70f57bc52f94c80d991b5f50094a /httemplate/misc
parent49809d3653e7ac4951d36716dce3cd25ba9c3728 (diff)
time/data/etc. unit pricing add-ons, RT#24392
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/detach_pkg.html2
-rw-r--r--httemplate/misc/order_pkg.html21
-rw-r--r--httemplate/misc/xmlhttp-part_pkg_usageprice.html24
3 files changed, 45 insertions, 2 deletions
diff --git a/httemplate/misc/detach_pkg.html b/httemplate/misc/detach_pkg.html
index 366bbac3f..b2dfa389d 100755
--- a/httemplate/misc/detach_pkg.html
+++ b/httemplate/misc/detach_pkg.html
@@ -1,7 +1,5 @@
<& /elements/header-popup.html, mt("Detach Package to New Customer") &>
-<SCRIPT TYPE="text/javascript" SRC="../elements/order_pkg.js"></SCRIPT>
-
<& /elements/error.html &>
<FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/detach-cust_pkg.html" METHOD=POST>
diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html
index b06f9622c..080ba41d9 100644
--- a/httemplate/misc/order_pkg.html
+++ b/httemplate/misc/order_pkg.html
@@ -5,6 +5,12 @@
}
&>
+<& /elements/xmlhttp.html,
+ 'url' => $p.'misc/xmlhttp-part_pkg_usageprice.html',
+ 'subs' => [ 'get_part_pkg_usageprice' ],
+&>
+
+
<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
@@ -113,6 +119,21 @@
</TABLE><BR>
+%#so:
+%# - hide until you selecdt a pacakge with add-ons
+%# -lookup and display the available add-ons when
+%# -add them to the (recur if there is one, otherwise setup) price and display magically like processing fees do on edit/cust_pay.cgi
+
+%# better label?
+<FONT CLASS = "fsinnerbox-title"
+ ID = "cust_pkg_usageprice_title"
+ STYLE = "display:none"
+><% mt('Usage add-ons') |h %></FONT>
+<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 ID="cust_pkg_usageprice_table">
+
+</TABLE>
+<BR>
+
% my $discount_cust_pkg = $curuser->access_right('Discount customer package');
% my $waive_setup_fee = $curuser->access_right('Waive setup fee');
%
diff --git a/httemplate/misc/xmlhttp-part_pkg_usageprice.html b/httemplate/misc/xmlhttp-part_pkg_usageprice.html
new file mode 100644
index 000000000..d4e2d8469
--- /dev/null
+++ b/httemplate/misc/xmlhttp-part_pkg_usageprice.html
@@ -0,0 +1,24 @@
+<% encode_json( \@return ) %>\
+<%init>
+
+my( $pkgpart ) = $cgi->param('arg');
+
+#could worry about agent-virting this so you can't see the add-on pricing of
+# other agents, but not a real-world big worry
+
+my $part_pkg = qsearchs( 'part_pkg', { pkgpart=>$pkgpart } );
+
+my $num = 0;
+
+my @return = map {
+ my @inc = ('/elements/cust_pkg_usageprice.html',
+ 'usagepricepart' => $_->usagepricepart,
+ );
+
+ ( include(@inc, field=>'usagepricenum'.$num, html_only=>1 ),
+ include(@inc, field=>'usagepricenum'.$num++, js_only=>1 ),
+ );
+ }
+ $part_pkg->part_pkg_usageprice;
+
+</%init>