[freeside-commits] branch FREESIDE_3_BRANCH updated. c855c5c3137c69bba8e801d14fcbe6821accd2ce
Ivan Kohler
ivan at freeside.biz
Mon Nov 9 13:18:14 PST 2020
The branch, FREESIDE_3_BRANCH has been updated
via c855c5c3137c69bba8e801d14fcbe6821accd2ce (commit)
from 9733a8e3629a43d56e44d4fbb9c3fe7ddb3a0d16 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c855c5c3137c69bba8e801d14fcbe6821accd2ce
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Nov 9 13:18:13 2020 -0800
add credit reason selection, RT#85046
diff --git a/httemplate/elements/tr-select-reason.html b/httemplate/elements/tr-select-reason.html
index 6a21c5529..fc9ed3229 100755
--- a/httemplate/elements/tr-select-reason.html
+++ b/httemplate/elements/tr-select-reason.html
@@ -16,7 +16,7 @@ Example:
'control_button' => 'element_name', #button to be enabled when a reason is
#selected
'id' => 'element_id',
- 'hide_add' => '1', # setting this will hide the add new reason link,
+ 'hide_addnew' => '1', # setting this will hide the add new reason link,
# even if the user has access to add a new reason.
'hide_onload' => '1', # setting this will hide reason select box on page load,
# allowing for it do be displayed later.
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',
-----------------------------------------------------------------------
Summary of changes:
httemplate/elements/tr-select-reason.html | 2 +-
httemplate/search/cust_credit.html | 4 ++++
httemplate/search/report_cust_credit.html | 9 +++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list