<?php

/* 
 * Author       : Jai K
 * Purpose      : View for Print Format 4 (Madapalli)
 * Created On   : 2016-09-21 18:14
 */
                                $name = $data['name'];
                                $amount = is_array($amount) ? $amount[0] : $amount;
?>
                                <tr>
                                    <td width="18%" class="lbl">Name<div class="sub-lbl">பெயர்</div></td>
                                    <td width="1%">:</td>
                                    <td width="36%" style="border-bottom:2px dotted #000;"><?php echo $name[0]; ?></td>
                                    <td width="18%" class="lbl">Tamil Name<div class="sub-lbl">தமிழ்  பெயர்</div></td>
                                    <td width="1%">:</td>
                                    <td width="26%" style="border-bottom:2px dotted #000;"><?php echo tamil( $name[1] ); ?></td>
                                </tr>
                                <tr height="5"></tr>
                                <tr>
                                    <td class="lbl">Function Date<div class="sub-lbl">நிகழ்ச்சி தேதி</div></td>
                                    <td>:</td>
                                    <td style="border-bottom:2px dotted #000;"><?php echo $data['date']; ?></td>
                                    <td class="lbl">Period<div class="sub-lbl">காலம்</div></td>
                                    <td>:</td>
                                    <td style="border-bottom:2px dotted #000;"><?php echo $data['period']; ?></td>
                                </tr>
                                <tr height="5"></tr>
                                <tr>
                                    <td class="lbl">Contact No<div class="sub-lbl">தொடர்பு எண்</div></td>
                                    <td>:</td>
                                    <td style="border-bottom:2px dotted #000;"><?php echo $data['contact_no']; ?></td>
                                    <td class="lbl">Email ID<div class="sub-lbl">மின்னஞ்சல்</div></td>
                                    <td>:</td>
                                    <td style="border-bottom:2px dotted #000;"><?php echo $data['email']; ?></td>
                                </tr>
                                <tr height="5"></tr>
                            </table>
                        </td>
                    </tr>
                </table>
                
                <table width="<?php echo WIDTH; ?>" border="1" style="border-collapse:collapse;" cellpadding="5">
                    <tr>
                    	<th>SI.No<div class="sub-lbl">வரிசை எண்</div></th>
                        <th>God Name<div class="sub-lbl">கடவுள்  பெயர்</div></th>
                        <th>Prasadam Name<div class="sub-lbl">பிரசாதம்  பெயர்</div></th>
                        <th>Qty<div class="sub-lbl">எண்ணிக்கை</div></th>
                        <th>Amount<div class="sub-lbl">தொகை</div></th>
                    </tr>
                    <?php 
                        foreach( $data['items'] as $k => $item ) :
                    ?>
                            <tr>
                                <td align="center"><?php echo $k+1; ?></td>
                                <td align="center"><?php echo $item[0]; ?></td>
                                <td align="center"><?php echo $item[1]; ?></td>
                                <td align="center"><?php echo $item[2]; ?></td>
                                <td align="center"><?php echo $item[3]; ?></td>
                            </tr>
                    <?php endforeach; ?>
                </table>
                
                <table width="<?php echo WIDTH; ?>">
                    <tr>
                        <td>
                            <table border="0" width="100%" cellpadding="5">
                                <tr height="5"></tr>
                                <tr>
                                    <td colspan="2" style="font-weight:bold;">S$ <?php echo number_format($amount,2,'.',''); ?>/-  <?php echo  $pay_mode_str; ?></td>
                                </tr>
                                <tr height="5"></tr>
                                <tr>
                                    <td style="font-weight:bold;" width="20%">Amount in Words (S$):</td>
                                    <td width="80%"><?php echo convert_amount_to_word( $amount ); ?></td>
                                </tr>