projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Option to ignore old CDRs, RT#81480
[freeside.git]
/
httemplate
/
edit
/
elements
/
ApplicationCommon.html
diff --git
a/httemplate/edit/elements/ApplicationCommon.html
b/httemplate/edit/elements/ApplicationCommon.html
index
ba352fd
..
a531eaa
100644
(file)
--- a/
httemplate/edit/elements/ApplicationCommon.html
+++ b/
httemplate/edit/elements/ApplicationCommon.html
@@
-3,46
+3,45
@@
Examples:
#cust_bill_pay
Examples:
#cust_bill_pay
-
include('elements/ApplicationCommon.html'
,
- 'form_action' => 'process/cust_bill_pay.cgi
'
,
+
<& elements/ApplicationCommon.html
,
+ 'form_action' => 'process/cust_bill_pay.cgi,
'src_table' => 'cust_pay',
'src_thing' => 'payment',
'dst_table' => 'cust_bill',
'dst_thing' => 'invoice',
'src_table' => 'cust_pay',
'src_thing' => 'payment',
'dst_table' => 'cust_bill',
'dst_thing' => 'invoice',
- )
+ &>
#cust_credit_bill
#cust_credit_bill
-
include('
elements/ApplicationCommon.html',
- 'form_action' => 'process/cust_credit_bill.cgi
'
,
+
<&
elements/ApplicationCommon.html',
+ 'form_action' => 'process/cust_credit_bill.cgi,
'src_table' => 'cust_credit',
'src_thing' => 'credit',
'dst_table' => 'cust_bill',
'dst_thing' => 'invoice',
'src_table' => 'cust_credit',
'src_thing' => 'credit',
'dst_table' => 'cust_bill',
'dst_thing' => 'invoice',
- )
+ &>
#cust_pay_refund
#cust_pay_refund
-
include('
elements/ApplicationCommon.html',
- 'form_action' => 'process/cust_pay_refund.cgi
'
,
+
<&
elements/ApplicationCommon.html',
+ 'form_action' => 'process/cust_pay_refund.cgi,
'src_table' => 'cust_pay',
'src_thing' => 'payment',
'dst_table' => 'cust_refund',
'dst_thing' => 'refund',
'src_table' => 'cust_pay',
'src_thing' => 'payment',
'dst_table' => 'cust_refund',
'dst_thing' => 'refund',
- )
+ &>
#cust_credit_refund
#cust_credit_refund
-
include('elements/ApplicationCommon.html'
,
+
<& elements/ApplicationCommon.html
,
'form_action' => 'process/cust_credit_refund.cgi',
'src_table' => 'cust_credit',
'src_thing' => 'credit',
'dst_table' => 'cust_refund',
'dst_thing' => 'refund',
'form_action' => 'process/cust_credit_refund.cgi',
'src_table' => 'cust_credit',
'src_thing' => 'credit',
'dst_table' => 'cust_refund',
'dst_thing' => 'refund',
- )
+ &>
</%doc>
</%doc>
+<& /elements/header-popup.html, "Apply $src_thing$to", '', 'onLoad="myOnLoadFunction();"' &>
-<% include('/elements/header-popup.html', "Apply $src_thing$to", '', 'onLoad="myOnLoadFunction();"') %>
-
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
<P ID="ErrorMessage"></P>
<FORM ACTION="<% $p1. $opt{'form_action'} %>" NAME="ApplicationForm" ID="ApplicationForm" METHOD=POST>
<P ID="ErrorMessage"></P>
<FORM ACTION="<% $p1. $opt{'form_action'} %>" NAME="ApplicationForm" ID="ApplicationForm" METHOD=POST>
@@
-54,7
+53,7
@@
Examples:
<TR>
<TD ALIGN="right">Date: </TD>
<TR>
<TD ALIGN="right">Date: </TD>
- <TD><B><% time2str(
"%D"
, $src->_date) %></B></TD>
+ <TD><B><% time2str(
$date_format
, $src->_date) %></B></TD>
</TR>
<TR>
</TR>
<TR>
@@
-105,7
+104,7
@@
function changed(what) {
if ( dst == '' ) {
what.form.submit.disabled=true;
if ( dst == '' ) {
what.form.submit.disabled=true;
-%if ($src_pkey eq 'crednum') {
+%if ($
use_sub_dst_thing && $
src_pkey eq 'crednum') {
what.form.tax_button.disabled=true;
what.form.clear_button.disabled=true;
%}
what.form.tax_button.disabled=true;
what.form.clear_button.disabled=true;
%}
@@
-113,7
+112,7
@@
function changed(what) {
}
what.form.submit.disabled=false;
}
what.form.submit.disabled=false;
-%if ($src_pkey eq 'crednum') {
+%if ($
use_sub_dst_thing && $
src_pkey eq 'crednum') {
what.form.tax_button.disabled=false;
what.form.clear_button.disabled=false;
%}
what.form.tax_button.disabled=false;
what.form.clear_button.disabled=false;
%}
@@
-158,6
+157,7
@@
function changed(what) {
% }
% $desc .= ' (default)';
% }
% }
% $desc .= ' (default)';
% }
+% $total_owed = sprintf('%.2f', $total_owed + 0.00000001 ); #so 1.005 rounds to 1.01
% if ( $total_owed > 0 ) {
<% &{$row_generator}($key, $cbp, $desc, $total_owed, $amount, '') %>
% }
% if ( $total_owed > 0 ) {
<% &{$row_generator}($key, $cbp, $desc, $total_owed, $amount, '') %>
% }
@@
-212,11
+212,10
@@
Apply to:
</TR>
</TABLE>
</CENTER>
</TR>
</TABLE>
</CENTER>
-<
% include( '/elements/xmlhttp.html'
,
+<
& /elements/xmlhttp.html
,
'url' => $p.'misc/xmlhttp-calculate_taxes.html',
'subs' => [ 'calculate_taxes' ],
'url' => $p.'misc/xmlhttp-calculate_taxes.html',
'subs' => [ 'calculate_taxes' ],
- )
- %>
+&>
<SCRIPT TYPE="text/javascript">
function show_taxes(arg) {
<SCRIPT TYPE="text/javascript">
function show_taxes(arg) {
@@
-354,7
+353,7
@@
function src_amount_changed () {
<OPTION VALUE="">Select <% $dst_thing %>
% foreach my $dst ( @dst ) {
<OPTION VALUE="">Select <% $dst_thing %>
% foreach my $dst ( @dst ) {
- <OPTION<% $dst->$dst_pkey eq $dst_pkeyvalue ? ' SELECTED' : '' %> VALUE="<% $dst->$dst_pkey %>">#<% $dst->$dst_pkey %> - <% time2str(
"%D"
, $dst->_date) %> - $<% $dst->$dst_unapplied %>
+ <OPTION<% $dst->$dst_pkey eq $dst_pkeyvalue ? ' SELECTED' : '' %> VALUE="<% $dst->$dst_pkey %>">#<% $dst->$dst_pkey %> - <% time2str(
$date_format
, $dst->_date) %> - $<% $dst->$dst_unapplied %>
% }
</SELECT>
% }
</SELECT>
@@
-392,14
+391,14
@@
function myOnLoadFunction () {
</SCRIPT>
</SCRIPT>
-<% include('/elements/footer.html') %>
-
+<& /elements/footer-popup.html &>
<%init>
my %opt = @_;
my $conf = new FS::Conf;
<%init>
my %opt = @_;
my $conf = new FS::Conf;
-my $money_char = $conf->config('money_char') || '$';
+my $money_char = $conf->config('money_char') || '$';
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
my $src_thing = ucfirst($opt{'src_thing'});
my $src_table = $opt{'src_table'};
my $src_thing = ucfirst($opt{'src_thing'});
my $src_table = $opt{'src_table'};
@@
-426,6
+425,8
@@
$can_change_credit = 1
my $to = $dst_table eq 'cust_refund' ? ' to Refund' : '';
my $to = $dst_table eq 'cust_refund' ? ' to Refund' : '';
+$m->comp('/elements/handle_uri_query');
+
my($src_pkeyvalue, $amount, $dst_pkeyvalue, $src_amount);
if ( $cgi->param('error') ) {
$src_pkeyvalue = $cgi->param($src_pkey);
my($src_pkeyvalue, $amount, $dst_pkeyvalue, $src_amount);
if ( $cgi->param('error') ) {
$src_pkeyvalue = $cgi->param($src_pkey);
@@
-440,8
+441,6
@@
if ( $cgi->param('error') ) {
$dst_pkeyvalue = '';
}
$dst_pkeyvalue = '';
}
-my $otaker = getotaker;
-
my $p1 = popurl(1);
my $src = qsearchs($src_table, { $src_pkey => $src_pkeyvalue } );
my $p1 = popurl(1);
my $src = qsearchs($src_table, { $src_pkey => $src_pkeyvalue } );