summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_pkg_quantity.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-03-26 17:01:10 -0700
committerMark Wells <mark@freeside.biz>2013-03-26 17:01:51 -0700
commit6a42226f7f1779974316111cb178a3c6a6d74931 (patch)
treea0c5285a1ca67f4d009fe0a378f08b027e6b5a0f /httemplate/edit/cust_pkg_quantity.html
parent092d75e50a900003904f8e400d6d102ba5bd16f9 (diff)
UI to change package quantities, #18330
Diffstat (limited to 'httemplate/edit/cust_pkg_quantity.html')
-rwxr-xr-xhttemplate/edit/cust_pkg_quantity.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/httemplate/edit/cust_pkg_quantity.html b/httemplate/edit/cust_pkg_quantity.html
new file mode 100755
index 000000000..ec47ed6cb
--- /dev/null
+++ b/httemplate/edit/cust_pkg_quantity.html
@@ -0,0 +1,49 @@
+<& /elements/header-popup.html, "Change Quantity" &>
+<& /elements/error.html &>
+
+<FORM ACTION="<% $p %>edit/process/cust_pkg_quantity.html" METHOD=POST>
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
+<& /elements/table-grid.html, 'bgcolor' => '#cccccc', 'cellpadding' => 2 &>
+
+ <TR>
+ <TH ALIGN="right">Current package&nbsp;</TH>
+ <TD CLASS="grid">
+ <% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
+ </TD>
+ </TR>
+
+<& /elements/tr-input-text.html,
+ 'field' => 'quantity',
+ 'curr_value' => $cust_pkg->quantity,
+ 'label' => emt('Quantity')
+&>
+
+</TABLE>
+
+<BR>
+<INPUT NAME="submit" TYPE="submit" VALUE="Change">
+
+</FORM>
+</BODY>
+</HTML>
+
+<%init>
+
+#some false laziness w/misc/change_pkg.cgi
+
+my $conf = new FS::Conf;
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied"
+ unless $curuser->access_right('Change customer package');
+
+my $pkgnum = scalar($cgi->param('pkgnum'));
+$pkgnum =~ /^(\d+)$/ or die "illegal pkgnum $pkgnum";
+$pkgnum = $1;
+
+my $cust_pkg = FS::cust_pkg->by_key($pkgnum) or die "unknown pkgnum $pkgnum";
+
+my $part_pkg = $cust_pkg->part_pkg;
+
+</%init>