[freeside-commits] freeside/httemplate/misc order_pkg.html, 1.8, 1.9

Ivan,,, ivan at wavetail.420.am
Thu Aug 6 17:39:16 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv12311/httemplate/misc

Modified Files:
	order_pkg.html 
Log Message:
don't start recurring billing when a start date hasn't been reached yet either... and since that works, add the start date to new package order, RT#5347

Index: order_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/order_pkg.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- order_pkg.html	28 Mar 2009 22:59:36 -0000	1.8
+++ order_pkg.html	7 Aug 2009 00:39:14 -0000	1.9
@@ -1,5 +1,10 @@
 <% include('/elements/header-popup.html', 'Order new package' ) %>
 
+<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>
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
+
 <SCRIPT TYPE="text/javascript">
 
   function enable_order_pkg () {
@@ -27,6 +32,34 @@
           )
 %>
 
+%# false laziness w/edit/quick-charge.html
+<TR>
+  <TH ALIGN="right">Start date </TD>
+  <TD COLSPAN=6>
+    <INPUT TYPE  = "text"
+           NAME  = "start_date"
+           SIZE  = 32
+           ID    = "start_date_text"
+           VALUE = "<% $start_date %>"
+    >
+    <IMG SRC   = "../images/calendar.png"
+         ID    = "start_date_button"
+         STYLE = "cursor: pointer"
+         TITLE = "Select date"
+    >
+    <FONT SIZE=-1>(leave blank to start immediately)</FONT>
+  </TD>
+</TR>
+
+<SCRIPT TYPE="text/javascript">
+  Calendar.setup({
+    inputField: "start_date_text",
+    ifFormat:   "%m/%d/%Y",
+    button:     "start_date_button",
+    align:      "BR"
+  });
+</SCRIPT>
+
 % if ( $conf->exists('pkg_referral') ) {
   <% include('/elements/tr-select-part_referral.html',
                'curr_value'    => scalar( $cgi->param('refnum') ), #get rid of empty_label first# || $cust_main->refnum,
@@ -68,4 +101,8 @@
 
 my $pkgpart = scalar($cgi->param('pkgpart'));
 
+my $format = "%m/%d/%Y %T %z (%Z)"; #false laziness w/REAL_cust_pkg.cgi?
+my $start_date = $cust_main->next_bill_date;
+$start_date = $start_date ? time2str($format, $start_date) : '';
+
 </%init>



More information about the freeside-commits mailing list