Fix - Calendar (day view) - missing recurring event indicator symbol for recurrtype...
[openemr.git] / interface / billing / payment_master.inc.php
blob54243623968aba4c2953e7e46bfd00cb06315bae
1 <?php
2 // +-----------------------------------------------------------------------------+
3 // Copyright (C) 2010 Z&H Consultancy Services Private Limited <sam@zhservices.com>
4 //
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
18 // A copy of the GNU General Public License is included along with this program:
19 // openemr/interface/login/GnuGPL.html
20 // For more information write to the Free Software
21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 //
23 // Author: Eldho Chacko <eldho@zhservices.com>
24 // Paul Simon K <paul@zhservices.com>
26 // +------------------------------------------------------------------------------+
27 //===============================================================================
28 //Check/cash details are entered here.Used in New Payment and Edit Payment screen.
29 //===============================================================================
30 //Special list function
31 function generate_list_payment_category($tag_name, $list_id, $currvalue, $title,
32 $empty_name=' ', $class='', $onchange='',$PaymentType='insurance',$screen='new_payment')
34 $s = '';
35 $tag_name_esc = htmlspecialchars( $tag_name, ENT_QUOTES);
36 $s .= "<select name='$tag_name_esc' id='$tag_name_esc'";
37 if ($class) $s .= " class='$class'";
38 if ($onchange) $s .= " onchange='$onchange'";
39 $selectTitle = htmlspecialchars( $title, ENT_QUOTES);
40 $s .= " title='$selectTitle'>";
41 $selectEmptyName = htmlspecialchars( xl($empty_name), ENT_QUOTES);
42 if ($empty_name) $s .= "<option value=''>" . $selectEmptyName . "</option>";
43 $lres = sqlStatement("SELECT * FROM list_options " .
44 "WHERE list_id = ? ORDER BY seq, title", array($list_id) );
45 $got_selected = FALSE;
46 while ($lrow = sqlFetchArray($lres)) {
47 $optionValue = htmlspecialchars( $lrow['option_id'], ENT_QUOTES);
48 $s .= "<option id='option_" . $lrow['option_id'] . "'" . " value='$optionValue'";
49 if ((strlen($currvalue) == 0 && $lrow['is_default']) ||
50 (strlen($currvalue) > 0 && $lrow['option_id'] == $currvalue) ||
51 ($lrow['option_id'] == 'insurance_payment' && $screen=='new_payment'))
53 $s .= " selected";
54 $got_selected = TRUE;
56 if (($PaymentType == 'insurance' || $screen=='new_payment') && ($lrow['option_id'] == 'family_payment' || $lrow['option_id'] == 'patient_payment'))
57 $s .= " style='background-color:#DEDEDE' ";
58 if ($PaymentType == 'patient' && $lrow['option_id'] == 'insurance_payment')
59 $s .= " style='background-color:#DEDEDE' ";
60 $optionLabel = htmlspecialchars( xl_list_label($lrow['title']), ENT_QUOTES);
61 $s .= ">$optionLabel</option>\n";
63 if (!$got_selected && strlen($currvalue) > 0) {
64 $currescaped = htmlspecialchars($currvalue, ENT_QUOTES);
65 $s .= "<option value='$currescaped' selected>* $currescaped *</option>";
66 $s .= "</select>";
67 $fontTitle = htmlspecialchars( xl('Please choose a valid selection from the list.'), ENT_QUOTES);
68 $fontText = htmlspecialchars( xl('Fix this'), ENT_QUOTES);
69 $s .= " <font color='red' title='$fontTitle'>$fontText!</font>";
71 else {
72 $s .= "</select>";
74 return $s;
76 //================================================================================================
77 if($payment_id>0)
79 $rs= sqlStatement("select pay_total,global_amount from ar_session where session_id='$payment_id'");
80 $row=sqlFetchArray($rs);
81 $pay_total=$row['pay_total'];
82 $global_amount=$row['global_amount'];
83 $rs= sqlStatement("select sum(pay_amount) sum_pay_amount from ar_activity where session_id='$payment_id'");
84 $row=sqlFetchArray($rs);
85 $pay_amount=$row['sum_pay_amount'];
86 $UndistributedAmount=$pay_total-$pay_amount-$global_amount;
88 $res = sqlStatement("SELECT check_date ,reference ,insurance_companies.name,
89 payer_id,pay_total,payment_type,post_to_date,patient_id ,
90 adjustment_code,description,deposit_date,payment_method
91 FROM ar_session left join insurance_companies on ar_session.payer_id=insurance_companies.id where ar_session.session_id ='$payment_id'");
92 $row = sqlFetchArray($res);
93 $InsuranceCompanyName=$row['name'];
94 $InsuranceCompanyId=$row['payer_id'];
95 $PatientId=$row['patient_id'];
96 $CheckNumber=$row['reference'];
97 $CheckDate=$row['check_date']=='0000-00-00'?'':$row['check_date'];
98 $PayTotal=$row['pay_total'];
99 $PostToDate=$row['post_to_date']=='0000-00-00'?'':$row['post_to_date'];
100 $PaymentMethod=$row['payment_method'];
101 $PaymentType=$row['payment_type'];
102 $AdjustmentCode=$row['adjustment_code'];
103 $DepositDate=$row['deposit_date']=='0000-00-00'?'':$row['deposit_date'];
104 $Description=$row['description'];
105 if($row['payment_type']=='insurance' || $row['payer_id']*1 > 0)
107 $res = sqlStatement("SELECT insurance_companies.name FROM insurance_companies
108 where insurance_companies.id ='$InsuranceCompanyId'");
109 $row = sqlFetchArray($res);
110 $div_after_save=$row['name'];
111 $TypeCode=$InsuranceCompanyId;
112 if($PaymentType=='')
114 $PaymentType='insurance';
117 elseif($row['payment_type']=='patient' || $row['patient_id']*1 > 0)
119 $res = sqlStatement("SELECT fname,lname,mname FROM patient_data
120 where pid ='$PatientId'");
121 $row = sqlFetchArray($res);
122 $fname=$row['fname'];
123 $lname=$row['lname'];
124 $mname=$row['mname'];
125 $div_after_save=$lname.' '.$fname.' '.$mname;
126 $TypeCode=$PatientId;
127 if($PaymentType=='')
129 $PaymentType='patient';
134 <?php
135 //================================================================================================
136 if(($screen=='new_payment' && $payment_id*1==0) || ($screen=='edit_payment' && $payment_id*1>0))
137 {//New entry or edit in edit screen comes here.
139 <table width="1024" border="0" cellspacing="0" cellpadding="10" bgcolor="#DEDEDE"><tr><td>
140 <table width="1004" border="0" style="border:1px solid black" cellspacing="0" cellpadding="0">
141 <tr height="5">
142 <td colspan="14" align="left" ></td>
143 </tr>
144 <tr>
145 <td colspan="14" align="left">&nbsp;<font class='title'>
146 <?php
147 if($_REQUEST['ParentPage']=='new_payment')//This case comes when the Finish Payments is pressed from the New Payment screen.
150 <?php echo htmlspecialchars( xl('Confirm Payment'), ENT_QUOTES) ?>
151 <?php
153 elseif($screen=='new_payment')
156 <?php echo htmlspecialchars( xl('Batch Payment Entry'), ENT_QUOTES) ?>
157 <?php
159 else
162 <?php echo htmlspecialchars( xl('Edit Payment'), ENT_QUOTES) ?>
163 <?php
166 </font></td>
167 </tr>
168 <tr height="20">
169 <td align="left" width="5" ></td>
170 <td align="left" width="110" ></td>
171 <td align="left" width="128"></td>
172 <td align="left" width="25"></td>
173 <td align="left" width="5"></td>
174 <td align="left" width="85"></td>
175 <td align="left" width="128"></td>
176 <td align="left" width="25"></td>
177 <td align="left" width="5"></td>
178 <td align="left" width="113"></td>
179 <td align="left" width="125"></td>
180 <td align="left" width="5"></td>
181 <td align="left" width="93"></td>
182 <td align="left" width="152"></td>
183 </tr>
184 <tr>
185 <td align="left" class='text'></td>
186 <td align="left" class='text'><?php echo htmlspecialchars( xl('Date'), ENT_QUOTES).':' ?></td>
187 <td align="left" class="text" ><input type='text' size='9' name='check_date' id='check_date' class="class1 text " value="<?php echo htmlspecialchars(oeFormatShortDate($CheckDate));?>"/></td>
188 <td><img src='../../interface/main/calendar/modules/PostCalendar/pntemplates/default/images/new.jpg' align='absbottom'
189 id='img_checkdate' border='0' alt='[?]' style='cursor:pointer'
190 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>' />
191 <script>
192 Calendar.setup({inputField:"check_date", ifFormat:"<?php echo $DateFormat; ?>", button:"img_checkdate"});
193 </script></td>
194 <td></td>
195 <td align="left" class='text'><?php echo htmlspecialchars( xl('Post To Date'), ENT_QUOTES).':' ?></td>
196 <td align="left" class="text"><input type='text' size='9' name='post_to_date' id='post_to_date' class="class1 text " value="<?php echo $screen=='new_payment'?htmlspecialchars(oeFormatShortDate(date('Y-m-d'))):htmlspecialchars(oeFormatShortDate($PostToDate));?>" readonly="" /></td>
197 <td><img src='../../interface/main/calendar/modules/PostCalendar/pntemplates/default/images/new.jpg' align='absbottom'
198 id='img_post_to_date' border='0' alt='[?]' style='cursor:pointer'
199 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>' />
200 <script>
201 Calendar.setup({inputField:"post_to_date", ifFormat:"<?php echo $DateFormat; ?>", button:"img_post_to_date"});
202 </script></td>
203 <td></td>
204 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Method'), ENT_QUOTES).':' ?></td>
205 <td align="left">
206 <?php
207 if($PaymentMethod=='' && $screen=='edit_payment')
208 $blankValue=' ';
209 else
210 $blankValue='';
211 echo generate_select_list("payment_method", "payment_method", "$PaymentMethod", "Payment Method","$blankValue","class1 text",'CheckVisible("yes")');
213 </td>
214 <td></td>
215 <td align="left" class="text"><?php echo htmlspecialchars( xl('Check Number'), ENT_QUOTES).':' ?></td>
216 <td>
217 <?php
218 if($PaymentMethod=='check_payment' || $PaymentMethod=='bank_draft' || $CheckNumber!='' || $screen=='new_payment')
220 $CheckDisplay='';
221 $CheckDivDisplay=' display:none; ';
223 else
225 $CheckDisplay=' display:none; ';
226 $CheckDivDisplay='';
229 <input type="text" name="check_number" style="width:140px;<?php echo $CheckDisplay;?>" autocomplete="off" value="<?php echo htmlspecialchars($CheckNumber);?>" onKeyUp="ConvertToUpperCase(this)" id="check_number" class="text " />
230 <div id="div_check_number" class="text" style="border:1px solid black; width:140px;<?php echo $CheckDivDisplay;?>">&nbsp;</div>
231 </td>
232 </tr>
233 <tr height="1">
234 <td colspan="14" align="left" ></td>
235 </tr>
236 <tr>
237 <td align="left" class="text"></td>
238 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Amount'), ENT_QUOTES).':' ?></td>
239 <td align="left"><input type="text" name="payment_amount" autocomplete="off" id="payment_amount" onchange="ValidateNumeric(this);<?php echo $screen=='new_payment'?'FillUnappliedAmount();':'FillAmount();';?>" value="<?php echo $screen=='new_payment'?htmlspecialchars('0.00'):htmlspecialchars($PayTotal);?>" style="text-align:right" class="class1 text " /></td>
240 <td align="left" ></td>
241 <td align="left" ></td>
242 <td align="left" class="text"><?php echo htmlspecialchars( xl('Paying Entity'), ENT_QUOTES).':' ?></td>
243 <td align="left"><?php
244 if($PaymentType=='' && $screen=='edit_payment')
245 $blankValue=' ';
246 else
247 $blankValue='';
248 echo generate_select_list("type_name", "payment_type", "$PaymentType", "Paying Entity","$blankValue","class1 text",'PayingEntityAction()');
250 </td>
251 <td align="left" ></td>
252 <td align="left" ></td>
253 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Category'), ENT_QUOTES).':' ?></td>
254 <td align="left"><?php
255 if($AdjustmentCode=='' && $screen=='edit_payment')
256 $blankValue=' ';
257 else
258 $blankValue='';
259 echo generate_list_payment_category("adjustment_code", "payment_adjustment_code", "$AdjustmentCode",
260 "Payment Category","$blankValue","class1 text",'FilterSelection(this)',"$PaymentType","$screen");
262 </td>
263 <td align="left" ></td>
264 <td align="left" ></td>
265 <td align="left" ></td>
266 </tr>
267 <tr height="1">
268 <td colspan="14" align="left" ></td>
269 </tr>
270 <tr>
271 <td align="left" class="text"></td>
272 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment From'), ENT_QUOTES).':' ?></td>
273 <td align="left" colspan="5"><input type="hidden" id="hidden_ajax_close_value" value="<?php echo htmlspecialchars($div_after_save);?>" /><input name='type_code' id='type_code' class="text " style="width:369px" onKeyDown="PreventIt(event)" value="<?php echo htmlspecialchars($div_after_save);?>" autocomplete="off" /><br>
274 <!-- onKeyUp="ajaxFunction(event,'non','edit_payment.php');" -->
275 <div id='ajax_div_insurance_section'>
276 <div id='ajax_div_insurance_error'>
277 </div>
278 <div id="ajax_div_insurance" style="display:none;"></div>
279 </div>
280 </div>
281 </td>
282 <td align="left" colspan="5"><div name="div_insurance_or_patient" id="div_insurance_or_patient" class="text" style="border:1px solid black; padding-left:5px; width:55px; height:17px;"><?php echo htmlspecialchars($TypeCode);?></div></td>
283 <td align="left" ></td>
284 <td align="left" ></td>
285 </tr>
286 <tr>
287 <td align="left" class='text'></td>
288 <td align="left" class='text'><?php echo htmlspecialchars( xl('Deposit Date'), ENT_QUOTES).':' ?></td>
289 <td align="left"><input type='text' size='9' name='deposit_date' id='deposit_date' onKeyDown="PreventIt(event)" class="class1 text " value="<?php echo htmlspecialchars(oeFormatShortDate($DepositDate));?>" /> </td>
290 <td><img src='../../interface/main/calendar/modules/PostCalendar/pntemplates/default/images/new.jpg' align='absbottom'
291 id='img_depositdate' border='0' alt='[?]' style='cursor:pointer'
292 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>' />
293 <script>
294 Calendar.setup({inputField:"deposit_date", ifFormat:"<?php echo $DateFormat; ?>", button:"img_depositdate"});
295 </script></td>
296 <td></td>
297 <td align="left" class="text"><?php echo htmlspecialchars( xl('Description'), ENT_QUOTES).':' ?></td>
298 <td colspan="6" align="left"><input type="text" name="description" id="description" onKeyDown="PreventIt(event)" value="<?php echo htmlspecialchars($Description);?>" style="width:396px" class="text " /></td>
299 <td align="left" class="text"><font style="font-size:11px"><?php echo htmlspecialchars( xl('UNDISTRIBUTED'), ENT_QUOTES).':' ?></font><input name="HidUnappliedAmount" id="HidUnappliedAmount" value="<?php echo ($UndistributedAmount*1==0)? htmlspecialchars("0.00") : htmlspecialchars(number_format($UndistributedAmount,2,'.',','));?>" type="hidden"/><input name="HidUnpostedAmount" id="HidUnpostedAmount" value="<?php echo htmlspecialchars($UndistributedAmount); ?>" type="hidden"/><input name="HidCurrentPostedAmount" id="HidCurrentPostedAmount" value="" type="hidden"/></td>
300 <td align="left" class="text"><div id="TdUnappliedAmount" class="text" style="border:1px solid black; width:75px; background-color:#EC7676; padding-left:5px;"><?php echo ($UndistributedAmount*1==0)? htmlspecialchars("0.00") : htmlspecialchars(number_format($UndistributedAmount,2,'.',','));?></div></td>
301 </tr>
302 <?php
303 if($screen=='new_payment')
306 <tr>
307 <td colspan="14" align="center" class="text" id="TdContainingButtons">
308 <table border="0" cellspacing="0" cellpadding="0" width="280">
309 <tr height="5">
310 <td ></td>
311 <td></td>
312 <td></td>
313 </tr>
314 <tr>
315 <td width="100"><a href="#" onClick="javascript:return SavePayment();" class="css_button"><span><?php echo htmlspecialchars( xl('Save Changes'), ENT_QUOTES);?></span></a></td>
316 <td width="110"><a href="#" onClick="javascript:ResetForm()" class="css_button"><span><?php echo htmlspecialchars( xl('Cancel Changes'), ENT_QUOTES);?></span></a></td>
317 <td width="70"><a href="#" class="css_button" onClick="javascript:OpenEOBEntry();"><span><?php echo htmlspecialchars( xl('Allocate'), ENT_QUOTES);?></span></a></td>
318 </tr>
319 </table> </td>
320 </tr>
321 <?php
324 <tr height="5">
325 <td colspan="14" align="left" ></td>
326 </tr>
327 </table>
328 </td></tr></table>
329 <?php
330 }//if(($screen=='new_payment' && $payment_id*1==0) || ($screen=='edit_payment' && $payment_id*1>0))
331 //================================================================================================
333 <?php
334 if($screen=='new_payment' && $payment_id*1>0)
335 {//After saving from the New Payment screen,all values are showed as labels.The date picker images are also removed.
337 <table width="1024" border="0" cellspacing="0" cellpadding="10" bgcolor="#DEDEDE"><tr><td align="left">
338 <table width="1004" border="0" style="border:1px solid black" cellspacing="0" cellpadding="0">
339 <tr height="5">
340 <td colspan="13" align="left" ></td>
341 </tr>
342 <tr>
343 <td colspan="13" align="left" >
345 <table width="969" border="0" cellspacing="0" cellpadding="0" align="left">
346 <tr>
347 <td colspan="13" align="left">&nbsp;<font class='title'><?php echo htmlspecialchars( xl('Batch Payment Entry'), ENT_QUOTES) ?></font></td>
348 </tr>
349 <tr height="20">
350 <td align="left" width="5" ></td>
351 <td align="left" width="106" ></td>
352 <td align="left" width="128"></td>
353 <td align="left" width="5"></td>
354 <td align="left" width="84"></td>
355 <td align="left" width="128"></td>
356 <td align="left" width="5"></td>
357 <td align="left" width="113"></td>
358 <td align="left" width="135"></td>
359 <td align="left" width="5"></td>
360 <td align="left" width="92"></td>
361 <td align="left" width="158"></td>
362 <td align="left" width="5"></td>
363 </tr>
364 <tr>
365 <td align="left" class='text'></td>
366 <td align="left" class='text'><?php echo htmlspecialchars( xl('Date'), ENT_QUOTES).':' ?></td>
367 <td align="left" class="text bottom left top right">&nbsp;<?php echo htmlspecialchars(oeFormatShortDate($CheckDate));?><input type="hidden" name="check_date" value="<?php echo htmlspecialchars(oeFormatShortDate($CheckDate));?>"/></td>
368 <td></td>
369 <td align="left" class='text'><?php echo htmlspecialchars( xl('Post To Date'), ENT_QUOTES).':' ?></td>
370 <td align="left" class="text bottom left top right">&nbsp;<?php echo htmlspecialchars(oeFormatShortDate($PostToDate));?><input type="hidden" name="post_to_date" value="<?php echo htmlspecialchars(oeFormatShortDate($PostToDate));?>"/></td>
371 <td></td>
372 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Method'), ENT_QUOTES).':' ?></td>
373 <td align="left" class="text bottom left top right">&nbsp;<?php
374 $frow['data_type']=1;
375 $frow['list_id']='payment_method';
376 generate_print_field($frow, $PaymentMethod);
377 ?><input type="hidden" name="payment_method" value="<?php echo htmlspecialchars($PaymentMethod);?>"/></td>
378 <td></td>
379 <td align="left" class="text"><?php echo htmlspecialchars( xl('Check Number'), ENT_QUOTES).':' ?></td>
380 <td class="text bottom left top right">&nbsp;<?php echo htmlspecialchars($CheckNumber);?><input type="hidden" name="check_number" value="<?php echo htmlspecialchars($CheckNumber);?>"/></td>
381 <td class="text"></td>
382 </tr>
383 <tr height="1">
384 <td colspan="13" align="left" ></td>
385 </tr>
386 <tr>
387 <td align="left" class="text"></td>
388 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Amount'), ENT_QUOTES).':' ?></td>
389 <td align="left" class="text bottom left top right">&nbsp;<?php echo htmlspecialchars($PayTotal);?><input type="hidden" name="payment_amount" value="<?php echo htmlspecialchars($PayTotal);?>"/></td>
390 <td align="left" ></td>
391 <td align="left" class="text"><?php echo htmlspecialchars( xl('Paying Entity'), ENT_QUOTES).':' ?></td>
392 <td align="left" class="text bottom left top right">&nbsp;<?php
393 $frow['data_type']=1;
394 $frow['list_id']='payment_type';
395 generate_print_field($frow, $PaymentType);
396 ?><input type="hidden" name="type_name" id="type_name" value="<?php echo htmlspecialchars($PaymentType);?>"/></td>
397 <td align="left" ></td>
398 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment Category'), ENT_QUOTES).':' ?></td>
399 <td align="left" class="text bottom left top right">&nbsp;<?php
400 $frow['data_type']=1;
401 $frow['list_id']='payment_adjustment_code';
402 generate_print_field($frow, $AdjustmentCode);
403 ?><input type="hidden" name="adjustment_code" value="<?php echo htmlspecialchars($AdjustmentCode);?>"/></td>
404 <td align="left" ></td>
405 <td align="left" ></td>
406 <td align="left" ></td>
407 <td align="left" ></td>
408 </tr>
409 <tr height="1">
410 <td colspan="13" align="left" ></td>
411 </tr>
412 <tr>
413 <td align="left" class="text"></td>
414 <td align="left" class="text"><?php echo htmlspecialchars( xl('Payment From'), ENT_QUOTES).':' ?></td>
415 <td colspan="4" align="left" class="text bottom left top right"><div name="div_insurance_or_patient" id="div_insurance_or_patient" class="text" >&nbsp;<?php echo htmlspecialchars($div_after_save);?>&nbsp;</div></td>
416 <td align="left"></td>
417 <td align="left" ><div name="div_insurance_or_patient" id="div_insurance_or_patient" class="text" style="border:1px solid black; padding-left:5px; width:55px"><?php echo htmlspecialchars($TypeCode);?></div><input type="hidden" name="type_code" value="<?php echo htmlspecialchars($TypeCode);?>"/></td>
418 <td align="left" ></td>
419 <td align="left" ></td>
420 <td align="left" ></td>
421 <td align="left" ></td>
422 <td align="left" ></td>
423 </tr>
424 <tr height="1">
425 <td colspan="13" align="left" ></td>
426 </tr>
427 <tr>
428 <td align="left" class='text'></td>
429 <td align="left" class='text'><?php echo htmlspecialchars( xl('Deposit Date'), ENT_QUOTES).':' ?></td>
430 <td align="left" class="text bottom left top right">&nbsp;<?php echo htmlspecialchars(oeFormatShortDate($DepositDate));?><input type="hidden" name="deposit_date" value="<?php echo htmlspecialchars(oeFormatShortDate($DepositDate));?>"/> </td>
431 <td></td>
432 <td align="left" class="text"><?php echo htmlspecialchars( xl('Description'), ENT_QUOTES).':' ?></td>
433 <td colspan="4" align="left" class="text bottom left top right">&nbsp;<?php echo htmlspecialchars($Description);?><input type="hidden" name="description" value="<?php echo htmlspecialchars($Description);?>"/></td>
434 <td align="left" class='text'></td>
435 <td align="left" class="text"><font style="font-size:11px"><?php echo htmlspecialchars( xl('UNDISTRIBUTED'), ENT_QUOTES).':' ?></font><input name="HidUnappliedAmount" id="HidUnappliedAmount" value="<?php echo ($UndistributedAmount*1==0)? htmlspecialchars("0.00") : htmlspecialchars(number_format($UndistributedAmount,2,'.',','));?>" type="hidden"/><input name="HidUnpostedAmount" id="HidUnpostedAmount" value="<?php echo htmlspecialchars($UndistributedAmount); ?>" type="hidden"/>
436 <input name="HidCurrentPostedAmount" id="HidCurrentPostedAmount" value="" type="hidden"/></td>
437 <td align="left" ><div id="TdUnappliedAmount" class="text" style="border:1px solid black; background-color:#EC7676; width:75px; padding-left:5px;"><?php echo ($UndistributedAmount*1==0)? htmlspecialchars("0.00") : htmlspecialchars(number_format($UndistributedAmount,2,'.',','));?></div></td>
438 <td align="left" class="text"></td>
439 </tr>
440 <tr height="5">
441 <td colspan="13" align="left"></td>
442 </tr>
443 </table>
444 </td>
445 </tr>
446 </table>
447 </td></tr></table>
448 <?php
449 }//if($screen=='new_payment' && $payment_id*1>0)
450 //================================================================================================