<html><head><title>/packaging/</title></head>
<body>
<h2>/packaging/</h2>
<ul>
<li><a href='/monkeysphere/plain/?h=dualquote&amp;id=10c741dac082844fbf9a2fbbfc4322f718c2abea'>../</a></li>
  <li><a href='/monkeysphere/plain/packaging/debian/?h=dualquote&amp;id=10c741dac082844fbf9a2fbbfc4322f718c2abea'>debian</a></li>
  <li><a href='/monkeysphere/plain/packaging/freebsd/?h=dualquote&amp;id=10c741dac082844fbf9a2fbbfc4322f718c2abea'>freebsd</a></li>
  <li><a href='/monkeysphere/plain/packaging/rpm/?h=dualquote&amp;id=10c741dac082844fbf9a2fbbfc4322f718c2abea'>rpm</a></li>
 </ul>
</body></html>
ml'/>
<link rel='vcs-git' href='https://source.jones.dk/ledger-smb' title='ledger-smb Git repository'/>
<link rel='vcs-git' href='user@source.jones.dk:ledger-smb' title='ledger-smb 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='/ledger-smb/'>ledger-smb</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='be9f7146e9e9ecad28c8cdd569b2245913700fd8'/><select name='h' onchange='this.form.submit();'>
<option value='1.2.13+jones' selected='selected'>1.2.13+jones</option>
<option value='1.2.16+jones'>1.2.16+jones</option>
<option value='1.2.17+jones'>1.2.17+jones</option>
<option value='master'>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='/ledger-smb/?h=1.2.13%2bjones'>summary</a><a href='/ledger-smb/refs/?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>refs</a><a href='/ledger-smb/log/bin/mozilla/pos.pl?h=1.2.13%2bjones'>log</a><a class='active' href='/ledger-smb/tree/bin/mozilla/pos.pl?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>tree</a><a href='/ledger-smb/commit/bin/mozilla/pos.pl?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>commit</a><a href='/ledger-smb/diff/bin/mozilla/pos.pl?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>diff</a></td><td class='form'><form class='right' method='get' action='/ledger-smb/log/bin/mozilla/pos.pl'>
<input type='hidden' name='h' value='1.2.13+jones'/><input type='hidden' name='id' value='be9f7146e9e9ecad28c8cdd569b2245913700fd8'/><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='/ledger-smb/tree/?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>root</a>/<a href='/ledger-smb/tree/bin?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>bin</a>/<a href='/ledger-smb/tree/bin/mozilla?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>mozilla</a>/<a href='/ledger-smb/tree/bin/mozilla/pos.pl?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>pos.pl</a></div><div class='content'>blob: 1c5c34063cc189e02d28b259862cd375b3c90d9b (<a href='/ledger-smb/plain/bin/mozilla/pos.pl?h=1.2.13%2bjones&amp;id=be9f7146e9e9ecad28c8cdd569b2245913700fd8'>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 Small Medium Business Accounting</span></li>
<li id="n_3" class="hl"><span class="hl slc"># http://sourceforge.net/projects/ledger-smb/</span></li>
<li id="n_4" class="hl"><span class="hl slc">#</span></li>
<li id="n_5" class="hl"></li>
<li id="n_6" class="hl"><span class="hl slc"># Copyright (C) 2006</span></li>
<li id="n_7" class="hl"><span class="hl slc"># This work contains copyrighted information from a number of sources all used</span></li>
<li id="n_8" class="hl"><span class="hl slc"># with permission.</span></li>
<li id="n_9" class="hl"><span class="hl slc">#</span></li>
<li id="n_10" class="hl"><span class="hl slc"># This file contains source code included with or based on SQL-Ledger which</span></li>
<li id="n_11" class="hl"><span class="hl slc"># is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed </span></li>
<li id="n_12" class="hl"><span class="hl slc"># under the GNU General Public License version 2 or, at your option, any later </span></li>
<li id="n_13" class="hl"><span class="hl slc"># version.  For a full list including contact information of contributors, </span></li>
<li id="n_14" class="hl"><span class="hl slc"># maintainers, and copyright holders, see the CONTRIBUTORS file.</span></li>
<li id="n_15" class="hl"><span class="hl slc">#</span></li>
<li id="n_16" class="hl"><span class="hl slc"># Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):</span></li>
<li id="n_17" class="hl"><span class="hl slc"># Copyright (c) 2003</span></li>
<li id="n_18" class="hl"><span class="hl slc">#</span></li>
<li id="n_19" class="hl"><span class="hl slc">#  Author: DWS Systems Inc.</span></li>
<li id="n_20" class="hl"><span class="hl slc">#     Web: http://www.sql-ledger.org</span></li>
<li id="n_21" class="hl"><span class="hl slc">#</span></li>
<li id="n_22" class="hl"><span class="hl slc"># Contributors: Steve Doerr &lt;sdoerr907&#64;everestkc.net&gt;</span></li>
<li id="n_23" class="hl"><span class="hl slc">#</span></li>
<li id="n_24" class="hl"><span class="hl slc">#</span></li>
<li id="n_25" class="hl"><span class="hl slc"># This program is free software; you can redistribute it and/or modify</span></li>
<li id="n_26" class="hl"><span class="hl slc"># it under the terms of the GNU General Public License as published by</span></li>
<li id="n_27" class="hl"><span class="hl slc"># the Free Software Foundation; either version 2 of the License, or</span></li>
<li id="n_28" class="hl"><span class="hl slc"># (at your option) any later version.</span></li>
<li id="n_29" class="hl"><span class="hl slc">#</span></li>
<li id="n_30" class="hl"><span class="hl slc"># This program is distributed in the hope that it will be useful,</span></li>
<li id="n_31" class="hl"><span class="hl slc"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span></li>
<li id="n_32" class="hl"><span class="hl slc"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></li>
<li id="n_33" class="hl"><span class="hl slc"># GNU General Public License for more details.</span></li>
<li id="n_34" class="hl"><span class="hl slc"># You should have received a copy of the GNU General Public License</span></li>
<li id="n_35" class="hl"><span class="hl slc"># along with this program; if not, write to the Free Software</span></li>
<li id="n_36" class="hl"><span class="hl slc"># Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span></li>
<li id="n_37" class="hl"><span class="hl slc">#=====================================================================</span></li>
<li id="n_38" class="hl"><span class="hl slc">#</span></li>
<li id="n_39" class="hl"><span class="hl slc"># POS</span></li>
<li id="n_40" class="hl"><span class="hl slc">#</span></li>
<li id="n_41" class="hl"><span class="hl slc">#=====================================================================</span></li>
<li id="n_42" class="hl"></li>
<li id="n_43" class="hl"></li>
<li id="n_44" class="hl"><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_45" class="hl"><span class="hl slc"># end</span></li>
<li id="n_46" class="hl"></li>
<li id="n_47" class="hl"></li>
<li id="n_48" class="hl"><span class="hl kwa">sub </span>add <span class="hl opt">{</span></li>
<li id="n_49" class="hl"></li>
<li id="n_50" 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;Add POS Invoice&#39;</span><span class="hl opt">);</span></li>
<li id="n_51" class="hl"></li>
<li id="n_52" 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}?action=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{nextsub}&amp;path=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{path}&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 kwa">unless </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>callback<span class="hl opt">};</span></li>
<li id="n_53" class="hl">  </li>
<li id="n_54" class="hl">  <span class="hl opt">&amp;</span>invoice_links<span class="hl opt">;</span></li>
<li id="n_55" class="hl"></li>
<li id="n_56" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>type<span class="hl opt">} =  </span><span class="hl sng">&quot;pos_invoice&quot;</span><span class="hl opt">;</span></li>
<li id="n_57" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>format<span class="hl opt">} = </span><span class="hl sng">&quot;txt&quot;</span><span class="hl opt">;</span></li>
<li id="n_58" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>media<span class="hl opt">} = (</span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>printer<span class="hl opt">}) ? </span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>printer<span class="hl opt">} : </span><span class="hl sng">&quot;screen&quot;</span><span class="hl opt">;</span></li>
<li id="n_59" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_60" class="hl"></li>
<li id="n_61" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>readonly<span class="hl opt">} = (</span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>acs<span class="hl opt">} =~ </span><span class="hl kwd">/POS--Sale/</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_62" class="hl"></li>
<li id="n_63" class="hl">  <span class="hl kwb">$ENV</span><span class="hl opt">{</span>REMOTE_ADDR<span class="hl opt">} =~ </span><span class="hl kwd">/(\d+)\.(\d+)\.(\d+)\.(\d+)/</span><span class="hl opt">;</span></li>
<li id="n_64" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>till<span class="hl opt">} = </span><span class="hl kwb">$4</span><span class="hl opt">;</span></li>
<li id="n_65" class="hl"></li>
<li id="n_66" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} = </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_67" 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_partsgroup<span class="hl opt">} }) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} .= </span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{partsgroup}--</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{translation}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">; }</span></li>
<li id="n_68" class="hl"></li>
<li id="n_69" class="hl">  <span class="hl opt">&amp;</span>display_form<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"></li>
<li id="n_74" class="hl"><span class="hl kwa">sub </span>openinvoices <span class="hl opt">{</span></li>
<li id="n_75" class="hl"></li>
<li id="n_76" class="hl">  <span class="hl kwb">$ENV</span><span class="hl opt">{</span>REMOTE_ADDR<span class="hl opt">} =~ </span><span class="hl kwd">/(\d+)\.(\d+)\.(\d+)\.(\d+)/</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>till<span class="hl opt">} = </span><span class="hl kwb">$4</span><span class="hl opt">;</span></li>
<li id="n_78" class="hl">  </li>
<li id="n_79" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwc">sort</span><span class="hl opt">} = </span><span class="hl sng">&#39;transdate&#39;</span><span class="hl opt">;</span></li>
<li id="n_80" class="hl"></li>
<li id="n_81" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(open l_invnumber l_transdate l_name l_amount l_curr l_till l_subtotal)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl sng">&#39;Y&#39;</span><span class="hl opt">; }</span></li>
<li id="n_82" class="hl"></li>
<li id="n_83" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span><span class="hl kwa">role</span><span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl sng">&#39;user&#39;</span><span class="hl opt">) {</span></li>
<li id="n_84" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>l_employee<span class="hl opt">} = </span><span class="hl sng">&#39;Y&#39;</span><span class="hl opt">;</span></li>
<li id="n_85" class="hl">  <span class="hl opt">}</span></li>
<li id="n_86" class="hl"></li>
<li id="n_87" 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;Open&#39;</span><span class="hl opt">);</span></li>
<li id="n_88" class="hl">  transactions<span class="hl opt">;</span></li>
<li id="n_89" class="hl">  </li>
<li id="n_90" class="hl"><span class="hl opt">}</span></li>
<li id="n_91" class="hl"></li>
<li id="n_92" class="hl"></li>
<li id="n_93" class="hl"><span class="hl kwa">sub </span>edit <span class="hl opt">{</span></li>
<li id="n_94" class="hl"></li>
<li id="n_95" 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;Edit POS Invoice&#39;</span><span class="hl opt">);</span></li>
<li id="n_96" class="hl"></li>
<li id="n_97" 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}?action=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{nextsub}&amp;path=</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{path}&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 kwa">unless </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>callback<span class="hl opt">};</span></li>
<li id="n_98" class="hl">  </li>
<li id="n_99" class="hl">  <span class="hl opt">&amp;</span>invoice_links<span class="hl opt">;</span></li>
<li id="n_100" class="hl">  <span class="hl opt">&amp;</span>prepare_invoice<span class="hl opt">;</span></li>
<li id="n_101" class="hl"></li>
<li id="n_102" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>type<span class="hl opt">} =  </span><span class="hl sng">&quot;pos_invoice&quot;</span><span class="hl opt">;</span></li>
<li id="n_103" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>format<span class="hl opt">} = </span><span class="hl sng">&quot;txt&quot;</span><span class="hl opt">;</span></li>
<li id="n_104" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>media<span class="hl opt">} = (</span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>printer<span class="hl opt">}) ? </span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>printer<span class="hl opt">} : </span><span class="hl sng">&quot;screen&quot;</span><span class="hl opt">;</span></li>
<li id="n_105" class="hl"></li>
<li id="n_106" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>readonly<span class="hl opt">} = (</span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>acs<span class="hl opt">} =~ </span><span class="hl kwd">/POS--Sale/</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_107" class="hl"></li>
<li id="n_108" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} = </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_109" 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_partsgroup<span class="hl opt">} }) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} .= </span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{partsgroup}--</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{translation}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">; }</span></li>
<li id="n_110" class="hl">  </li>
<li id="n_111" class="hl">  <span class="hl opt">&amp;</span>display_form<span class="hl opt">;</span></li>
<li id="n_112" class="hl"></li>
<li id="n_113" class="hl"><span class="hl opt">}</span></li>
<li id="n_114" class="hl"></li>
<li id="n_115" class="hl"></li>
<li id="n_116" class="hl"><span class="hl kwa">sub </span>form_header <span class="hl opt">{</span></li>
<li id="n_117" class="hl"></li>
<li id="n_118" class="hl">  <span class="hl slc"># set option selected</span></li>
<li id="n_119" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(AR currency)</span><span class="hl opt">) {</span></li>
<li id="n_120" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/ selected//</span><span class="hl opt">;</span></li>
<li id="n_121" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/option&gt;\Q$form-&gt;{$_}\E/option selected&gt;$form-&gt;{$_}/</span><span class="hl opt">;</span></li>
<li id="n_122" class="hl">  <span class="hl opt">}</span></li>
<li id="n_123" class="hl"></li>
<li id="n_124" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(customer department employee)</span><span class="hl opt">) {</span></li>
<li id="n_125" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">unescape</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">});</span></li>
<li id="n_126" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/ selected//</span><span class="hl opt">;</span></li>
<li id="n_127" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;select</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/(&lt;option value=&quot;\Q$form-&gt;{$_}\E&quot;)/$1 selected/</span><span class="hl opt">;</span></li>
<li id="n_128" class="hl">  <span class="hl opt">}</span></li>
<li id="n_129" class="hl">    </li>
<li id="n_130" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>exchangerate<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>exchangerate<span class="hl opt">});</span></li>
<li id="n_131" class="hl"></li>
<li id="n_132" class="hl">  <span class="hl kwb">$exchangerate </span><span class="hl opt">= </span>qq<span class="hl opt">|&lt;</span>tr<span class="hl opt">&gt;|;</span></li>
<li id="n_133" class="hl">  <span class="hl kwb">$exchangerate </span><span class="hl opt">.= </span>qq<span class="hl opt">|</span></li>
<li id="n_134" 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;Currency&#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_135" class="hl">        <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span>currency<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectcurrency<span class="hl opt">}&lt;</span><span class="hl kwd">/select&gt;&lt;/</span>td<span class="hl opt">&gt; | </span><span class="hl kwa">if </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>defaultcurrency<span class="hl opt">};</span></li>
<li id="n_136" class="hl">  <span class="hl kwb">$exchangerate </span><span class="hl opt">.= </span>qq<span class="hl opt">|</span></li>
<li id="n_137" class="hl">                <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>selectcurrency value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectcurrency}&quot;</span><span class="hl opt">&gt; </span></li>
<li id="n_138" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>defaultcurrency value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>defaultcurrency<span class="hl opt">}&gt;</span></li>
<li id="n_139" class="hl"><span class="hl opt">|;</span></li>
<li id="n_140" class="hl">        </li>
<li id="n_141" 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>defaultcurrency<span class="hl opt">} &amp;&amp; </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>currency<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>defaultcurrency<span class="hl opt">}) {</span></li>
<li id="n_142" 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>forex<span class="hl opt">}) {</span></li>
<li id="n_143" class="hl">      <span class="hl kwb">$exchangerate </span><span class="hl opt">.= </span>qq<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;Exchange Rate&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;</span><span class="hl kwd">/th&gt;&lt;td&gt;$form-&gt;{exchangerate}&lt;input type=hidden name=exchangerate value=$form-&gt;{exchangerate}&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_144" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_145" class="hl">      <span class="hl kwb">$exchangerate </span><span class="hl opt">.= </span>qq<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;Exchange Rate&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;</span><span class="hl kwd">/th&gt;&lt;td&gt;&lt;input name=exchangerate size=10 value=$form-&gt;{exchangerate}&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_146" class="hl">    <span class="hl opt">}</span></li>
<li id="n_147" class="hl">  <span class="hl opt">}</span></li>
<li id="n_148" class="hl">  <span class="hl kwb">$exchangerate </span><span class="hl opt">.= </span>qq<span class="hl opt">|</span></li>
<li id="n_149" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>forex value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>forex<span class="hl opt">}&gt;</span></li>
<li id="n_150" class="hl"><span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_151" class="hl"><span class="hl opt">|;</span></li>
<li id="n_152" class="hl"></li>
<li id="n_153" 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>selectcustomer<span class="hl opt">}) {</span></li>
<li id="n_154" class="hl">    <span class="hl kwb">$customer </span><span class="hl opt">= </span>qq<span class="hl opt">|&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span>customer<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectcustomer<span class="hl opt">}&lt;/</span><span class="hl kwc">select</span><span class="hl opt">&gt;</span></li>
<li id="n_155" 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;selectcustomer&quot;</span> value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span></li>
<li id="n_156" class="hl"><span class="hl sng">           </span><span class="hl ipl">$form</span><span class="hl sng">-&gt;escape(</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectcustomer},1).qq|&quot;</span><span class="hl opt">&gt;|;</span></li>
<li id="n_157" class="hl">  <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_158" class="hl">    <span class="hl kwb">$customer </span><span class="hl opt">= </span>qq<span class="hl opt">|&lt;</span>input name<span class="hl opt">=</span>customer value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{customer}&quot;</span> size<span class="hl opt">=</span><span class="hl num">35</span><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 kwb">$department </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_162" class="hl">              <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_163" class="hl">            <span class="hl opt">&lt;</span>th align<span class="hl opt">=</span><span class="hl sng">&quot;right&quot;</span> 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;Department&#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_164" 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>department<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectdepartment<span class="hl opt">}&lt;/</span><span class="hl kwc">select</span><span class="hl opt">&gt;</span></li>
<li id="n_165" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>selectdepartment value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span></li>
<li id="n_166" class="hl"><span class="hl sng">        </span><span class="hl ipl">$form</span><span class="hl sng">-&gt;escape(</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectdepartment},1).qq|&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_167" class="hl">        <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_168" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_169" class="hl"><span class="hl opt">| </span><span class="hl kwa">if </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectdepartment<span class="hl opt">};</span></li>
<li id="n_170" class="hl"></li>
<li id="n_171" class="hl">   <span class="hl kwb">$employee </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_172" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_173" 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;Salesperson&#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_174" 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>employee<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectemployee<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_175" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>selectemployee value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span></li>
<li id="n_176" class="hl"><span class="hl sng">        </span><span class="hl ipl">$form</span><span class="hl sng">-&gt;escape(</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectemployee},1).qq|&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_177" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_178" class="hl"><span class="hl opt">| </span><span class="hl kwa">if </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectemployee<span class="hl opt">};</span></li>
<li id="n_179" class="hl"></li>
<li id="n_180" 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>change<span class="hl opt">} != </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldchange<span class="hl opt">}) {</span></li>
<li id="n_181" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>creditremaining<span class="hl opt">} -= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldchange<span class="hl opt">};</span></li>
<li id="n_182" class="hl">  <span class="hl opt">}</span></li>
<li id="n_183" class="hl">  <span class="hl kwb">$n </span><span class="hl opt">= (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>creditremaining<span class="hl opt">} &lt; </span><span class="hl num">0</span><span class="hl opt">) ? </span><span class="hl sng">&quot;0&quot;</span> <span class="hl opt">: </span><span class="hl sng">&quot;1&quot;</span><span class="hl opt">;</span></li>
<li id="n_184" class="hl"></li>
<li id="n_185" 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>business<span class="hl opt">}) {</span></li>
<li id="n_186" class="hl">    <span class="hl kwb">$business </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_187" class="hl">              <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_188" 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;Business&#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_189" class="hl">        <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>business<span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_190" 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_191" 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;Trade Discount&#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_192" class="hl">        <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;|.</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>tradediscount<span class="hl opt">} * </span><span class="hl num">100</span><span class="hl opt">).</span>qq<span class="hl opt">| %&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_193" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_194" class="hl"><span class="hl opt">|;</span></li>
<li id="n_195" class="hl">  <span class="hl opt">}</span></li>
<li id="n_196" class="hl"></li>
<li id="n_197" 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>selectlanguage<span class="hl opt">}) {</span></li>
<li id="n_198" 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>language_code<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldlanguage_code<span class="hl opt">}) {</span></li>
<li id="n_199" class="hl">      <span class="hl slc"># rebuild partsgroup</span></li>
<li id="n_200" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">get_partsgroup</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, { </span>language_code <span class="hl opt">=&gt; </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>language_code<span class="hl opt">}, </span>searchitems <span class="hl opt">=&gt; </span><span class="hl sng">&#39;nolabor&#39;</span><span class="hl opt">});</span></li>
<li id="n_201" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} = </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_202" 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_partsgroup<span class="hl opt">} }) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} .= </span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{partsgroup}--</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{translation}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">; }</span></li>
<li id="n_203" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldlanguage_code<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>language_code<span class="hl opt">};</span></li>
<li id="n_204" class="hl">    <span class="hl opt">}</span></li>
<li id="n_205" class="hl"></li>
<li id="n_206" class="hl">      </li>
<li id="n_207" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectlanguage&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">unescape</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectlanguage&quot;</span><span class="hl opt">});</span></li>
<li id="n_208" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectlanguage&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/ selected//</span><span class="hl opt">;</span></li>
<li id="n_209" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectlanguage&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/(&lt;option value=&quot;\Q$form-&gt;{language_code}\E&quot;)/$1 selected/</span><span class="hl opt">; </span></li>
<li id="n_210" class="hl">    <span class="hl kwb">$lang </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_211" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_212" 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;Language&#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_213" 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>language_code<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectlanguage<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_214" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_215" class="hl">    <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>oldlanguage_code value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldlanguage_code<span class="hl opt">}&gt;</span></li>
<li id="n_216" class="hl">    <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>selectlanguage value<span class="hl opt">=</span><span class="hl sng">&quot;|.</span></li>
<li id="n_217" class="hl"><span class="hl sng">    </span><span class="hl ipl">$form</span><span class="hl sng">-&gt;escape(</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectlanguage},1).qq|&quot;</span><span class="hl opt">&gt;|;</span></li>
<li id="n_218" class="hl">  <span class="hl opt">}</span></li>
<li id="n_219" class="hl"></li>
<li id="n_220" class="hl">  <span class="hl kwb">$i </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">} + </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_221" class="hl">  <span class="hl kwb">$focus </span><span class="hl opt">= </span><span class="hl sng">&quot;partnumber_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">;</span></li>
<li id="n_222" class="hl">  </li>
<li id="n_223" 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_224" class="hl"> </li>
<li id="n_225" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_226" class="hl"><span class="hl opt">&lt;</span>body onLoad<span class="hl opt">=</span><span class="hl sng">&quot;document.forms[0].${focus}.focus()&quot;</span> <span class="hl opt">/&gt;</span></li>
<li id="n_227" class="hl"></li>
<li id="n_228" 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 sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{script}&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_229" class="hl"><span class="hl opt">|;</span></li>
<li id="n_230" class="hl"></li>
<li id="n_231" 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(id till type format printed title discount creditlimit creditremaining tradediscount business closedto locked oldtransdate customer_id oldcustomer)</span><span class="hl opt">);</span></li>
<li id="n_232" class="hl"></li>
<li id="n_233" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_234" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>vc value<span class="hl opt">=</span><span class="hl sng">&quot;customer&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_235" class="hl"></li>
<li id="n_236" 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_237" class="hl">  <span class="hl opt">&lt;</span>tr <span class="hl kwa">class</span><span class="hl opt">=</span>listtop<span class="hl opt">&gt;</span></li>
<li id="n_238" 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><span class="hl kwd">/font&gt;&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_239" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_240" 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_241" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_242" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_243" 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_244" class="hl">    <span class="hl opt">&lt;</span>tr valign<span class="hl opt">=</span>top<span class="hl opt">&gt;</span></li>
<li id="n_245" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_246" class="hl">        <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_247" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_248" 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;Customer&#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_249" 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><span class="hl kwb">$customer</span><span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_250" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_251" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_252" 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_253" 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_254" class="hl">          <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_255" class="hl">            <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_256" 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;Credit Limit&#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_257" class="hl">              <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>creditlimit<span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_258" 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_259" 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;Remaining&#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_260" class="hl">              <span class="hl opt">&lt;</span>td <span class="hl kwa">class</span><span class="hl opt">=</span><span class="hl sng">&quot;plus</span><span class="hl ipl">$n</span><span class="hl sng">&quot;</span><span class="hl opt">&gt;|.</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>creditremaining<span class="hl opt">}, </span><span class="hl num">0</span><span class="hl opt">, </span><span class="hl sng">&quot;0&quot;</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;</span><span class="hl kwd">/font&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_261" class="hl">            <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_262" class="hl">            <span class="hl kwb">$business</span></li>
<li id="n_263" class="hl">          <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_264" class="hl">        <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</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">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_267" 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;Record in&#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_268" 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>AR<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectAR<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_269" class="hl">        <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>selectAR value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{selectAR}&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_270" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_271" class="hl">          <span class="hl kwb">$department</span></li>
<li id="n_272" class="hl">        <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_273" class="hl">      <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_274" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_275" class="hl">        <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_276" class="hl">          <span class="hl kwb">$employee</span></li>
<li id="n_277" class="hl">          <span class="hl kwb">$exchangerate</span></li>
<li id="n_278" class="hl">          <span class="hl kwb">$lang</span></li>
<li id="n_279" class="hl">        <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_280" class="hl">      <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_281" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_282" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_283" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_284" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_285" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_286" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_287" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_288" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_289" class="hl"><span class="hl opt">|;</span></li>
<li id="n_290" class="hl"></li>
<li id="n_291" 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(taxaccounts duedate invnumber transdate selectcurrency defaultcurrency)</span><span class="hl opt">);</span></li>
<li id="n_292" class="hl"></li>
<li id="n_293" class="hl">  <span class="hl kwa">for </span><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>taxaccounts<span class="hl opt">}) {</span></li>
<li id="n_294" 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">&quot;${_}_rate&quot;</span><span class="hl opt">, </span><span class="hl sng">&quot;${_}_description&quot;</span><span class="hl opt">, </span><span class="hl sng">&quot;${_}_taxnumber&quot;</span><span class="hl opt">);</span></li>
<li id="n_295" class="hl">  <span class="hl opt">}</span></li>
<li id="n_296" class="hl"></li>
<li id="n_297" class="hl"><span class="hl opt">}</span></li>
<li id="n_298" class="hl"></li>
<li id="n_299" class="hl"></li>
<li id="n_300" class="hl"></li>
<li id="n_301" class="hl"><span class="hl kwa">sub </span>form_footer <span class="hl opt">{</span></li>
<li id="n_302" class="hl"></li>
<li id="n_303" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invsubtotal<span class="hl opt">};</span></li>
<li id="n_304" class="hl"></li>
<li id="n_305" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>taxincluded<span class="hl opt">} = (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>taxincluded<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_306" class="hl"></li>
<li id="n_307" class="hl">  <span class="hl kwb">$taxincluded </span><span class="hl opt">= </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_308" 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>taxaccounts<span class="hl opt">}) {</span></li>
<li id="n_309" class="hl">    <span class="hl kwb">$taxincluded </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_310" 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_311" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_312" 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_313" class="hl">        <span class="hl opt">&lt;</span>input name<span class="hl opt">=</span>taxincluded <span class="hl kwa">class</span><span class="hl opt">=</span>checkbox type<span class="hl opt">=</span>checkbox value<span class="hl opt">=</span><span class="hl num">1 </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>taxincluded<span class="hl opt">}&gt;&lt;</span><span class="hl kwd">/td&gt;&lt;th align=left&gt;|.$locale-&gt;text(&#39;Tax Included&#39;).qq|&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_314" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_315" class="hl"><span class="hl opt">|;</span></li>
<li id="n_316" class="hl">  <span class="hl opt">}</span></li>
<li id="n_317" class="hl">  </li>
<li id="n_318" 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>taxincluded<span class="hl opt">}) {</span></li>
<li id="n_319" class="hl">    </li>
<li id="n_320" class="hl">    <span class="hl kwa">for </span><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>taxaccounts<span class="hl opt">}) {</span></li>
<li id="n_321" 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><span class="hl sng">&quot;${_}_base&quot;</span><span class="hl opt">}) {</span></li>
<li id="n_322" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_total&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">round_amount</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_base&quot;</span><span class="hl opt">} * </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_rate&quot;</span><span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">);</span></li>
<li id="n_323" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">} += </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_total&quot;</span><span class="hl opt">};</span></li>
<li id="n_324" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_total&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">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_total&quot;</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></li>
<li id="n_325" class="hl">    </li>
<li id="n_326" class="hl">    <span class="hl kwb">$tax </span><span class="hl opt">.= </span>qq<span class="hl opt">|</span></li>
<li id="n_327" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_328" 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">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_description&quot;</span><span class="hl opt">}&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_329" class="hl">        <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_total&quot;</span><span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_330" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_331" class="hl"><span class="hl opt">|;</span></li>
<li id="n_332" class="hl">      <span class="hl opt">}</span></li>
<li id="n_333" class="hl">    <span class="hl opt">}</span></li>
<li id="n_334" class="hl"></li>
<li id="n_335" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invsubtotal<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>invsubtotal<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_336" class="hl"></li>
<li id="n_337" class="hl">    <span class="hl kwb">$subtotal </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_338" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_339" 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;Subtotal&#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_340" class="hl">        <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invsubtotal<span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_341" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_342" class="hl"><span class="hl opt">|;</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 kwb">&#64;column_index </span><span class="hl opt">= </span><span class="hl sng">qw(paid source memo AR_paid)</span><span class="hl opt">;</span></li>
<li id="n_346" class="hl"></li>
<li id="n_347" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>paid<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th&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;Amount&#39;</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_348" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>source<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th&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;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_349" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>memo<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th&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;Memo&#39;</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_350" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>AR_paid<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;th&gt;&amp;nbsp;&lt;/th&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_351" class="hl">  </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 opt">&gt;</span></li>
<li id="n_354" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_355" 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_356" class="hl">    <span class="hl opt">&lt;</span>tr valign<span class="hl opt">=</span>top<span class="hl opt">&gt;</span></li>
<li id="n_357" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_358" class="hl">        <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</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 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 ipl">$column_data</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><span class="hl opt">; }</span></li>
<li id="n_363" class="hl">  </li>
<li id="n_364" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_365" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_366" class="hl"><span class="hl opt">|;</span></li>
<li id="n_367" class="hl"></li>
<li id="n_368" class="hl">  <span class="hl kwb">$totalpaid </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_369" class="hl">  </li>
<li id="n_370" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>paidaccounts<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><span class="hl sng">&quot;paid_</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{paidaccounts}&quot;</span><span class="hl opt">});</span></li>
<li id="n_371" class="hl">  <span class="hl kwa">for </span><span class="hl kwb">$i </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>paidaccounts<span class="hl opt">}) {</span></li>
<li id="n_372" class="hl">  </li>
<li id="n_373" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectAR_paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>selectAR_paid<span class="hl opt">};</span></li>
<li id="n_374" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectAR_paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">s/option&gt;\Q$form-&gt;{&quot;AR_paid_$i&quot;}\E/option selected&gt;$form-&gt;{&quot;AR_paid_$i&quot;}/</span><span class="hl opt">;</span></li>
<li id="n_375" class="hl">  </li>
<li id="n_376" class="hl">  <span class="hl slc"># format amounts</span></li>
<li id="n_377" class="hl">    <span class="hl kwb">$totalpaid </span><span class="hl opt">+= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">};</span></li>
<li id="n_378" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;paid_</span><span class="hl ipl">$i</span><span class="hl sng">&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">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">);</span></li>
<li id="n_379" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;exchangerate_</span><span class="hl ipl">$i</span><span class="hl sng">&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">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;exchangerate_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">});</span></li>
<li id="n_380" class="hl"></li>
<li id="n_381" class="hl"></li>
<li id="n_382" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>paid<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span><span class="hl sng">&quot;paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> 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><span class="hl sng">&quot;paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_383" 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;&lt;</span>input 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> size<span class="hl opt">=</span><span class="hl num">10 </span>value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{&quot;</span>source_<span class="hl kwb">$i</span><span class="hl sng">&quot;}&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_384" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>memo<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span><span class="hl sng">&quot;memo_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">10 </span>value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{&quot;</span>memo_<span class="hl kwb">$i</span><span class="hl sng">&quot;}&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_385" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>AR_paid<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span><span class="hl kwc">select </span>name<span class="hl opt">=</span><span class="hl sng">&quot;AR_paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;selectAR_paid_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</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_386" class="hl"></li>
<li id="n_387" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_388" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_389" class="hl"><span class="hl opt">|;</span></li>
<li id="n_390" 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 ipl">$column_data</span><span class="hl sng">{</span><span class="hl ipl">$_</span><span class="hl sng">}</span><span class="hl esc">\n</span><span class="hl sng">&quot;</span><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">|;</span></li>
<li id="n_395" class="hl"></li>
<li id="n_396" 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">&quot;cleared_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">, </span><span class="hl sng">&quot;exchangerate_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">, </span><span class="hl sng">&quot;forex_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">);</span></li>
<li id="n_397" class="hl"></li>
<li id="n_398" class="hl">  <span class="hl opt">}</span></li>
<li id="n_399" class="hl">  </li>
<li id="n_400" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_401" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$totalpaid </span><span class="hl opt">&gt; </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">}) {</span></li>
<li id="n_402" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<span class="hl opt">} = </span><span class="hl kwb">$totalpaid </span><span class="hl opt">- </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">};</span></li>
<li id="n_403" class="hl">  <span class="hl opt">}</span></li>
<li id="n_404" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldchange<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<span class="hl opt">};</span></li>
<li id="n_405" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<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>change<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_406" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>totalpaid<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">$totalpaid</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">);</span></li>
<li id="n_407" class="hl"> </li>
<li id="n_408" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldinvtotal<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">};</span></li>
<li id="n_409" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<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>invtotal<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_410" class="hl"> </li>
<li id="n_411" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</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<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;Change&#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>th<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<span class="hl opt">}&lt;/</span>th<span class="hl opt">&gt;</span></li>
<li id="n_415" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_416" class="hl">        <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_417" class="hl">      <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_418" 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_419" class="hl">        <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_420" class="hl">          <span class="hl kwb">$subtotal</span></li>
<li id="n_421" class="hl">          <span class="hl kwb">$tax</span></li>
<li id="n_422" class="hl">          <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_423" 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;Total&#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_424" class="hl">        <span class="hl opt">&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invtotal<span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_425" class="hl">          <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_426" class="hl">          <span class="hl kwb">$taxincluded</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">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_429" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_430" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_431" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_432" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_433" class="hl"> </li>
<li id="n_434" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>oldtotalpaid value<span class="hl opt">=</span><span class="hl kwb">$totalpaid</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>hidden name<span class="hl opt">=</span>datepaid value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>transdate<span class="hl opt">}&gt;</span></li>
<li id="n_436" class="hl"></li>
<li id="n_437" class="hl"><span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_438" class="hl">  <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_439" class="hl"><span class="hl opt">|;</span></li>
<li id="n_440" class="hl"></li>
<li id="n_441" 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(paidaccounts selectAR_paid oldinvtotal change oldchange invtotal)</span><span class="hl opt">);</span></li>
<li id="n_442" class="hl">  </li>
<li id="n_443" class="hl">  <span class="hl opt">&amp;</span>print_options<span class="hl opt">;</span></li>
<li id="n_444" class="hl"></li>
<li id="n_445" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_446" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_447" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_448" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_449" 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_450" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_451" class="hl"><span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_452" class="hl"><span class="hl opt">|;</span></li>
<li id="n_453" class="hl"></li>
<li id="n_454" class="hl">  <span class="hl kwb">$transdate </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">datetonum</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>transdate<span class="hl opt">});</span></li>
<li id="n_455" class="hl">  <span class="hl kwb">$closedto </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">datetonum</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>closedto<span class="hl opt">});</span></li>
<li id="n_456" class="hl"></li>
<li id="n_457" class="hl"><span class="hl slc"># type=submit $locale-&gt;text(&#39;Update&#39;)</span></li>
<li id="n_458" class="hl"><span class="hl slc"># type=submit $locale-&gt;text(&#39;Print&#39;)</span></li>
<li id="n_459" class="hl"><span class="hl slc"># type=submit $locale-&gt;text(&#39;Post&#39;)</span></li>
<li id="n_460" class="hl"><span class="hl slc"># type=submit $locale-&gt;text(&#39;Print and Post&#39;)</span></li>
<li id="n_461" class="hl"><span class="hl slc"># type=submit $locale-&gt;text(&#39;Delete&#39;)</span></li>
<li id="n_462" class="hl"></li>
<li id="n_463" 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>readonly<span class="hl opt">}) {</span></li>
<li id="n_464" class="hl">    <span class="hl kwb">%button </span><span class="hl opt">= (</span><span class="hl sng">&#39;Update&#39;</span> <span class="hl opt">=&gt; { </span>ndx <span class="hl opt">=&gt; </span><span class="hl num">1</span><span class="hl opt">, </span>key <span class="hl opt">=&gt; </span><span class="hl sng">&#39;U&#39;</span><span class="hl opt">, </span>value <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;Update&#39;</span><span class="hl opt">) },</span></li>
<li id="n_465" class="hl">           <span class="hl sng">&#39;Print&#39;</span> <span class="hl opt">=&gt; { </span>ndx <span class="hl opt">=&gt; </span><span class="hl num">2</span><span class="hl opt">, </span>key <span class="hl opt">=&gt; </span><span class="hl sng">&#39;P&#39;</span><span class="hl opt">, </span>value <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;Print&#39;</span><span class="hl opt">) },</span></li>
<li id="n_466" class="hl">           <span class="hl sng">&#39;Post&#39;</span> <span class="hl opt">=&gt; { </span>ndx <span class="hl opt">=&gt; </span><span class="hl num">3</span><span class="hl opt">, </span>key <span class="hl opt">=&gt; </span><span class="hl sng">&#39;O&#39;</span><span class="hl opt">, </span>value <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;Post&#39;</span><span class="hl opt">) },</span></li>
<li id="n_467" class="hl">           <span class="hl sng">&#39;Print and Post&#39;</span> <span class="hl opt">=&gt; { </span>ndx <span class="hl opt">=&gt; </span><span class="hl num">4</span><span class="hl opt">, </span>key <span class="hl opt">=&gt; </span><span class="hl sng">&#39;R&#39;</span><span class="hl opt">, </span>value <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;Print and Post&#39;</span><span class="hl opt">) },</span></li>
<li id="n_468" class="hl">           <span class="hl sng">&#39;Delete&#39;</span> <span class="hl opt">=&gt; { </span>ndx <span class="hl opt">=&gt; </span><span class="hl num">5</span><span class="hl opt">, </span>key <span class="hl opt">=&gt; </span><span class="hl sng">&#39;D&#39;</span><span class="hl opt">, </span>value <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;Delete&#39;</span><span class="hl opt">) },</span></li>
<li id="n_469" class="hl">          <span class="hl opt">);</span></li>
<li id="n_470" class="hl">   </li>
<li id="n_471" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$transdate </span><span class="hl opt">&gt; </span><span class="hl kwb">$closedto</span><span class="hl opt">) {</span></li>
<li id="n_472" class="hl"></li>
<li id="n_473" 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>id<span class="hl opt">}) {</span></li>
<li id="n_474" class="hl">    <span class="hl kwc">delete </span><span class="hl kwb">$button</span><span class="hl opt">{</span><span class="hl sng">&#39;Delete&#39;</span><span class="hl opt">};</span></li>
<li id="n_475" class="hl">      <span class="hl opt">}</span></li>
<li id="n_476" class="hl"></li>
<li id="n_477" class="hl">      <span class="hl kwc">delete </span><span class="hl kwb">$button</span><span class="hl opt">{</span><span class="hl sng">&#39;Print and Post&#39;</span><span class="hl opt">} </span><span class="hl kwa">unless </span><span class="hl kwb">$latex</span><span class="hl opt">;</span></li>
<li id="n_478" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_479" class="hl">      <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">&#39;Print&#39;</span><span class="hl opt">, </span><span class="hl sng">&#39;Post&#39;</span><span class="hl opt">, </span><span class="hl sng">&#39;Print and Post&#39;</span><span class="hl opt">, </span><span class="hl sng">&#39;Delete&#39;</span><span class="hl opt">) { </span><span class="hl kwc">delete </span><span class="hl kwb">$button</span><span class="hl opt">{</span><span class="hl kwb">$_</span><span class="hl opt">} }</span></li>
<li id="n_480" class="hl">    <span class="hl opt">}</span></li>
<li id="n_481" class="hl">      </li>
<li id="n_482" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwc">sort </span><span class="hl opt">{ </span><span class="hl kwb">$button</span><span class="hl opt">{</span><span class="hl kwb">$a</span><span class="hl opt">}-&gt;{</span>ndx<span class="hl opt">} &lt;=&gt; </span><span class="hl kwb">$button</span><span class="hl opt">{</span><span class="hl kwb">$b</span><span class="hl opt">}-&gt;{</span>ndx<span class="hl opt">} } </span><span class="hl kwc">keys </span><span class="hl kwb">%button</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">print_button</span><span class="hl opt">(</span>\<span class="hl kwb">%button</span><span class="hl opt">, </span><span class="hl kwb">$_</span><span class="hl opt">) }</span></li>
<li id="n_483" class="hl"></li>
<li id="n_484" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|&lt;</span>p<span class="hl opt">&gt;</span></li>
<li id="n_485" class="hl">    <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>text size<span class="hl opt">=</span><span class="hl num">1 </span>value<span class="hl opt">=</span><span class="hl sng">&quot;B&quot;</span> accesskey<span class="hl opt">=</span><span class="hl sng">&quot;B&quot;</span> title<span class="hl opt">=</span><span class="hl sng">&quot;[Alt-B]&quot;</span><span class="hl opt">&gt;</span><span class="hl esc">\n</span><span class="hl opt">|;</span></li>
<li id="n_486" class="hl">  </li>
<li id="n_487" 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>partsgroup<span class="hl opt">}) {</span></li>
<li id="n_488" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} =~ </span><span class="hl kwd">s/\r//g</span><span class="hl opt">;</span></li>
<li id="n_489" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">quote</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">});</span></li>
<li id="n_490" class="hl"></li>
<li id="n_491" class="hl">      <span class="hl kwb">$spc </span><span class="hl opt">= (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>path<span class="hl opt">} =~ </span><span class="hl kwd">/lynx/</span><span class="hl opt">) ? </span><span class="hl sng">&quot;.&quot;</span> <span class="hl opt">: </span><span class="hl sng">&quot; &quot;</span><span class="hl opt">;</span></li>
<li id="n_492" class="hl">      <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_493" 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>lookup_partsgroup<span class="hl opt">&gt;</span></li>
<li id="n_494" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>partsgroup value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{partsgroup}&quot;</span><span class="hl opt">&gt;|;</span></li>
<li id="n_495" class="hl"></li>
<li id="n_496" class="hl">      <span class="hl kwa">foreach </span><span class="hl kwb">$item </span><span class="hl opt">(</span><span class="hl kwc">split </span><span class="hl kwd">/\n/</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">}) {</span></li>
<li id="n_497" class="hl">    <span class="hl opt">(</span><span class="hl kwb">$partsgroup</span><span class="hl opt">, </span><span class="hl kwb">$translation</span><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">$item</span><span class="hl opt">;</span></li>
<li id="n_498" class="hl">    <span class="hl kwb">$item </span><span class="hl opt">= (</span><span class="hl kwb">$translation</span><span class="hl opt">) ? </span><span class="hl kwb">$translation </span><span class="hl opt">: </span><span class="hl kwb">$partsgroup</span><span class="hl opt">;</span></li>
<li id="n_499" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">| &lt;</span>input <span class="hl kwa">class</span><span class="hl opt">=</span>submit type<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">$spc$item</span><span class="hl sng">&quot;</span><span class="hl opt">&gt;</span><span class="hl esc">\n</span><span class="hl opt">| </span><span class="hl kwa">if </span><span class="hl kwb">$item</span><span class="hl opt">;</span></li>
<li id="n_500" class="hl">      <span class="hl opt">}</span></li>
<li id="n_501" class="hl">    <span class="hl opt">}</span></li>
<li id="n_502" class="hl">  <span class="hl opt">}</span></li>
<li id="n_503" class="hl"></li>
<li id="n_504" 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_505" 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_506" class="hl">    <span class="hl opt">&amp;</span>menubar<span class="hl opt">;</span></li>
<li id="n_507" class="hl">  <span class="hl opt">}</span></li>
<li id="n_508" class="hl">  </li>
<li id="n_509" 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(rowcount callback path login sessionid)</span><span class="hl opt">);</span></li>
<li id="n_510" class="hl">  </li>
<li id="n_511" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_512" class="hl"><span class="hl opt">&lt;/</span>form<span class="hl opt">&gt;</span></li>
<li id="n_513" class="hl"></li>
<li id="n_514" class="hl"><span class="hl opt">&lt;/</span>body<span class="hl opt">&gt;</span></li>
<li id="n_515" class="hl"><span class="hl opt">&lt;/</span>html<span class="hl opt">&gt;</span></li>
<li id="n_516" class="hl"><span class="hl opt">|;</span></li>
<li id="n_517" class="hl"></li>
<li id="n_518" class="hl"><span class="hl opt">}</span></li>
<li id="n_519" class="hl"></li>
<li id="n_520" class="hl"></li>
<li id="n_521" class="hl"><span class="hl kwa">sub </span>post <span class="hl opt">{</span></li>
<li id="n_522" class="hl"></li>
<li id="n_523" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">isblank</span><span class="hl opt">(</span><span class="hl sng">&quot;customer&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;Customer missing!&#39;</span><span class="hl opt">));</span></li>
<li id="n_524" class="hl"></li>
<li id="n_525" class="hl">  <span class="hl slc"># if oldcustomer ne customer redo form</span></li>
<li id="n_526" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>customer<span class="hl opt">};</span></li>
<li id="n_527" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">=~ </span><span class="hl kwd">s/--.*//g</span><span class="hl opt">;</span></li>
<li id="n_528" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">.= </span><span class="hl sng">&quot;--</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{customer_id}&quot;</span><span class="hl opt">;</span></li>
<li id="n_529" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$customer </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldcustomer<span class="hl opt">}) {</span></li>
<li id="n_530" class="hl">    <span class="hl opt">&amp;</span>update<span class="hl opt">;</span></li>
<li id="n_531" class="hl">    <span class="hl kwa">exit</span><span class="hl opt">;</span></li>
<li id="n_532" class="hl">  <span class="hl opt">}</span></li>
<li id="n_533" class="hl">  </li>
<li id="n_534" class="hl">  <span class="hl opt">&amp;</span>validate_items<span class="hl opt">;</span></li>
<li id="n_535" class="hl"></li>
<li id="n_536" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">isblank</span><span class="hl opt">(</span><span class="hl sng">&quot;exchangerate&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;Exchange rate missing!&#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>currency<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>defaultcurrency<span class="hl opt">});</span></li>
<li id="n_537" class="hl">  </li>
<li id="n_538" class="hl">  <span class="hl kwb">$paid </span><span class="hl opt">= </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_539" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>paidaccounts<span class="hl opt">}) { </span><span class="hl kwb">$paid </span><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><span class="hl sng">&quot;paid_</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">}); }</span></li>
<li id="n_540" class="hl">  <span class="hl kwc">delete </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>datepaid<span class="hl opt">} </span><span class="hl kwa">unless </span><span class="hl kwb">$paid</span><span class="hl opt">;</span></li>
<li id="n_541" class="hl">  </li>
<li id="n_542" class="hl">  <span class="hl kwb">$total </span><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>invtotal<span class="hl opt">});</span></li>
<li id="n_543" class="hl">  </li>
<li id="n_544" class="hl">  <span class="hl slc"># deduct change from first payment</span></li>
<li id="n_545" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;paid_1&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">$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><span class="hl sng">&quot;paid_1&quot;</span><span class="hl opt">}) - (</span><span class="hl kwb">$paid </span><span class="hl opt">- </span><span class="hl kwb">$total</span><span class="hl opt">), </span><span class="hl num">2</span><span class="hl opt">) </span><span class="hl kwa">if </span><span class="hl kwb">$paid </span><span class="hl opt">&gt; </span><span class="hl kwb">$total</span><span class="hl opt">;</span></li>
<li id="n_546" class="hl">  </li>
<li id="n_547" class="hl">  <span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>AR<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>AR<span class="hl opt">};</span></li>
<li id="n_548" class="hl"></li>
<li id="n_549" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span>IS-<span class="hl opt">&gt;</span><span class="hl kwd">post_invoice</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_550" 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><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;Posted!&#39;</span><span class="hl opt">));</span></li>
<li id="n_551" class="hl">  <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_552" 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;Cannot post transaction!&#39;</span><span class="hl opt">));</span></li>
<li id="n_553" class="hl">  <span class="hl opt">}</span></li>
<li id="n_554" class="hl">  </li>
<li id="n_555" class="hl"><span class="hl opt">}</span></li>
<li id="n_556" class="hl"></li>
<li id="n_557" class="hl"></li>
<li id="n_558" class="hl"><span class="hl kwa">sub </span>display_row <span class="hl opt">{</span></li>
<li id="n_559" class="hl">  <span class="hl kwc">my </span><span class="hl kwb">$numrows </span><span class="hl opt">= </span><span class="hl kwc">shift</span><span class="hl opt">;</span></li>
<li id="n_560" class="hl"></li>
<li id="n_561" class="hl">  <span class="hl kwb">&#64;column_index </span><span class="hl opt">= </span><span class="hl sng">qw(partnumber description partsgroup qty unit sellprice discount linetotal)</span><span class="hl opt">;</span></li>
<li id="n_562" class="hl">    </li>
<li id="n_563" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invsubtotal<span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_564" class="hl"></li>
<li id="n_565" class="hl">  <span class="hl kwa">for </span><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>taxaccounts<span class="hl opt">}) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_base&quot;</span><span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">; }</span></li>
<li id="n_566" class="hl">  </li>
<li id="n_567" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>partnumber<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Number&#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_568" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>description<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Description&#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_569" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>qty<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Qty&#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_570" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>unit<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Unit&#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_571" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>sellprice<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Price&#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_572" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>linetotal<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading 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;Extended&#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_573" class="hl">  <span class="hl kwb">$column_data</span><span class="hl opt">{</span>discount<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>th <span class="hl kwa">class</span><span class="hl opt">=</span>listheading nowrap<span class="hl opt">&gt;%&lt;/</span>th<span class="hl opt">&gt;|;</span></li>
<li id="n_574" class="hl">  </li>
<li id="n_575" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_576" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_577" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_578" 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_579" 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_580" class="hl"></li>
<li id="n_581" 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_582" class="hl"></li>
<li id="n_583" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_584" class="hl">        <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_585" class="hl"><span class="hl opt">|;</span></li>
<li id="n_586" class="hl"></li>
<li id="n_587" class="hl">  <span class="hl kwb">$exchangerate </span><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>exchangerate<span class="hl opt">});</span></li>
<li id="n_588" class="hl">  <span class="hl kwb">$exchangerate </span><span class="hl opt">= (</span><span class="hl kwb">$exchangerate</span><span class="hl opt">) ? </span><span class="hl kwb">$exchangerate </span><span class="hl opt">: </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_589" class="hl">  </li>
<li id="n_590" class="hl">  <span class="hl kwa">for </span><span class="hl kwb">$i </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$numrows</span><span class="hl opt">) {</span></li>
<li id="n_591" class="hl">    <span class="hl slc"># undo formatting</span></li>
<li id="n_592" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(qty discount sellprice)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><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><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}); }</span></li>
<li id="n_593" class="hl"></li>
<li id="n_594" class="hl">    <span class="hl opt">(</span><span class="hl kwb">$dec</span><span class="hl opt">) = (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} =~ </span><span class="hl kwd">/\.(\d+)/</span><span class="hl opt">);</span></li>
<li id="n_595" class="hl">    <span class="hl kwb">$dec </span><span class="hl opt">= </span><span class="hl kwc">length </span><span class="hl kwb">$dec</span><span class="hl opt">;</span></li>
<li id="n_596" class="hl">    <span class="hl kwb">$decimalplaces </span><span class="hl opt">= (</span><span class="hl kwb">$dec </span><span class="hl opt">&gt; </span><span class="hl num">2</span><span class="hl opt">) ? </span><span class="hl kwb">$dec </span><span class="hl opt">: </span><span class="hl num">2</span><span class="hl opt">;</span></li>
<li id="n_597" class="hl"></li>
<li id="n_598" 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><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} != </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;oldqty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}) || (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>currency<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldcurrency<span class="hl opt">})) {</span></li>
<li id="n_599" class="hl">      <span class="hl slc"># check for a pricematrix</span></li>
<li id="n_600" class="hl">      <span class="hl kwb">&#64;a </span><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><span class="hl sng">&quot;pricematrix_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">};</span></li>
<li id="n_601" class="hl">      <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwc">scalar </span><span class="hl kwb">&#64;a</span><span class="hl opt">) {</span></li>
<li id="n_602" class="hl">    <span class="hl kwa">foreach </span><span class="hl kwb">$item </span><span class="hl opt">(</span><span class="hl kwb">&#64;a</span><span class="hl opt">) {</span></li>
<li id="n_603" class="hl">      <span class="hl opt">(</span><span class="hl kwb">$q</span><span class="hl opt">, </span><span class="hl kwb">$p</span><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">$item</span><span class="hl opt">;</span></li>
<li id="n_604" class="hl">      <span class="hl kwa">if </span><span class="hl opt">((</span><span class="hl kwb">$p </span><span class="hl opt">* </span><span class="hl num">1</span><span class="hl opt">) &amp;&amp; (</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} &gt;= (</span><span class="hl kwb">$q </span><span class="hl opt">* </span><span class="hl num">1</span><span class="hl opt">))) {</span></li>
<li id="n_605" class="hl">        <span class="hl opt">(</span><span class="hl kwb">$dec</span><span class="hl opt">) = (</span><span class="hl kwb">$p </span><span class="hl opt">=~ </span><span class="hl kwd">/\.(\d+)/</span><span class="hl opt">);</span></li>
<li id="n_606" class="hl">        <span class="hl kwb">$dec </span><span class="hl opt">= </span><span class="hl kwc">length </span><span class="hl kwb">$dec</span><span class="hl opt">;</span></li>
<li id="n_607" class="hl">        <span class="hl kwb">$decimalplaces </span><span class="hl opt">= (</span><span class="hl kwb">$dec </span><span class="hl opt">&gt; </span><span class="hl num">2</span><span class="hl opt">) ? </span><span class="hl kwb">$dec </span><span class="hl opt">: </span><span class="hl num">2</span><span class="hl opt">;</span></li>
<li id="n_608" class="hl">        <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">round_amount</span><span class="hl opt">(</span><span class="hl kwb">$p </span><span class="hl opt">/ </span><span class="hl kwb">$exchangerate</span><span class="hl opt">, </span><span class="hl kwb">$decimalplaces</span><span class="hl opt">);</span></li>
<li id="n_609" class="hl">      <span class="hl opt">}</span></li>
<li id="n_610" class="hl">    <span class="hl opt">}</span></li>
<li id="n_611" class="hl">      <span class="hl opt">}</span></li>
<li id="n_612" class="hl">    <span class="hl opt">}</span></li>
<li id="n_613" class="hl">    </li>
<li id="n_614" class="hl">    <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$i </span><span class="hl opt">&lt; </span><span class="hl kwb">$numrows</span><span class="hl opt">) {</span></li>
<li id="n_615" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>discount<span class="hl opt">} = </span>qq<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><span class="hl sng">&quot;discount_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">3 </span>value<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><span class="hl sng">&quot;discount_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}).</span>qq<span class="hl opt">|&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_616" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_617" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>discount<span class="hl opt">} = </span>qq<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_618" class="hl">    <span class="hl opt">}</span></li>
<li id="n_619" class="hl">    </li>
<li id="n_620" class="hl">    <span class="hl kwb">$discount </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">round_amount</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} * </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;discount_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}/</span><span class="hl num">100</span><span class="hl opt">, </span><span class="hl kwb">$decimalplaces</span><span class="hl opt">);</span></li>
<li id="n_621" class="hl">    <span class="hl kwb">$linetotal </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">round_amount</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} - </span><span class="hl kwb">$discount</span><span class="hl opt">, </span><span class="hl kwb">$decimalplaces</span><span class="hl opt">);</span></li>
<li id="n_622" class="hl">    <span class="hl kwb">$linetotal </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">round_amount</span><span class="hl opt">(</span><span class="hl kwb">$linetotal </span><span class="hl opt">* </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}, </span><span class="hl num">2</span><span class="hl opt">);</span></li>
<li id="n_623" class="hl"></li>
<li id="n_624" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(partnumber sku description partsgroup unit)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">quote</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}); }</span></li>
<li id="n_625" class="hl">    </li>
<li id="n_626" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>partnumber<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span><span class="hl sng">&quot;partnumber_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">20 </span>value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{&quot;</span>partnumber_<span class="hl kwb">$i</span><span class="hl sng">&quot;}&quot;</span> accesskey<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> title<span class="hl opt">=</span><span class="hl sng">&quot;[Alt-</span><span class="hl ipl">$i</span><span class="hl sng">]&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_627" class="hl"></li>
<li id="n_628" class="hl">    <span class="hl kwa">if </span><span class="hl opt">((</span><span class="hl kwb">$rows </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">numtextrows</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;description_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}, </span><span class="hl num">40</span><span class="hl opt">, </span><span class="hl num">6</span><span class="hl opt">)) &gt; </span><span class="hl num">1</span><span class="hl opt">) {</span></li>
<li id="n_629" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>description<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span>textarea name<span class="hl opt">=</span><span class="hl sng">&quot;description_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> rows<span class="hl opt">=</span><span class="hl kwb">$rows </span>cols<span class="hl opt">=</span><span class="hl num">46 </span>wrap<span class="hl opt">=</span>soft<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;description_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}&lt;</span><span class="hl kwd">/textarea&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_630" class="hl">    <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_631" class="hl">      <span class="hl kwb">$column_data</span><span class="hl opt">{</span>description<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span><span class="hl sng">&quot;description_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">48 </span>value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{&quot;</span>description_<span class="hl kwb">$i</span><span class="hl sng">&quot;}&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_632" class="hl">    <span class="hl opt">}</span></li>
<li id="n_633" class="hl"></li>
<li id="n_634" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>qty<span class="hl opt">} = </span>qq<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><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">5 </span>value<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><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}).</span>qq<span class="hl opt">|&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_635" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>unit<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td<span class="hl opt">&gt;</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;unit_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_636" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>sellprice<span class="hl opt">} = </span>qq<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><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span> size<span class="hl opt">=</span><span class="hl num">9 </span>value<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><span class="hl sng">&quot;sellprice_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}, </span><span class="hl kwb">$decimalplaces</span><span class="hl opt">).</span>qq<span class="hl opt">|&gt;&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_637" class="hl">    <span class="hl kwb">$column_data</span><span class="hl opt">{</span>linetotal<span class="hl opt">} = </span>qq<span class="hl opt">|&lt;</span>td align<span class="hl opt">=</span>right<span class="hl opt">&gt;|.</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">$linetotal</span><span class="hl opt">, </span><span class="hl num">2</span><span class="hl opt">).</span>qq<span class="hl opt">|&lt;/</span>td<span class="hl opt">&gt;|;</span></li>
<li id="n_638" class="hl">    </li>
<li id="n_639" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_640" class="hl">        <span class="hl opt">&lt;</span>tr valign<span class="hl opt">=</span>top<span class="hl opt">&gt;|;</span></li>
<li id="n_641" class="hl"></li>
<li id="n_642" 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_643" class="hl">  </li>
<li id="n_644" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_645" class="hl">        <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_646" class="hl"><span class="hl opt">|;</span></li>
<li id="n_647" class="hl"></li>
<li id="n_648" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;oldqty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;qty_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">};</span></li>
<li id="n_649" class="hl"></li>
<li id="n_650" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(id listprice lastcost taxaccounts pricematrix oldqty sku partsgroup unit inventory_accno_id income_accno_id expense_accno_id)</span><span class="hl opt">) { </span><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">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">) }</span></li>
<li id="n_651" class="hl">      </li>
<li id="n_652" class="hl">    <span class="hl kwa">for </span><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><span class="hl sng">&quot;taxaccounts_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_base&quot;</span><span class="hl opt">} += </span><span class="hl kwb">$linetotal</span><span class="hl opt">; }</span></li>
<li id="n_653" class="hl">  </li>
<li id="n_654" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invsubtotal<span class="hl opt">} += </span><span class="hl kwb">$linetotal</span><span class="hl opt">;</span></li>
<li id="n_655" class="hl">  <span class="hl opt">}</span></li>
<li id="n_656" class="hl"></li>
<li id="n_657" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_658" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_659" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_660" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_661" class="hl"></li>
<li id="n_662" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>oldcurrency value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>currency<span class="hl opt">}&gt;</span></li>
<li id="n_663" class="hl"></li>
<li id="n_664" class="hl"><span class="hl opt">|;</span></li>
<li id="n_665" class="hl"></li>
<li id="n_666" class="hl"><span class="hl opt">}</span></li>
<li id="n_667" class="hl"></li>
<li id="n_668" class="hl"></li>
<li id="n_669" class="hl"><span class="hl kwa">sub </span><span class="hl kwc">print </span><span class="hl opt">{</span></li>
<li id="n_670" class="hl">  </li>
<li id="n_671" 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>invnumber<span class="hl opt">}) {</span></li>
<li id="n_672" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invnumber<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">update_defaults</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl sng">&quot;sinumber&quot;</span><span class="hl opt">);</span></li>
<li id="n_673" 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>media<span class="hl opt">} </span><span class="hl kwc">eq </span><span class="hl sng">&#39;screen&#39;</span><span class="hl opt">) {</span></li>
<li id="n_674" class="hl">      <span class="hl opt">&amp;</span>update<span class="hl opt">;</span></li>
<li id="n_675" class="hl">      <span class="hl kwa">exit</span><span class="hl opt">;</span></li>
<li id="n_676" class="hl">    <span class="hl opt">}</span></li>
<li id="n_677" class="hl">  <span class="hl opt">}</span></li>
<li id="n_678" class="hl"></li>
<li id="n_679" class="hl">  <span class="hl kwb">$old_form </span><span class="hl opt">= </span>new Form<span class="hl opt">;</span></li>
<li id="n_680" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwc">keys </span><span class="hl kwb">%$form</span><span class="hl opt">) { </span><span class="hl kwb">$old_form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">}; }</span></li>
<li id="n_681" class="hl">  </li>
<li id="n_682" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(employee department)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} =~ </span><span class="hl kwd">s/--.*//g</span><span class="hl opt">; }</span></li>
<li id="n_683" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>invdate<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>transdate<span class="hl opt">};</span></li>
<li id="n_684" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>dateprinted<span class="hl opt">} = </span><span class="hl kwc">scalar localtime</span><span class="hl opt">;</span></li>
<li id="n_685" class="hl"></li>
<li id="n_686" class="hl">  <span class="hl opt">&amp;</span>print_form<span class="hl opt">(</span><span class="hl kwb">$old_form</span><span class="hl opt">);</span></li>
<li id="n_687" class="hl"></li>
<li id="n_688" class="hl"><span class="hl opt">}</span></li>
<li id="n_689" class="hl"></li>
<li id="n_690" class="hl"></li>
<li id="n_691" class="hl"><span class="hl kwa">sub </span>print_form <span class="hl opt">{</span></li>
<li id="n_692" class="hl">  <span class="hl kwc">my </span><span class="hl kwb">$old_form </span><span class="hl opt">= </span><span class="hl kwc">shift</span><span class="hl opt">;</span></li>
<li id="n_693" class="hl">  </li>
<li id="n_694" class="hl">  <span class="hl slc"># if oldcustomer ne customer redo form</span></li>
<li id="n_695" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">= </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>customer<span class="hl opt">};</span></li>
<li id="n_696" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">=~ </span><span class="hl kwd">s/--.*//g</span><span class="hl opt">;</span></li>
<li id="n_697" class="hl">  <span class="hl kwb">$customer </span><span class="hl opt">.= </span><span class="hl sng">&quot;--</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{customer_id}&quot;</span><span class="hl opt">;</span></li>
<li id="n_698" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$customer </span><span class="hl kwc">ne </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>oldcustomer<span class="hl opt">}) {</span></li>
<li id="n_699" class="hl">    <span class="hl opt">&amp;</span>update<span class="hl opt">;</span></li>
<li id="n_700" class="hl">    <span class="hl kwa">exit</span><span class="hl opt">;</span></li>
<li id="n_701" class="hl">  <span class="hl opt">}</span></li>
<li id="n_702" class="hl"></li>
<li id="n_703" class="hl">  <span class="hl opt">&amp;</span>validate_items<span class="hl opt">;</span></li>
<li id="n_704" class="hl"></li>
<li id="n_705" class="hl">  <span class="hl opt">&amp;{ </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{vc}_details&quot;</span> <span class="hl opt">};</span></li>
<li id="n_706" class="hl"></li>
<li id="n_707" class="hl">  <span class="hl kwb">&#64;a </span><span class="hl opt">= ();</span></li>
<li id="n_708" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">}) { </span><span class="hl kwc">push </span><span class="hl kwb">&#64;a</span><span class="hl opt">, (</span><span class="hl sng">&quot;partnumber_</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">, </span><span class="hl sng">&quot;description_</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">); }</span></li>
<li id="n_709" class="hl">  <span class="hl kwa">for </span><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>taxaccounts<span class="hl opt">}) { </span><span class="hl kwc">push </span><span class="hl kwb">&#64;a</span><span class="hl opt">, </span><span class="hl sng">&quot;${_}_description&quot;</span><span class="hl opt">; }</span></li>
<li id="n_710" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_string</span><span class="hl opt">(</span><span class="hl kwb">&#64;a</span><span class="hl opt">);</span></li>
<li id="n_711" class="hl"></li>
<li id="n_712" class="hl">  <span class="hl slc"># format payment dates</span></li>
<li id="n_713" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>paidaccounts<span class="hl opt">}) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;datepaid_</span><span class="hl ipl">$_</span><span class="hl sng">&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><span class="hl sng">&quot;datepaid_</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">}); }</span></li>
<li id="n_714" class="hl">  </li>
<li id="n_715" class="hl">  IS-<span class="hl opt">&gt;</span><span class="hl kwd">invoice_details</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_716" class="hl"></li>
<li id="n_717" 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><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>total<span class="hl opt">}) &lt;= </span><span class="hl num">0</span><span class="hl opt">) {</span></li>
<li id="n_718" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>total<span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_719" class="hl">  <span class="hl opt">} </span><span class="hl kwa">else </span><span class="hl opt">{</span></li>
<li id="n_720" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>change<span class="hl opt">} = </span><span class="hl num">0</span><span class="hl opt">;</span></li>
<li id="n_721" class="hl">  <span class="hl opt">}</span></li>
<li id="n_722" class="hl"></li>
<li id="n_723" class="hl">  <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(company address tel fax businessnumber)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span><span class="hl kwb">$_</span><span class="hl opt">}; }</span></li>
<li id="n_724" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>username<span class="hl opt">} = </span><span class="hl kwb">$myconfig</span><span class="hl opt">{</span>name<span class="hl opt">};</span></li>
<li id="n_725" class="hl"></li>
<li id="n_726" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>address<span class="hl opt">} =~ </span><span class="hl kwd">s/\\n/\n/g</span><span class="hl opt">;</span></li>
<li id="n_727" class="hl">  <span class="hl kwc">push </span><span class="hl kwb">&#64;a</span><span class="hl opt">, </span><span class="hl sng">qw(company address tel fax businessnumber username)</span><span class="hl opt">;</span></li>
<li id="n_728" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">format_string</span><span class="hl opt">(</span><span class="hl kwb">&#64;a</span><span class="hl opt">);</span></li>
<li id="n_729" class="hl"></li>
<li id="n_730" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>templates<span class="hl opt">} = </span><span class="hl sng">&quot;</span><span class="hl ipl">$myconfig</span><span class="hl sng">{templates}&quot;</span><span class="hl opt">;</span></li>
<li id="n_731" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>IN<span class="hl opt">} = </span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{type}.</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{format}&quot;</span><span class="hl opt">;</span></li>
<li id="n_732" class="hl"></li>
<li id="n_733" 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>format<span class="hl opt">} =~ </span><span class="hl kwd">/(postscript|pdf)/</span><span class="hl opt">) {</span></li>
<li id="n_734" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>IN<span class="hl opt">} =~ </span><span class="hl kwd">s/$&amp;$/tex/</span><span class="hl opt">;</span></li>
<li id="n_735" class="hl">  <span class="hl opt">}</span></li>
<li id="n_736" class="hl">  </li>
<li id="n_737" 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>media<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl sng">&#39;screen&#39;</span><span class="hl opt">) {</span></li>
<li id="n_738" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>OUT<span class="hl opt">} = </span><span class="hl sng">&quot;| </span><span class="hl ipl">$printer</span><span class="hl sng">{</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{media}}&quot;</span><span class="hl opt">;</span></li>
<li id="n_739" class="hl">  <span class="hl opt">}</span></li>
<li id="n_740" class="hl"></li>
<li id="n_741" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>discount<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>discount<span class="hl opt">} * </span><span class="hl num">100</span><span class="hl opt">);</span></li>
<li id="n_742" class="hl">  </li>
<li id="n_743" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">}--;</span></li>
<li id="n_744" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>pre<span class="hl opt">} = </span><span class="hl sng">&quot;&lt;body bgcolor=#ffffff&gt;</span><span class="hl esc">\n</span><span class="hl sng">&lt;pre&gt;&quot;</span><span class="hl opt">;</span></li>
<li id="n_745" class="hl">  <span class="hl kwc">delete </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>stylesheet<span class="hl opt">};</span></li>
<li id="n_746" class="hl">  </li>
<li id="n_747" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">parse_template</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">, </span><span class="hl kwb">$userspath</span><span class="hl opt">);</span></li>
<li id="n_748" class="hl"></li>
<li id="n_749" 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>printed<span class="hl opt">} !~ </span><span class="hl kwd">/$form-&gt;{formname}/</span><span class="hl opt">) {</span></li>
<li id="n_750" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>printed<span class="hl opt">} .= </span><span class="hl sng">&quot; </span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{formname}&quot;</span><span class="hl opt">;</span></li>
<li id="n_751" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>printed<span class="hl opt">} =~ </span><span class="hl kwd">s/^ //</span><span class="hl opt">;</span></li>
<li id="n_752" class="hl">    </li>
<li id="n_753" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;</span><span class="hl kwd">update_status</span><span class="hl opt">(</span>\<span class="hl kwb">%myconfig</span><span class="hl opt">);</span></li>
<li id="n_754" class="hl">  <span class="hl opt">}</span></li>
<li id="n_755" class="hl">  <span class="hl kwb">$old_form</span><span class="hl opt">-&gt;{</span>printed<span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>printed<span class="hl opt">};</span></li>
<li id="n_756" class="hl">  </li>
<li id="n_757" class="hl">  <span class="hl slc"># if we got back here restore the previous form</span></li>
<li id="n_758" 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>media<span class="hl opt">} </span><span class="hl kwc">ne </span><span class="hl sng">&#39;screen&#39;</span><span class="hl opt">) {</span></li>
<li id="n_759" class="hl">    <span class="hl slc"># restore and display form</span></li>
<li id="n_760" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwc">keys </span><span class="hl kwb">%$old_form</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">} = </span><span class="hl kwb">$old_form</span><span class="hl opt">-&gt;{</span><span class="hl kwb">$_</span><span class="hl opt">}; }</span></li>
<li id="n_761" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>exchangerate<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>exchangerate<span class="hl opt">});</span></li>
<li id="n_762" class="hl"></li>
<li id="n_763" class="hl">    <span class="hl kwa">for </span><span class="hl kwb">$i </span><span class="hl opt">(</span><span class="hl num">1 </span><span class="hl opt">.. </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>paidaccounts<span class="hl opt">}) {</span></li>
<li id="n_764" class="hl">      <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl sng">qw(paid exchangerate)</span><span class="hl opt">) { </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><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><span class="hl sng">&quot;${_}_</span><span class="hl ipl">$i</span><span class="hl sng">&quot;</span><span class="hl opt">}); }</span></li>
<li id="n_765" class="hl">    <span class="hl opt">}</span></li>
<li id="n_766" class="hl"></li>
<li id="n_767" class="hl">    <span class="hl kwc">delete </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>pre<span class="hl opt">};</span></li>
<li id="n_768" class="hl"></li>
<li id="n_769" 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>printandpost<span class="hl opt">}) {</span></li>
<li id="n_770" class="hl">      <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>rowcount<span class="hl opt">}--;</span></li>
<li id="n_771" class="hl">      <span class="hl opt">&amp;</span>display_form<span class="hl opt">;</span></li>
<li id="n_772" class="hl">    <span class="hl opt">}</span></li>
<li id="n_773" class="hl">  <span class="hl opt">}</span></li>
<li id="n_774" class="hl"></li>
<li id="n_775" class="hl"><span class="hl opt">}</span></li>
<li id="n_776" class="hl"></li>
<li id="n_777" class="hl"></li>
<li id="n_778" class="hl"><span class="hl kwa">sub </span>print_and_post <span class="hl opt">{</span></li>
<li id="n_779" class="hl"></li>
<li id="n_780" 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;Select a Printer!&#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>media<span class="hl opt">} </span><span class="hl kwc">eq </span><span class="hl sng">&#39;screen&#39;</span><span class="hl opt">);</span></li>
<li id="n_781" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>printandpost<span class="hl opt">} = </span><span class="hl num">1</span><span class="hl opt">;</span></li>
<li id="n_782" class="hl">  <span class="hl opt">&amp;</span><span class="hl kwc">print</span><span class="hl opt">;</span></li>
<li id="n_783" class="hl">  <span class="hl opt">&amp;</span>post<span class="hl opt">;</span></li>
<li id="n_784" class="hl"></li>
<li id="n_785" class="hl"><span class="hl opt">}</span></li>
<li id="n_786" class="hl">  </li>
<li id="n_787" class="hl"><span class="hl kwa">sub </span>lookup_partsgroup <span class="hl opt">{</span></li>
<li id="n_788" class="hl"></li>
<li id="n_789" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>action<span class="hl opt">} =~ </span><span class="hl kwd">s/\r//</span><span class="hl opt">;</span></li>
<li id="n_790" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>action<span class="hl opt">} = </span><span class="hl kwc">substr</span><span class="hl opt">(</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>action<span class="hl opt">}, </span><span class="hl num">1</span><span class="hl opt">);</span></li>
<li id="n_791" class="hl"></li>
<li id="n_792" 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>language_code<span class="hl opt">}) {</span></li>
<li id="n_793" class="hl">    <span class="hl slc"># get english</span></li>
<li id="n_794" class="hl">    <span class="hl kwa">foreach </span><span class="hl kwb">$item </span><span class="hl opt">(</span><span class="hl kwc">split </span><span class="hl kwd">/\n/</span><span class="hl opt">, </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>partsgroup<span class="hl opt">}) {</span></li>
<li id="n_795" class="hl">      <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">$item </span><span class="hl opt">=~ </span><span class="hl kwd">/$form-&gt;{action}/</span><span class="hl opt">) {</span></li>
<li id="n_796" class="hl">    <span class="hl opt">(</span><span class="hl kwb">$partsgroup</span><span class="hl opt">, </span><span class="hl kwb">$translation</span><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">$item</span><span class="hl opt">;</span></li>
<li id="n_797" class="hl">    <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>action<span class="hl opt">} = </span><span class="hl kwb">$partsgroup</span><span class="hl opt">;</span></li>
<li id="n_798" class="hl">    <span class="hl kwa">last</span><span class="hl opt">;</span></li>
<li id="n_799" class="hl">      <span class="hl opt">}</span></li>
<li id="n_800" class="hl">    <span class="hl opt">}</span></li>
<li id="n_801" class="hl">  <span class="hl opt">}</span></li>
<li id="n_802" class="hl">  </li>
<li id="n_803" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span><span class="hl sng">&quot;partsgroup_</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{rowcount}&quot;</span><span class="hl opt">} = </span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>action<span class="hl opt">};</span></li>
<li id="n_804" class="hl"> </li>
<li id="n_805" class="hl">  <span class="hl opt">&amp;</span>update<span class="hl opt">;</span></li>
<li id="n_806" class="hl"></li>
<li id="n_807" class="hl"><span class="hl opt">}</span></li>
<li id="n_808" class="hl"></li>
<li id="n_809" class="hl"></li>
<li id="n_810" class="hl"></li>
<li id="n_811" class="hl"><span class="hl kwa">sub </span>print_options <span class="hl opt">{</span></li>
<li id="n_812" class="hl"></li>
<li id="n_813" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>PD<span class="hl opt">}{</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>type<span class="hl opt">}} = </span><span class="hl sng">&quot;checked&quot;</span><span class="hl opt">;</span></li>
<li id="n_814" class="hl">  </li>
<li id="n_815" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_816" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>format value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>format<span class="hl opt">}&gt;</span></li>
<li id="n_817" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>formname value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>type<span class="hl opt">}&gt;</span></li>
<li id="n_818" class="hl"></li>
<li id="n_819" 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_820" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_821" class="hl"><span class="hl opt">|;</span></li>
<li id="n_822" class="hl"></li>
<li id="n_823" class="hl"> </li>
<li id="n_824" class="hl">  <span class="hl kwb">$media </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_825" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span>input <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio name<span class="hl opt">=</span>media value<span class="hl opt">=</span><span class="hl sng">&quot;screen&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_826" 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;Screen&#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_827" class="hl"></li>
<li id="n_828" class="hl">  <span class="hl kwa">if </span><span class="hl opt">(</span><span class="hl kwb">%printer</span><span class="hl opt">) {</span></li>
<li id="n_829" class="hl">    <span class="hl kwa">for </span><span class="hl opt">(</span><span class="hl kwc">keys </span><span class="hl kwb">%printer</span><span class="hl opt">) {</span></li>
<li id="n_830" class="hl">      <span class="hl kwb">$media </span><span class="hl opt">.= </span>qq<span class="hl opt">|</span></li>
<li id="n_831" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span>input <span class="hl kwa">class</span><span class="hl opt">=</span>radio type<span class="hl opt">=</span>radio name<span class="hl opt">=</span>media value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">&quot;</span><span class="hl opt">&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_832" class="hl">    <span class="hl opt">&lt;</span>td nowrap<span class="hl opt">&gt;</span><span class="hl kwb">$_</span><span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_833" class="hl"><span class="hl opt">|;</span></li>
<li id="n_834" class="hl">    <span class="hl opt">}</span></li>
<li id="n_835" class="hl">  <span class="hl opt">}</span></li>
<li id="n_836" class="hl"></li>
<li id="n_837" class="hl">  <span class="hl kwb">$media </span><span class="hl opt">=~ </span><span class="hl kwd">s/(value=&quot;\Q$form-&gt;{media}\E&quot;)/$1 checked/</span><span class="hl opt">;</span></li>
<li id="n_838" class="hl"></li>
<li id="n_839" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_840" class="hl">  <span class="hl kwb">$media</span></li>
<li id="n_841" class="hl">  </li>
<li id="n_842" class="hl">  <span class="hl opt">&lt;</span>td width<span class="hl opt">=</span><span class="hl num">99</span><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_843" class="hl">  </li>
<li id="n_844" 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>printed<span class="hl opt">} =~ </span><span class="hl kwd">/$form-&gt;{type}/</span><span class="hl opt">) {</span></li>
<li id="n_845" class="hl">    <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_846" class="hl">    <span class="hl opt">&lt;</span>th<span class="hl opt">&gt;</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;Printed&#39;</span><span class="hl opt">).</span>qq<span class="hl opt">|</span>\<span class="hl opt">|&lt;/</span>th<span class="hl opt">&gt;|;</span></li>
<li id="n_847" class="hl">  <span class="hl opt">}</span></li>
<li id="n_848" class="hl">  </li>
<li id="n_849" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_850" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_851" class="hl"><span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_852" class="hl"><span class="hl opt">|;</span></li>
<li id="n_853" class="hl"></li>
<li id="n_854" class="hl"><span class="hl opt">}</span></li>
<li id="n_855" class="hl"></li>
<li id="n_856" class="hl"></li>
<li id="n_857" class="hl"><span class="hl kwa">sub </span>receipts <span class="hl opt">{</span></li>
<li id="n_858" class="hl"></li>
<li id="n_859" 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;Receipts&#39;</span><span class="hl opt">);</span></li>
<li id="n_860" class="hl"></li>
<li id="n_861" class="hl">  <span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>db<span class="hl opt">} = </span><span class="hl sng">&#39;ar&#39;</span><span class="hl opt">;</span></li>
<li id="n_862" class="hl">  RP-<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_863" class="hl">  </li>
<li id="n_864" class="hl">  <span class="hl kwb">$paymentaccounts </span><span class="hl opt">= </span><span class="hl sng">&quot;&quot;</span><span class="hl opt">;</span></li>
<li id="n_865" 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">$paymentaccounts </span><span class="hl opt">.= </span><span class="hl sng">&quot;</span><span class="hl ipl">$_</span><span class="hl sng">-&gt;{accno} &quot;</span><span class="hl opt">; }</span></li>
<li id="n_866" class="hl"></li>
<li id="n_867" 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_868" class="hl">    <span class="hl slc"># accounting years</span></li>
<li id="n_869" 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_870" 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_871" 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_872" 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_873" class="hl"></li>
<li id="n_874" class="hl">    <span class="hl kwb">$selectfrom </span><span class="hl opt">= </span>qq<span class="hl opt">|</span></li>
<li id="n_875" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_876" 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_877" 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_878" 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_879" 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_880" 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_881" 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_882" 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_883" 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_884" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_885" class="hl">      <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_886" class="hl"><span class="hl opt">|;</span></li>
<li id="n_887" class="hl">  <span class="hl opt">}</span></li>
<li id="n_888" class="hl"></li>
<li id="n_889" 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_890" class="hl">  </li>
<li id="n_891" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_892" class="hl"><span class="hl opt">&lt;</span>body<span class="hl opt">&gt;</span></li>
<li id="n_893" class="hl"></li>
<li id="n_894" 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_895" class="hl"></li>
<li id="n_896" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>title value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$form</span><span class="hl sng">-&gt;{title}&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_897" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>paymentaccounts value<span class="hl opt">=</span><span class="hl sng">&quot;</span><span class="hl ipl">$paymentaccounts</span><span class="hl sng">&quot;</span><span class="hl opt">&gt;</span></li>
<li id="n_898" class="hl"></li>
<li id="n_899" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>till value<span class="hl opt">=</span><span class="hl num">1</span><span class="hl opt">&gt;</span></li>
<li id="n_900" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>subtotal value<span class="hl opt">=</span><span class="hl num">1</span><span class="hl opt">&gt;</span></li>
<li id="n_901" class="hl"></li>
<li id="n_902" 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_903" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_904" 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_905" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_906" 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_907" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_908" class="hl">    <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;</span></li>
<li id="n_909" class="hl">      <span class="hl opt">&lt;</span>table<span class="hl opt">&gt;</span></li>
<li id="n_910" class="hl">      </li>
<li id="n_911" 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>list_payments<span class="hl opt">&gt;</span></li>
<li id="n_912" class="hl">    </li>
<li id="n_913" class="hl">        <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_914" 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_915" class="hl">      <span class="hl opt">&lt;</span>td<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> value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>fromdate<span class="hl opt">}&gt;&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_916" 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;To&#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_917" class="hl">      <span class="hl opt">&lt;</span>td<span class="hl opt">&gt;&lt;</span>input name<span class="hl opt">=</span>todate 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>td<span class="hl opt">&gt;</span></li>
<li id="n_918" class="hl">    <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_919" class="hl">    <span class="hl kwb">$selectfrom</span></li>
<li id="n_920" 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 kwc">sort </span>value<span class="hl opt">=</span>transdate<span class="hl opt">&gt;</span></li>
<li id="n_921" class="hl">      <span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>db value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>db<span class="hl opt">}&gt;</span></li>
<li id="n_922" class="hl">      <span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_923" class="hl">    <span class="hl opt">&lt;/</span>td<span class="hl opt">&gt;</span></li>
<li id="n_924" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_925" class="hl">  <span class="hl opt">&lt;</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_926" 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_927" class="hl">  <span class="hl opt">&lt;/</span>tr<span class="hl opt">&gt;</span></li>
<li id="n_928" class="hl"><span class="hl opt">&lt;/</span>table<span class="hl opt">&gt;</span></li>
<li id="n_929" class="hl"></li>
<li id="n_930" class="hl"><span class="hl opt">&lt;</span>br<span class="hl opt">&gt;</span></li>
<li id="n_931" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>path value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>path<span class="hl opt">}&gt;</span></li>
<li id="n_932" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>login value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>login<span class="hl opt">}&gt;</span></li>
<li id="n_933" class="hl"><span class="hl opt">&lt;</span>input type<span class="hl opt">=</span>hidden name<span class="hl opt">=</span>sessionid value<span class="hl opt">=</span><span class="hl kwb">$form</span><span class="hl opt">-&gt;{</span>sessionid<span class="hl opt">}&gt;</span></li>
<li id="n_934" class="hl"></li>
<li id="n_935" 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_936" class="hl"><span class="hl opt">|;</span></li>
<li id="n_937" class="hl"></li>
<li id="n_938" 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_939" 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_940" class="hl">    <span class="hl opt">&amp;</span>menubar<span class="hl opt">;</span></li>
<li id="n_941" class="hl">  <span class="hl opt">}</span></li>
<li id="n_942" class="hl"></li>
<li id="n_943" class="hl">  <span class="hl kwc">print </span>qq<span class="hl opt">|</span></li>
<li id="n_944" class="hl"> </li>
<li id="n_945" class="hl"><span class="hl opt">&lt;/</span>form<span class="hl opt">&gt;</span></li>
<li id="n_946" class="hl"></li>
<li id="n_947" class="hl"><span class="hl opt">&lt;/</span>body<span class="hl opt">&gt;</span></li>
<li id="n_948" class="hl"><span class="hl opt">&lt;/</span>html<span class="hl opt">&gt;</span></li>
<li id="n_949" class="hl"><span class="hl opt">|;</span></li>
<li id="n_950" class="hl"></li>
<li id="n_951" class="hl"><span class="hl opt">}</span></li>
<li id="n_952" class="hl"></li>
<li id="n_953" 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-25 18:05:29 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
