<!DOCTYPE html>
<html lang='en'>
<head>
<title>README « sites-available « apache2 - local-COMMON - Unnamed repository; edit this file to name it for gitweb.</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-css/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-local/local.css'/>
<script type='text/javascript' src='/cgit.js'></script>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://source.jones.dk/local-COMMON/atom/apache2/sites-available/README?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='https://source.jones.dk/local-COMMON' title='local-COMMON Git repository'/>
<link rel='vcs-git' href='user@source.jones.dk:local-COMMON' title='local-COMMON Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/cgit-css/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/local-COMMON/'>local-COMMON</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='5e7f8e71833c7f72a8e626813d4a3b862e27ce77'/><select name='h' onchange='this.form.submit();'>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Unnamed repository; edit this file to name it for gitweb.</td><td class='sub right'>Jonas Smedegaard</td></tr></table>
<table class='tabs'><tr><td>
<a href='/local-COMMON/'>summary</a><a href='/local-COMMON/refs/?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>refs</a><a href='/local-COMMON/log/apache2/sites-available/README'>log</a><a class='active' href='/local-COMMON/tree/apache2/sites-available/README?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>tree</a><a href='/local-COMMON/commit/apache2/sites-available/README?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>commit</a><a href='/local-COMMON/diff/apache2/sites-available/README?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>diff</a></td><td class='form'><form class='right' method='get' action='/local-COMMON/log/apache2/sites-available/README'>
<input type='hidden' name='id' value='5e7f8e71833c7f72a8e626813d4a3b862e27ce77'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/local-COMMON/tree/?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>root</a>/<a href='/local-COMMON/tree/apache2?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>apache2</a>/<a href='/local-COMMON/tree/apache2/sites-available?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>sites-available</a>/<a href='/local-COMMON/tree/apache2/sites-available/README?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>README</a></div><div class='content'>blob: 0a542a29accb58a444234ba9daad8a9f2a5171ed (<a href='/local-COMMON/plain/apache2/sites-available/README?id=5e7f8e71833c7f72a8e626813d4a3b862e27ce77'>plain</a>)
<table summary='blob content' class='blob'>
<tr>
<td class='lines'><pre><code>'>blob: 60dfc4a3561e274665c3f49ef70f6a7fab8715cc (<a href='/ledger-smb/plain/bin/mozilla/rc.pl?h=1.2.16%2bjones&amp;id=266c26a6ea04bb2ebd17b3c5daf4dbc5c3ab6ea9'>plain</a>)
<table summary='blob content' class='blob'>
<tr>
<td class='lines'><pre><code><ol class="hl">
<li id="n_1" class="hl"><span class="hl slc">#=====================================================================</span></li>
<li id="n_2" class="hl"><span class="hl slc">#&nbsp;LedgerSMB </span></li>
<li id="n_3" class="hl"><span class="hl slc"># Small Medium Business Accounting software</span></li>
<li id="n_4" class="hl"><span class="hl slc"># </span></li>
<li id="n_5" class="hl"><span class="hl slc"># See COPYRIGHT file for copyright information</span></li>
<li id="n_6" class="hl"><span class="hl slc">#======================================================================</span></li>
<li id="n_7" class="hl"><span class="hl slc">#</span></li>
<li id="n_8" class="hl"><span class="hl slc"># This file has NOT undergone whitespace cleanup.</span></li>
<li id="n_9" class="hl"><span class="hl slc">#</span></li>
<li id="n_10" class="hl"><span class="hl slc">#======================================================================</span></li>
<li id="n_11" class="hl"><span class="hl slc">#</span></li>
<li id="n_12" class="hl"><span class="hl slc"># Account reconciliation module</span></li>
<li id="n_13" class="hl"><span class="hl slc">#</span></li>
<li id="n_14" class="hl"><span class="hl slc">#======================================================================</span></li>
<li id="n_15" class="hl"></li>
<li id="n_16" class="hl"><span class="hl kwa">use </span>LedgerSMB<span class="hl opt">::</span>RC<span class="hl opt">;</span></li>
<li id="n_17" class="hl"></li>
<li id="n_18" class="hl"><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_19" class="hl"><span class="hl slc"># end of main</span></li>
<li id="n_20" class="hl"></li>
<li id="n_21" class="hl"><span class="hl slc"># this is for our long dates</span></li>
<li id="n_22" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;January&#39;)</span></li>
<li id="n_23" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;February&#39;)</span></li>
<li id="n_24" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;March&#39;)</span></li>
<li id="n_25" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;April&#39;)</span></li>
<li id="n_26" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;May &#39;)</span></li>
<li id="n_27" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;June&#39;)</span></li>
<li id="n_28" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;July&#39;)</span></li>
<li id="n_29" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;August&#39;)</span></li>
<li id="n_30" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;September&#39;)</span></li>
<li id="n_31" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;October&#39;)</span></li>
<li id="n_32" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;November&#39;)</span></li>
<li id="n_33" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;December&#39;)</span></li>
<li id="n_34" class="hl"></li>
<li id="n_35" class="hl"><span class="hl slc"># this is for our short month</span></li>
<li id="n_36" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Jan&#39;)</span></li>
<li id="n_37" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Feb&#39;)</span></li>
<li id="n_38" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Mar&#39;)</span></li>
<li id="n_39" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Apr&#39;)</span></li>
<li id="n_40" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;May&#39;)</span></li>
<li id="n_41" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Jun&#39;)</span></li>
<li id="n_42" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Jul&#39;)</span></li>
<li id="n_43" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Aug&#39;)</span></li>
<li id="n_44" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Sep&#39;)</span></li>
<li id="n_45" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Oct&#39;)</span></li>
<li id="n_46" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Nov&#39;)</span></li>
<li id="n_47" class="hl"><span class="hl slc"># $locale-&gt;text(&#39;Dec&#39;)</span></li>
<li id="n_48" class="hl"></li>
<li id="n_49" class="hl"></li>
<li id="n_50" class="hl"><span class="hl kwa">sub </span>reconciliation <span class="hl opt">{</span></li>
<li id="n_51" class="hl">  </li>
<li id="n_52" class="hl">  RC-<span class="hl opt">&gt;</span><span class="hl kwd">paymentaccounts</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span>\<span class="hl kwb">%$form</span><span class="hl opt">);</span></li>
<li id="n_53" class="hl"></li>
<li id="n_54" class="hl">  <span class="hl kwb">$selection </span><span class="hl opt">= </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_55" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>PR<span class="hl opt">} }) { </span><span class="hl kwb">$selection </span><span class="hl opt">.= </span><span class="hl sng">&quot;&lt;option&gt;</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{accno}--</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{description}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span> <span class="hl opt">}</span></li>
<li id="n_56" class="hl"></li>
<li id="n_57" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>title<span class="hl opt">} = </span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Reconciliation&#39;</span><span class="hl opt">);</span></li>
<li id="n_58" class="hl"></li>
<li id="n_59" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>report<span class="hl opt">}) {</span></li>
<li id="n_60" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>title<span class="hl opt">} = </span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Reconciliation Report&#39;</span><span class="hl opt">);</span></li>
<li id="n_61" class="hl">    <span class="hl kwb">$cleared </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_62" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>report value<span class="hl opt">=</span><span class="hl num">1</span><span class="hl opt">&gt;</span></li>
<li id="n_63" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_64" class="hl">      <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;&lt;</span>input type<span class="hl opt">=</span>checkbox <span class="hl kwa">class</span><span class="hl opt">=</span>checkbox name<span class="hl opt">=</span>outstanding value<span class="hl opt">=</span><span class="hl num">1 </span>checked<span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_65" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Outstanding&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_66" class="hl">      <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;&lt;</span>input type<span class="hl opt">=</span>checkbox <span class="hl kwa">class</span><span class="hl opt">=</span>checkbox name<span class="hl opt">=</span>cleared value<span class="hl opt">=</span><span class="hl num">1</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_67" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Cleared&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_68" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_69" class="hl"><span class="hl opt">|;</span></li>
<li id="n_70" class="hl"></li>
<li id="n_71" class="hl">  <span class="hl opt">}</span></li>
<li id="n_72" class="hl"></li>
<li id="n_73" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>all_years<span class="hl opt">} }) {</span></li>
<li id="n_74" class="hl">    <span class="hl slc"># accounting years</span></li>
<li id="n_75" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingyear<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;option&gt;</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">;</span></li>
<li id="n_76" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>all_years<span class="hl opt">} }) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingyear<span class="hl opt">} .= </span>qq<span class="hl opt">|&lt;</span>option<span class="hl opt">&gt;</span><span class="hl kwb">$_</span><span class="hl esc">\n</span><span class="hl opt">| }</span></li>
<li id="n_77" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingmonth<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;option&gt;</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">;</span></li>
<li id="n_78" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwc">sort keys </span><span class="hl opt">%{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>all_month<span class="hl opt">} }) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingmonth<span class="hl opt">} .= </span>qq<span class="hl opt">|&lt;</span>option value<span class="hl opt">=</span><span class="hl kwb">$_</span><span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>all_month<span class="hl opt">}{</span><span class="hl kwb">$_</span><span class="hl opt">}).</span>qq<span class="hl opt">|</span><span class="hl esc">\n</span><span class="hl opt">| }</span></li>
<li id="n_79" class="hl"></li>
<li id="n_80" class="hl">    <span class="hl kwb">$selectfrom </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_81" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_82" class="hl">      <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span>right<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Period&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_83" class="hl">      <span class="hl opt">&lt;</span>td colspan<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;</span></li>
<li id="n_84" class="hl">      <span class="hl opt">&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span>month<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingmonth<span class="hl opt">}&lt;/</span><span class="hl kwc">select</span><span class="hl opt">&gt;</span></li>
<li id="n_85" class="hl">      <span class="hl opt">&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span>year<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectaccountingyear<span class="hl opt">}&lt;/</span><span class="hl kwc">select</span><span class="hl opt">&gt;</span></li>
<li id="n_86" class="hl">      <span class="hl opt">&lt;</span>input name<span class="hl opt">=</span>interval <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio value<span class="hl opt">=</span><span class="hl num">0 </span>checked<span class="hl opt">&gt;&amp;</span>nbsp<span class="hl opt">;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Current&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span></li>
<li id="n_87" class="hl">      <span class="hl opt">&lt;</span>input name<span class="hl opt">=</span>interval <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio value<span class="hl opt">=</span><span class="hl num">1</span><span class="hl opt">&gt;&amp;</span>nbsp<span class="hl opt">;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Month&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span></li>
<li id="n_88" class="hl">      <span class="hl opt">&lt;</span>input name<span class="hl opt">=</span>interval <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio value<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;&amp;</span>nbsp<span class="hl opt">;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Quarter&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span></li>
<li id="n_89" class="hl">      <span class="hl opt">&lt;</span>input name<span class="hl opt">=</span>interval <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio value<span class="hl opt">=</span><span class="hl num">12</span><span class="hl opt">&gt;&amp;</span>nbsp<span class="hl opt">;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Year&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span></li>
<li id="n_90" class="hl">      <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_91" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_92" class="hl"><span class="hl opt">|;</span></li>
<li id="n_93" class="hl">  <span class="hl opt">}</span></li>
<li id="n_94" class="hl"></li>
<li id="n_95" class="hl"></li>
<li id="n_96" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">header</span><span class="hl opt">;</span></li>
<li id="n_97" class="hl"></li>
<li id="n_98" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_99" class="hl"><span class="hl opt">&lt;</span>body<span class="hl opt">&gt;</span></li>
<li id="n_100" class="hl"></li>
<li id="n_101" class="hl"><span class="hl opt">&lt;</span>form <span class="hl kwa">method</span><span class="hl opt">=</span>post action<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>script<span class="hl opt">}&gt;</span></li>
<li id="n_102" class="hl"></li>
<li id="n_103" class="hl"><span class="hl opt">&lt;</span>table width<span class="hl opt">=</span><span class="hl num">100</span><span class="hl opt">%&gt;</span></li>
<li id="n_104" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_105" class="hl">    <span class="hl opt">&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listtop<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>title<span class="hl opt">}&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_106" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_107" class="hl">  <span class="hl opt">&lt;</span>tr height<span class="hl opt">=</span><span class="hl sng">&quot;5&quot;</span><span class="hl opt">&gt;&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_108" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_109" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_110" class="hl">      <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_111" class="hl">    <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_112" class="hl">      <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span>right nowrap<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Account&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_113" class="hl">      <span class="hl opt">&lt;</span>td colspan<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span>accno<span class="hl opt">&gt;</span><span class="hl kwb">$selection</span><span class="hl opt">&lt;</span><span class="hl kwd">/select&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_114" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_115" class="hl">    <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_116" class="hl">      <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span>right<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;From&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_117" class="hl">      <span class="hl opt">&lt;</span>td colspan<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span>fromdate size<span class="hl opt">=</span><span class="hl num">11 </span>title<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$myconfig</span><span class="hl sng">{dateformat}&quot;</span><span class="hl opt">&gt; &lt;</span>b<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;To&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;</span><span class="hl kwd">/b&gt; &lt;input name=todate size=11 title=&quot;$myconfig{dateformat}&quot;&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_118" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_119" class="hl">    <span class="hl kwb">$selectfrom</span></li>
<li id="n_120" class="hl">    <span class="hl kwb">$cleared</span></li>
<li id="n_121" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_122" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_123" class="hl">      <span class="hl opt">&lt;</span>td colspan<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;&lt;</span>input type<span class="hl opt">=</span>radio style<span class="hl opt">=</span>radio name<span class="hl opt">=</span>summary value<span class="hl opt">=</span><span class="hl num">1 </span>checked<span class="hl opt">&gt; |.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Summary&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span></li>
<li id="n_124" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>radio style<span class="hl opt">=</span>radio name<span class="hl opt">=</span>summary value<span class="hl opt">=</span><span class="hl num">0</span><span class="hl opt">&gt; |.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Detail&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_125" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_126" class="hl">    <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_127" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_128" class="hl">      <span class="hl opt">&lt;</span>td colspan<span class="hl opt">=</span><span class="hl num">3</span><span class="hl opt">&gt;&lt;</span>input type<span class="hl opt">=</span>checkbox <span class="hl kwa">class</span><span class="hl opt">=</span>checkbox name<span class="hl opt">=</span>fx_transaction value<span class="hl opt">=</span><span class="hl num">1 </span>checked<span class="hl opt">&gt; |.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Include Exchange Rate Difference&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_129" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_130" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_131" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_132" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_133" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_134" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span>hr size<span class="hl opt">=</span><span class="hl num">3 </span>noshade<span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_135" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_136" class="hl"><span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_137" class="hl"></li>
<li id="n_138" class="hl"><span class="hl opt">&lt;</span>br<span class="hl opt">&gt;</span></li>
<li id="n_139" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>nextsub value<span class="hl opt">=</span>get_payments<span class="hl opt">&gt;</span></li>
<li id="n_140" class="hl"><span class="hl opt">|;</span></li>
<li id="n_141" class="hl"></li>
<li id="n_142" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">hide_form</span><span class="hl opt">(</span><span class="hl sng">qw(path login sessionid)</span><span class="hl opt">);</span></li>
<li id="n_143" class="hl"></li>
<li id="n_144" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_145" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>submit <span class="hl kwa">class</span><span class="hl opt">=</span>submit name<span class="hl opt">=</span>action value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span><span class="hl ipl">$locale</span><span class="hl sng">-&gt;text(&#39;Continue&#39;).qq|&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_146" class="hl"></li>
<li id="n_147" class="hl"><span class="hl opt">&lt;/</span>form<span class="hl opt">&gt;</span></li>
<li id="n_148" class="hl"><span class="hl opt">|;</span></li>
<li id="n_149" class="hl"></li>
<li id="n_150" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>menubar<span class="hl opt">}) {</span></li>
<li id="n_151" class="hl">    <span class="hl kwa">require </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{path}/menu.pl&quot;</span><span class="hl opt">;</span></li>
<li id="n_152" class="hl">    <span class="hl opt">&amp;</span>menubar<span class="hl opt">;</span></li>
<li id="n_153" class="hl">  <span class="hl opt">}</span></li>
<li id="n_154" class="hl"></li>
<li id="n_155" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_156" class="hl"></li>
<li id="n_157" class="hl"><span class="hl opt">&lt;/</span>body<span class="hl opt">&gt;</span></li>
<li id="n_158" class="hl"><span class="hl opt">&lt;/</span>html<span class="hl opt">&gt;</span></li>
<li id="n_159" class="hl"><span class="hl opt">|;</span></li>
<li id="n_160" class="hl"></li>
<li id="n_161" class="hl"><span class="hl opt">}</span></li>
<li id="n_162" class="hl"></li>
<li id="n_163" class="hl"></li>
<li id="n_164" class="hl"><span class="hl kwa">sub continue </span><span class="hl opt">{ &amp;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>nextsub<span class="hl opt">} } };</span></li>
<li id="n_165" class="hl"></li>
<li id="n_166" class="hl"></li>
<li id="n_167" class="hl"><span class="hl kwa">sub </span>get_payments <span class="hl opt">{</span></li>
<li id="n_168" class="hl"></li>
<li id="n_169" class="hl">  <span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>accno<span class="hl opt">}, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>account<span class="hl opt">}) = </span><span class="hl kwc">split </span><span class="hl kwd">/--/</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>accno<span class="hl opt">};</span></li>
<li id="n_170" class="hl"></li>
<li id="n_171" class="hl">  RC-<span class="hl opt">&gt;</span><span class="hl kwd">payment_transactions</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span>\<span class="hl kwb">%$form</span><span class="hl opt">);</span></li>
<li id="n_172" class="hl">  </li>
<li id="n_173" class="hl">  <span class="hl kwb">$ml </span><span class="hl opt">= (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>category<span class="hl opt">} </span><span class="hl kwc">eq </span><span class="hl sng">&#39;A&#39;</span><span class="hl opt">) ? -</span><span class="hl num">1 </span><span class="hl opt">: </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_174" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>endingbalance<span class="hl opt">} * </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_175" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(! </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">}) {</span></li>
<li id="n_176" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">} = (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>endingbalance<span class="hl opt">} - </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_endingbalance<span class="hl opt">}) * </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_177" class="hl">  <span class="hl opt">}</span></li>
<li id="n_178" class="hl">  </li>
<li id="n_179" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl num">0</span><span class="hl opt">);</span></li>
<li id="n_180" class="hl">  </li>
<li id="n_181" class="hl">  <span class="hl opt">&amp;</span>display_form<span class="hl opt">;</span></li>
<li id="n_182" class="hl"></li>
<li id="n_183" class="hl"><span class="hl opt">}</span></li>
<li id="n_184" class="hl"></li>
<li id="n_185" class="hl"></li>
<li id="n_186" class="hl"><span class="hl kwa">sub </span>display_form <span class="hl opt">{</span></li>
<li id="n_187" class="hl">  </li>
<li id="n_188" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>report<span class="hl opt">}) {</span></li>
<li id="n_189" class="hl">    <span class="hl kwb">&#64;column_index </span><span class="hl opt">= </span><span class="hl sng">qw(transdate source name cleared debit credit)</span><span class="hl opt">;</span></li>
<li id="n_190" class="hl">  <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_191" class="hl">    <span class="hl kwb">&#64;column_index </span><span class="hl opt">= </span><span class="hl sng">qw(transdate source name cleared debit credit balance)</span><span class="hl opt">;</span></li>
<li id="n_192" class="hl">  <span class="hl opt">}</span></li>
<li id="n_193" class="hl">  </li>
<li id="n_194" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>cleared<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;R&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;|;</span></li>
<li id="n_195" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>source<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Source&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_196" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>name<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Description&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_197" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>transdate<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Date&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_198" class="hl"></li>
<li id="n_199" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>debit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Debit&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_200" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>credit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Credit&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_201" class="hl">  <span class="hl kwb">$column_header</span><span class="hl opt">{</span>balance<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listheading&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Balance&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/a&gt;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_202" class="hl"></li>
<li id="n_203" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fromdate<span class="hl opt">}) {</span></li>
<li id="n_204" class="hl">    <span class="hl kwb">$option </span><span class="hl opt">.= </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng">&lt;br&gt;&quot;</span> <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$option</span><span class="hl opt">);</span></li>
<li id="n_205" class="hl">    <span class="hl kwb">$option </span><span class="hl opt">.= </span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;From&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">date</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fromdate<span class="hl opt">}, </span><span class="hl num">1</span><span class="hl opt">);</span></li>
<li id="n_206" class="hl">  <span class="hl opt">}</span></li>
<li id="n_207" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>todate<span class="hl opt">}) {</span></li>
<li id="n_208" class="hl">    <span class="hl kwb">$option </span><span class="hl opt">.= </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng">&lt;br&gt;&quot;</span> <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$option</span><span class="hl opt">);</span></li>
<li id="n_209" class="hl">    <span class="hl kwb">$option </span><span class="hl opt">.= </span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;To&#39;</span><span class="hl opt">).</span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">date</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>todate<span class="hl opt">}, </span><span class="hl num">1</span><span class="hl opt">);</span></li>
<li id="n_210" class="hl">  <span class="hl opt">}</span></li>
<li id="n_211" class="hl"></li>
<li id="n_212" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>title<span class="hl opt">} = </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{accno}--</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{account}&quot;</span><span class="hl opt">;</span></li>
<li id="n_213" class="hl">  </li>
<li id="n_214" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">header</span><span class="hl opt">;</span></li>
<li id="n_215" class="hl"></li>
<li id="n_216" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_217" class="hl"><span class="hl opt">&lt;</span>body<span class="hl opt">&gt;</span></li>
<li id="n_218" class="hl"></li>
<li id="n_219" class="hl"><span class="hl opt">&lt;</span>form <span class="hl kwa">method</span><span class="hl opt">=</span>post action<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>script<span class="hl opt">}&gt;</span></li>
<li id="n_220" class="hl"></li>
<li id="n_221" class="hl"><span class="hl opt">&lt;</span>table width<span class="hl opt">=</span><span class="hl num">100</span><span class="hl opt">%&gt;</span></li>
<li id="n_222" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_223" class="hl">    <span class="hl opt">&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listtop<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>title<span class="hl opt">}&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_224" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_225" class="hl">  <span class="hl opt">&lt;</span>tr height<span class="hl opt">=</span><span class="hl sng">&quot;5&quot;</span><span class="hl opt">&gt;&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_226" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_227" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$option</span><span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_228" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_229" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_230" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_231" class="hl">      <span class="hl opt">&lt;</span>table width<span class="hl opt">=</span><span class="hl num">100</span><span class="hl opt">%&gt;</span></li>
<li id="n_232" class="hl">    <span class="hl opt">&lt;</span>tr <span class="hl kwa">class</span><span class="hl opt">=</span>listheading<span class="hl opt">&gt;</span></li>
<li id="n_233" class="hl"><span class="hl opt">|;</span></li>
<li id="n_234" class="hl"></li>
<li id="n_235" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwb">&#64;column_index</span><span class="hl opt">) { </span><span class="hl kwc">print </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng"></span><span class="hl ipl">$column_header</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}&quot;</span> <span class="hl opt">}</span></li>
<li id="n_236" class="hl"></li>
<li id="n_237" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_238" class="hl">        <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_239" class="hl"><span class="hl opt">|;</span></li>
<li id="n_240" class="hl"></li>
<li id="n_241" class="hl">  <span class="hl kwb">$ml </span><span class="hl opt">= (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>category<span class="hl opt">} </span><span class="hl kwc">eq </span><span class="hl sng">&#39;A&#39;</span><span class="hl opt">) ? -</span><span class="hl num">1 </span><span class="hl opt">: </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_242" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>beginningbalance<span class="hl opt">} *= </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_243" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_balance<span class="hl opt">} *= </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_244" class="hl">  </li>
<li id="n_245" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(! </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">}) {</span></li>
<li id="n_246" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>beginningbalance<span class="hl opt">} -= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_balance<span class="hl opt">};</span></li>
<li id="n_247" class="hl">  <span class="hl opt">}</span></li>
<li id="n_248" class="hl">  <span class="hl kwb">$balance </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>beginningbalance<span class="hl opt">};</span></li>
<li id="n_249" class="hl">  </li>
<li id="n_250" class="hl">  <span class="hl kwb">$i </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_251" class="hl">  <span class="hl kwb">$j </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_252" class="hl">  </li>
<li id="n_253" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(cleared transdate source debit credit)</span><span class="hl opt">) { </span><span class="hl kwb">$column_data</span><span class="hl opt">{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;</span> <span class="hl opt">}</span></li>
<li id="n_254" class="hl"></li>
<li id="n_255" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(! </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>report<span class="hl opt">}) {</span></li>
<li id="n_256" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>name<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Beginning Balance&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_257" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>balance<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$balance</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl num">0</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_258" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_259" class="hl">    <span class="hl opt">&lt;</span>tr <span class="hl kwa">class</span><span class="hl opt">=</span>listrow<span class="hl kwb">$j</span><span class="hl opt">&gt;</span></li>
<li id="n_260" class="hl"><span class="hl opt">|;</span></li>
<li id="n_261" class="hl"></li>
<li id="n_262" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwb">&#64;column_index</span><span class="hl opt">) { </span><span class="hl kwc">print </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng"></span><span class="hl ipl">$column_data</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}&quot;</span> <span class="hl opt">}</span></li>
<li id="n_263" class="hl"></li>
<li id="n_264" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_265" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_266" class="hl"><span class="hl opt">|;</span></li>
<li id="n_267" class="hl">  <span class="hl opt">}</span></li>
<li id="n_268" class="hl"></li>
<li id="n_269" class="hl"></li>
<li id="n_270" class="hl">  <span class="hl kwa">foreach </span><span class="hl kwb">$ref </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>PR<span class="hl opt">} }) {</span></li>
<li id="n_271" class="hl"></li>
<li id="n_272" class="hl">    <span class="hl kwb">$i++</span><span class="hl opt">;</span></li>
<li id="n_273" class="hl"></li>
<li id="n_274" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(! </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">}) {</span></li>
<li id="n_275" class="hl">      <span class="hl kwa">next if </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">};</span></li>
<li id="n_276" class="hl">    <span class="hl opt">}</span></li>
<li id="n_277" class="hl"></li>
<li id="n_278" class="hl">    <span class="hl kwb">$checked </span><span class="hl opt">= (</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>cleared<span class="hl opt">}) ? </span><span class="hl sng">&quot;checked&quot;</span> <span class="hl opt">: </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_279" class="hl">    </li>
<li id="n_280" class="hl">    <span class="hl kwb">%temp </span><span class="hl opt">= ();</span></li>
<li id="n_281" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(!</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">}) {</span></li>
<li id="n_282" class="hl">      <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(name source transdate)</span><span class="hl opt">) { </span><span class="hl kwb">$temp</span><span class="hl opt">{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} }</span></li>
<li id="n_283" class="hl">    <span class="hl opt">}</span></li>
<li id="n_284" class="hl">      </li>
<li id="n_285" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>name<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_286" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$temp</span><span class="hl opt">{</span>name<span class="hl opt">} }) { </span><span class="hl kwb">$column_data</span><span class="hl opt">{</span>name<span class="hl opt">} .= </span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">&lt;br&gt;&quot;</span> <span class="hl opt">}</span></li>
<li id="n_287" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>name<span class="hl opt">} .= </span><span class="hl sng">&quot;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_288" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>source<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$temp</span><span class="hl opt">{</span>source<span class="hl opt">}&amp;</span>nbsp<span class="hl opt">;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_289" class="hl">    <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;id_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>id<span class="hl opt">}&gt;|;</span></li>
<li id="n_290" class="hl">    </li>
<li id="n_291" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>debit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_292" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>credit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_293" class="hl">    </li>
<li id="n_294" class="hl">    <span class="hl kwb">$balance </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_295" class="hl"></li>
<li id="n_296" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} &lt; </span><span class="hl num">0</span><span class="hl opt">) {</span></li>
<li id="n_297" class="hl">      </li>
<li id="n_298" class="hl">      <span class="hl kwb">$totaldebits </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * -</span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_299" class="hl"></li>
<li id="n_300" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>debit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * -</span><span class="hl num">1</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_301" class="hl">      </li>
<li id="n_302" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_303" class="hl">      </li>
<li id="n_304" class="hl">      <span class="hl kwb">$totalcredits </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">};</span></li>
<li id="n_305" class="hl"></li>
<li id="n_306" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>credit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_307" class="hl">      </li>
<li id="n_308" class="hl">    <span class="hl opt">}</span></li>
<li id="n_309" class="hl">    </li>
<li id="n_310" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>balance<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$balance</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl num">0</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/td&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_311" class="hl"></li>
<li id="n_312" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>fx_transaction<span class="hl opt">}) {</span></li>
<li id="n_313" class="hl"></li>
<li id="n_314" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>cleared<span class="hl opt">} = (</span><span class="hl kwb">$clearfx</span><span class="hl opt">) ? </span>qq<span class="hl opt">|&lt;</span>td align<span class="hl opt">=</span>center<span class="hl opt">&gt;*&lt;</span><span class="hl kwd">/td&gt;| : qq|&lt;td&gt;&amp;nbsp;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_315" class="hl">      <span class="hl kwb">$cleared </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * </span><span class="hl kwb">$ml </span><span class="hl kwa">if </span><span class="hl kwb">$clearfx</span><span class="hl opt">;</span></li>
<li id="n_316" class="hl">      </li>
<li id="n_317" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_318" class="hl">      </li>
<li id="n_319" class="hl">      <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>report<span class="hl opt">}) {</span></li>
<li id="n_320" class="hl">    </li>
<li id="n_321" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>cleared<span class="hl opt">}) {</span></li>
<li id="n_322" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>cleared<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td align<span class="hl opt">=</span>center<span class="hl opt">&gt;*&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_323" class="hl">      <span class="hl kwb">$clearfx </span><span class="hl opt">= </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_324" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_325" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>cleared<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&amp;</span>nbsp<span class="hl opt">;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_326" class="hl">      <span class="hl kwb">$clearfx </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_327" class="hl">    <span class="hl opt">}</span></li>
<li id="n_328" class="hl">    </li>
<li id="n_329" class="hl">      <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_330" class="hl"></li>
<li id="n_331" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>oldcleared<span class="hl opt">}) {</span></li>
<li id="n_332" class="hl">      <span class="hl kwb">$cleared </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * </span><span class="hl kwb">$ml</span><span class="hl opt">;</span></li>
<li id="n_333" class="hl">      <span class="hl kwb">$clearfx </span><span class="hl opt">= </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_334" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>cleared<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td align<span class="hl opt">=</span>center<span class="hl opt">&gt;*&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_335" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;cleared_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>cleared<span class="hl opt">}&gt;</span></li>
<li id="n_336" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;oldcleared_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>oldcleared<span class="hl opt">}&gt;</span></li>
<li id="n_337" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;source_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$ref</span><span class="hl sng">-&gt;{source}&quot;</span><span class="hl opt">&gt;|;</span></li>
<li id="n_338" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_339" class="hl">      <span class="hl kwb">$cleared </span><span class="hl opt">+= </span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>amount<span class="hl opt">} * </span><span class="hl kwb">$ml </span><span class="hl kwa">if </span><span class="hl kwb">$checked</span><span class="hl opt">;</span></li>
<li id="n_340" class="hl">      <span class="hl kwb">$clearfx </span><span class="hl opt">= (</span><span class="hl kwb">$checked</span><span class="hl opt">) ? </span><span class="hl num">1 </span><span class="hl opt">: </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_341" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>cleared<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td align<span class="hl opt">=</span>center<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span><span class="hl sng">&quot;cleared_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> type<span class="hl opt">=</span>checkbox <span class="hl kwa">class</span><span class="hl opt">=</span>checkbox value<span class="hl opt">=</span><span class="hl num">1 </span><span class="hl kwb">$checked</span><span class="hl opt">&gt;</span></li>
<li id="n_342" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;source_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$ref</span><span class="hl sng">-&gt;{source}&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_343" class="hl">    <span class="hl opt">}</span></li>
<li id="n_344" class="hl">    </li>
<li id="n_345" class="hl">      <span class="hl opt">}</span></li>
<li id="n_346" class="hl">    <span class="hl opt">}</span></li>
<li id="n_347" class="hl">    </li>
<li id="n_348" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>transdate<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$temp</span><span class="hl opt">{</span>transdate<span class="hl opt">}&amp;</span>nbsp<span class="hl opt">;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_349" class="hl">    <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span><span class="hl sng">&quot;transdate_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> value<span class="hl opt">=</span><span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>transdate<span class="hl opt">}&gt;|;</span></li>
<li id="n_350" class="hl"></li>
<li id="n_351" class="hl">    <span class="hl kwb">$j++</span><span class="hl opt">; </span><span class="hl kwb">$j </span><span class="hl opt">%= </span><span class="hl num">2</span><span class="hl opt">;</span></li>
<li id="n_352" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_353" class="hl">    <span class="hl opt">&lt;</span>tr <span class="hl kwa">class</span><span class="hl opt">=</span>listrow<span class="hl kwb">$j</span><span class="hl opt">&gt;</span></li>
<li id="n_354" class="hl"><span class="hl opt">|;</span></li>
<li id="n_355" class="hl"></li>
<li id="n_356" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwb">&#64;column_index</span><span class="hl opt">) { </span><span class="hl kwc">print </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng"></span><span class="hl ipl">$column_data</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}&quot;</span> <span class="hl opt">}</span></li>
<li id="n_357" class="hl"></li>
<li id="n_358" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_359" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_360" class="hl"><span class="hl opt">|;</span></li>
<li id="n_361" class="hl"></li>
<li id="n_362" class="hl">  <span class="hl opt">}</span></li>
<li id="n_363" class="hl"></li>
<li id="n_364" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">} = </span><span class="hl kwb">$i</span><span class="hl opt">;</span></li>
<li id="n_365" class="hl">  </li>
<li id="n_366" class="hl">  <span class="hl slc"># print totals</span></li>
<li id="n_367" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwb">&#64;column_index</span><span class="hl opt">) { </span><span class="hl kwb">$column_data</span><span class="hl opt">{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl sng">&quot;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;</span> <span class="hl opt">}</span></li>
<li id="n_368" class="hl"></li>
<li id="n_369" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>debit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listtotal align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$totaldebits</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_370" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>credit<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th class=listtotal align=right&gt;&quot;</span><span class="hl opt">.</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$totalcredits</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl sng">&quot;&amp;nbsp;&quot;</span><span class="hl opt">).</span><span class="hl sng">&quot;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_371" class="hl">   </li>
<li id="n_372" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_373" class="hl">    <span class="hl opt">&lt;</span>tr <span class="hl kwa">class</span><span class="hl opt">=</span>listtotal<span class="hl opt">&gt;</span></li>
<li id="n_374" class="hl"><span class="hl opt">|;</span></li>
<li id="n_375" class="hl"></li>
<li id="n_376" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwb">&#64;column_index</span><span class="hl opt">) { </span><span class="hl kwc">print </span><span class="hl sng">&quot;</span><span class="hl esc">\n</span><span class="hl sng"></span><span class="hl ipl">$column_data</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}&quot;</span> <span class="hl opt">}</span></li>
<li id="n_377" class="hl"> </li>
<li id="n_378" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">parse_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">});</span></li>
<li id="n_379" class="hl">  <span class="hl kwb">$difference </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>beginningbalance<span class="hl opt">} + </span><span class="hl kwb">$cleared </span><span class="hl opt">- </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl num">0</span><span class="hl opt">);</span></li>
<li id="n_380" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_amount</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">, </span><span class="hl num">0</span><span class="hl opt">);</span></li>
<li id="n_381" class="hl"></li>
<li id="n_382" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_383" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_384" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_385" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_386" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_387" class="hl"><span class="hl opt">|;</span></li>
<li id="n_388" class="hl"></li>
<li id="n_389" class="hl">  </li>
<li id="n_390" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>report<span class="hl opt">}) {</span></li>
<li id="n_391" class="hl"></li>
<li id="n_392" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_393" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_394" class="hl">  <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_395" class="hl"><span class="hl opt">|;</span></li>
<li id="n_396" class="hl"></li>
<li id="n_397" class="hl">  <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_398" class="hl">    </li>
<li id="n_399" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_400" class="hl">   </li>
<li id="n_401" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_402" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_403" class="hl">      <span class="hl opt">&lt;</span>table width<span class="hl opt">=</span><span class="hl num">100</span><span class="hl opt">%&gt;</span></li>
<li id="n_404" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_405" class="hl">      <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;</span></li>
<li id="n_406" class="hl">        <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_407" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_408" class="hl">        <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span>right nowrap<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Statement Balance&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_409" class="hl">        <span class="hl opt">&lt;</span>td width<span class="hl opt">=</span><span class="hl num">10</span><span class="hl opt">%&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_410" class="hl">        <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span>statementbalance size<span class="hl opt">=</span><span class="hl num">11 </span>value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>statementbalance<span class="hl opt">}&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_411" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_412" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_413" class="hl">        <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span>right nowrap<span class="hl opt">&gt;|.</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Difference&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_414" class="hl">        <span class="hl opt">&lt;</span>td width<span class="hl opt">=</span><span class="hl num">10</span><span class="hl opt">%&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_415" class="hl">        <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span>null size<span class="hl opt">=</span><span class="hl num">11 </span>value<span class="hl opt">=</span><span class="hl kwb">$difference</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_416" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>difference value<span class="hl opt">=</span><span class="hl kwb">$difference</span><span class="hl opt">&gt;</span></li>
<li id="n_417" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_418" class="hl">        <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_419" class="hl">      <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_420" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_421" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_422" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_423" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_424" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_425" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span>hr size<span class="hl opt">=</span><span class="hl num">3 </span>noshade<span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_426" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_427" class="hl"><span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_428" class="hl"><span class="hl opt">|;</span></li>
<li id="n_429" class="hl"></li>
<li id="n_430" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">hide_form</span><span class="hl opt">(</span><span class="hl sng">qw(fx_transaction summary rowcount accno account fromdate todate path login sessionid)</span><span class="hl opt">);</span></li>
<li id="n_431" class="hl">  </li>
<li id="n_432" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_433" class="hl"><span class="hl opt">&lt;</span>br<span class="hl opt">&gt;</span></li>
<li id="n_434" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>submit <span class="hl kwa">class</span><span class="hl opt">=</span>submit name<span class="hl opt">=</span>action value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span><span class="hl ipl">$locale</span><span class="hl sng">-&gt;text(&#39;Update&#39;).qq|&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_435" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>submit <span class="hl kwa">class</span><span class="hl opt">=</span>submit name<span class="hl opt">=</span>action value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span><span class="hl ipl">$locale</span><span class="hl sng">-&gt;text(&#39;Select all&#39;).qq|&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_436" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>submit <span class="hl kwa">class</span><span class="hl opt">=</span>submit name<span class="hl opt">=</span>action value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span><span class="hl ipl">$locale</span><span class="hl sng">-&gt;text(&#39;Done&#39;).qq|&quot;</span><span class="hl opt">&gt;|;</span></li>
<li id="n_437" class="hl">  <span class="hl opt">}</span></li>
<li id="n_438" class="hl"></li>
<li id="n_439" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>menubar<span class="hl opt">}) {</span></li>
<li id="n_440" class="hl">    <span class="hl kwa">require </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{path}/menu.pl&quot;</span><span class="hl opt">;</span></li>
<li id="n_441" class="hl">    <span class="hl opt">&amp;</span>menubar<span class="hl opt">;</span></li>
<li id="n_442" class="hl">  <span class="hl opt">}</span></li>
<li id="n_443" class="hl"></li>
<li id="n_444" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_445" class="hl"><span class="hl opt">&lt;/</span>form<span class="hl opt">&gt;</span></li>
<li id="n_446" class="hl"></li>
<li id="n_447" class="hl"><span class="hl opt">&lt;/</span>body<span class="hl opt">&gt;</span></li>
<li id="n_448" class="hl"><span class="hl opt">&lt;/</span>html<span class="hl opt">&gt;</span></li>
<li id="n_449" class="hl"><span class="hl opt">|;</span></li>
<li id="n_450" class="hl"></li>
<li id="n_451" class="hl"><span class="hl opt">}</span></li>
<li id="n_452" class="hl"></li>
<li id="n_453" class="hl"></li>
<li id="n_454" class="hl"><span class="hl kwa">sub </span>update <span class="hl opt">{</span></li>
<li id="n_455" class="hl">  </li>
<li id="n_456" class="hl">  RC-<span class="hl opt">&gt;</span><span class="hl kwd">payment_transactions</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span>\<span class="hl kwb">%$form</span><span class="hl opt">);</span></li>
<li id="n_457" class="hl"></li>
<li id="n_458" class="hl">  <span class="hl kwb">$i </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_459" class="hl">  <span class="hl kwa">foreach </span><span class="hl kwb">$ref </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>PR<span class="hl opt">} }) {</span></li>
<li id="n_460" class="hl">    <span class="hl kwb">$i++</span><span class="hl opt">;</span></li>
<li id="n_461" class="hl">    <span class="hl kwb">$ref</span><span class="hl opt">-&gt;{</span>cleared<span class="hl opt">} = (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;cleared_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}) ? </span><span class="hl num">1 </span><span class="hl opt">: </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_462" class="hl">  <span class="hl opt">}</span></li>
<li id="n_463" class="hl"></li>
<li id="n_464" class="hl">  <span class="hl opt">&amp;</span>display_form<span class="hl opt">;</span></li>
<li id="n_465" class="hl">  </li>
<li id="n_466" class="hl"><span class="hl opt">}</span></li>
<li id="n_467" class="hl"></li>
<li id="n_468" class="hl"></li>
<li id="n_469" class="hl"><span class="hl kwa">sub </span>select_all <span class="hl opt">{</span></li>
<li id="n_470" class="hl">  </li>
<li id="n_471" class="hl">  RC-<span class="hl opt">&gt;</span><span class="hl kwd">payment_transactions</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span>\<span class="hl kwb">%$form</span><span class="hl opt">);</span></li>
<li id="n_472" class="hl"></li>
<li id="n_473" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(&#64;{ </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>PR<span class="hl opt">} }) { </span><span class="hl kwb">$_</span><span class="hl opt">-&gt;{</span>cleared<span class="hl opt">} = </span><span class="hl num">1 </span><span class="hl opt">}</span></li>
<li id="n_474" class="hl"></li>
<li id="n_475" class="hl">  <span class="hl opt">&amp;</span>display_form<span class="hl opt">;</span></li>
<li id="n_476" class="hl">  </li>
<li id="n_477" class="hl"><span class="hl opt">}</span></li>
<li id="n_478" class="hl"></li>
<li id="n_479" class="hl"></li>
<li id="n_480" class="hl"><span class="hl kwa">sub </span>done <span class="hl opt">{</span></li>
<li id="n_481" class="hl"></li>
<li id="n_482" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>callback<span class="hl opt">} = </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{script}?path=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{path}&amp;action=reconciliation&amp;login=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{login}&amp;sessionid=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{sessionid}&quot;</span><span class="hl opt">;</span></li>
<li id="n_483" class="hl"></li>
<li id="n_484" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">error</span><span class="hl opt">(</span><span class="hl kwb">$locale</span><span class="hl opt">-&gt;</span><span class="hl kwd">text</span><span class="hl opt">(</span><span class="hl sng">&#39;Out of balance!&#39;</span><span class="hl opt">)) </span><span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>difference<span class="hl opt">} *= </span><span class="hl num">1</span><span class="hl opt">);</span></li>
<li id="n_485" class="hl"></li>
<li id="n_486" class="hl">  RC-<span class="hl opt">&gt;</span><span class="hl kwd">reconcile</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span>\<span class="hl kwb">%$form</span><span class="hl opt">);</span></li>
<li id="n_487" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">redirect</span><span class="hl opt">;</span></li>
<li id="n_488" class="hl">  </li>
<li id="n_489" class="hl"><span class="hl opt">}</span></li>
<li id="n_490" class="hl"></li>
<li id="n_491" class="hl"></li>
</ol></code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.46.0</a>) at 2025-06-20 06:37:08 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
