summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2020-11-09 13:18:13 -0800
committerIvan Kohler <ivan@freeside.biz>2020-11-09 13:18:13 -0800
commitc855c5c3137c69bba8e801d14fcbe6821accd2ce (patch)
tree309b6722031acf836ac3f57979c3e6df5e79c527 /httemplate/search
parent9733a8e3629a43d56e44d4fbb9c3fe7ddb3a0d16 (diff)
add credit reason selection, RT#85046
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/cust_credit.html4
-rw-r--r--httemplate/search/report_cust_credit.html9
2 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/search/cust_credit.html b/httemplate/search/cust_credit.html
index 654988e2b..5214ea3c1 100755
--- a/httemplate/search/cust_credit.html
+++ b/httemplate/search/cust_credit.html
@@ -197,6 +197,10 @@ if ( $cgi->param('credbatch') =~ /^([\w\-\/\.\:]+)$/ ) {
push @search, "cust_credit.credbatch = '$1'";
}
+if ( $cgi->param('reasonnum') =~ /^(\d+)$/ && $1 ) {
+ push @search, "cust_credit.reasonnum = $1";
+}
+
# commission_salesnum
if ( $cgi->param('commission_salesnum') =~ /^(\d+)$/ ) {
push @search, "commission_salesnum = $1";
diff --git a/httemplate/search/report_cust_credit.html b/httemplate/search/report_cust_credit.html
index f7d38801b..0f25c7139 100644
--- a/httemplate/search/report_cust_credit.html
+++ b/httemplate/search/report_cust_credit.html
@@ -24,6 +24,15 @@
'field' => 'amount',
&>
+ <& /elements/tr-select-reason.html,
+ 'label' => emt('Reason').':',
+ 'field' => 'reasonnum',
+ 'reason_class' => 'R',
+ 'cgi' => $cgi,
+ 'hide_addnew' => 1,
+ 'pre_options' => [ 0 => emt('(any reason)') ],
+ &>
+
<& /elements/tr-checkbox.html,
'label' => emt('Show Voided Credits').':',
'field' => 'show_voided_credits',