summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-cust_payby.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/tr-select-cust_payby.html')
-rw-r--r--httemplate/elements/tr-select-cust_payby.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-cust_payby.html b/httemplate/elements/tr-select-cust_payby.html
new file mode 100644
index 000000000..e2b2e09d1
--- /dev/null
+++ b/httemplate/elements/tr-select-cust_payby.html
@@ -0,0 +1,31 @@
+% if ( scalar(@{ $opt{'cust_payby'} }) == 0 ) {
+
+ <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'custpaybynum' %>" VALUE="">
+
+% } else {
+
+ <TR>
+ <TH ALIGN="right"><% $opt{'label'} || 'Payment via' %></TD>
+ <TD>
+ <% include( '/elements/select-cust_payby.html',
+ 'curr_value' => $custpaybynum,
+ %opt
+ )
+ %>
+ </TD>
+ </TR>
+
+% }
+
+<%init>
+
+my %opt = @_;
+my $custpaybynum = $opt{'curr_value'} || $opt{'value'};
+
+$opt{'cust_payby'} ||= [ qsearch( 'cust_payby', { custnum => $opt{custnum},
+ disabled => '',
+ }
+ )
+ ];
+
+</%init>