summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authormark <mark>2011-12-08 21:13:17 +0000
committermark <mark>2011-12-08 21:13:17 +0000
commitce1b61e7d65317a74f680afb4cb8d8306e14fa5f (patch)
tree5adb1b9b7b6afc37ebc03bc29aa32fabb8cb373e /httemplate/misc
parentd8d63a28503d40743425dceda7e0b744739eeb2a (diff)
promised payment date for invoices, #13554
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/cust_bill-promised_date.html19
-rw-r--r--httemplate/misc/process/cust_bill-promised_date.html19
2 files changed, 38 insertions, 0 deletions
diff --git a/httemplate/misc/cust_bill-promised_date.html b/httemplate/misc/cust_bill-promised_date.html
new file mode 100644
index 000000000..7b7b9601d
--- /dev/null
+++ b/httemplate/misc/cust_bill-promised_date.html
@@ -0,0 +1,19 @@
+<& /elements/header-popup.html, 'Edit promised date' &>
+<FORM method="POST" action="process/cust_bill-promised_date.html">
+<B><% emt('Invoice #[_1]', $invnum) %></B><BR>
+<% ntable('cccccc',2) %>
+<INPUT TYPE="hidden" NAME="invnum" VALUE="<%$invnum%>">
+<& /elements/tr-input-date-field.html,
+ 'promised_date',
+ $cust_bill->promised_date,
+ emt('Promised date'),
+&>
+</TABLE>
+<INPUT TYPE="submit" NAME="submit" VALUE="<% emt('Set date') %>">
+</FORM>
+<& /elements/footer.html &>
+<%init>
+my ($invnum) = $cgi->keywords;
+$invnum =~ /^\d+$/ or die "Illegal invnum";
+my $cust_bill = qsearchs('cust_bill', { invnum => $invnum });
+</%init>
diff --git a/httemplate/misc/process/cust_bill-promised_date.html b/httemplate/misc/process/cust_bill-promised_date.html
new file mode 100644
index 000000000..298b13007
--- /dev/null
+++ b/httemplate/misc/process/cust_bill-promised_date.html
@@ -0,0 +1,19 @@
+<SCRIPT TYPE="text/javascript">window.top.location.reload()</SCRIPT>
+<%init>
+# XXX ACL?
+
+$cgi->param('invnum') =~ /^(\d+)$/
+ or die "Illegal invnum";
+my $invnum = $1;
+
+my $promised_date = '';
+if ( length($cgi->param('promised_date')) ) {
+ $promised_date = parse_datetime($cgi->param('promised_date'))
+ or die "Illegal promised_date";
+}
+
+my $cust_bill = qsearchs('cust_bill', { invnum => $invnum });
+$cust_bill->promised_date($promised_date);
+my $error = $cust_bill->replace;
+die $error if $error; # nothing fancy here
+</%init>