From ce1b61e7d65317a74f680afb4cb8d8306e14fa5f Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Dec 2011 21:13:17 +0000 Subject: promised payment date for invoices, #13554 --- httemplate/misc/cust_bill-promised_date.html | 19 +++++++++++++++++++ httemplate/misc/process/cust_bill-promised_date.html | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 httemplate/misc/cust_bill-promised_date.html create mode 100644 httemplate/misc/process/cust_bill-promised_date.html (limited to 'httemplate/misc') 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' &> +
+<% emt('Invoice #[_1]', $invnum) %>
+<% ntable('cccccc',2) %> + +<& /elements/tr-input-date-field.html, + 'promised_date', + $cust_bill->promised_date, + emt('Promised date'), +&> + + +
+<& /elements/footer.html &> +<%init> +my ($invnum) = $cgi->keywords; +$invnum =~ /^\d+$/ or die "Illegal invnum"; +my $cust_bill = qsearchs('cust_bill', { invnum => $invnum }); + 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 @@ + +<%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 + -- cgit v1.2.1