<table width="100%" class="border">
    <tr style="height:25px;">
        <!--<td class="border" colspan="2"></td>-->        
        <td class="text-right f12 bold" colspan="3">Qty.<?php echo number_format($grqty, 2) ?></td>        
        <!--<td class="border text-right f12 bold"></td>-->        
        <td class="text-right f12 bold">Total</td>
        <td class="text-right f12 bold"><?php echo number_format($totamt, 2) ?></td>
    </tr> 
    <?php if ($getmdata['totdisc'] > 0) { ?>
        <tr style="height:25px;">
            <!--<td class="border" colspan="2"></td>-->        
            <td class="text-right f11 bold" colspan="3">Less Discount</td>
            <td class="text-right f11 bold"><?php echo number_format($getmdata['ldiscperc'], 2) . '% ' ?></td>
            <td class="text-right f11 bold"><?php echo number_format($getmdata['totdisc'], 2) ?></td>
        </tr>    

    <?php } ?>
    <?php if ($getmdata['addpack'] > 0) { ?>
        <tr style="height:25px;">
            <!--<td class="border" colspan="2"></td>-->        
            <td class="text-right f11 bold" colspan="3">Add Packing</td>
            <td class="text-right f11 bold"></td>
            <td class="text-right f11 bold"><?php echo number_format($getmdata['addpack'], 2) ?></td>
        </tr>    

        <?php
    }
    if ($getmdata['addgst'] > 0) {
        ?>
        <tr style="height:25px;">
            <!--<td class="border" colspan="2"></td>-->        
            <td class="text-right f11 bold" colspan="3">Add GT</td>
            <td class="text-right f11 bold"></td>
            <td class="text-right f11 bold"><?php echo number_format($getmdata['addgst'], 2) ?></td>
        </tr>    

    <?php } ?>
    <tr style="height:25px;">
        <td class="" colspan="3">Narration : <?= $getmdata['rem1'] . ' ' . $getmdata['rem2']; ?></td>        

        <td class="text-right f10 bold" >Bill Amount</td>
        <td class="text-right f10 bold"><?php echo rajnumformat($getmdata['billamt']) ?></td>
    </tr> 


    <tr style="height:25px;">
        <td class="bold" colspan="3">Rupees <?php echo rsword($getmdata['billamt']); ?> Only</td>        
        <?php if ($actprev > 0) {
            ?>
            <td class="text-right f10 bold" >Previous Bal. &nbsp;</td>
            <td class="text-right f10 bold"><?php echo number_format($actprev, 2) ?></td>
        <?php } ?>

    </tr> 

    <tr style="height:20px;">
        <td class="" colspan="3">Packed By : <?php echo $getmdata['packby']; ?></td>        
        <?php
        $billamt = $getmdata['billamt'];
        if ($paytype == "C") {
            $actprev = 0;
        }
        $totbal = $billamt - $advance + $actprev;

        if ($paytype != "C") {
            if ($getmdata['totadv'] > 0) {
                ?>
                <td class="text-right f11 bold">Advance</td>
                <td class="text-right f11 bold"><?php echo number_format($getmdata['totadv'], 2) ?></td>
            <?php } else {
                ?>
                <td class="" colspan="2"></td>        
             <?php } ?>

        <tr>
            <td class="" colspan="3"></td>        
            <td class="text-right f10 bold">Balance &nbsp;</td>
            <td class="text-right f10 bold"><?php echo number_format($totbal, 2) ?></td>
        </tr> 

        <td class="" colspan="2"></td>        
<?php } ?>

</tr>

</table>
<!--                <table  style="width:100% ;page-break-after: always;">

 <tr style='height:45px'></tr>
 <tr style=''>
     <td style='width:45%'>Cashier Sign </td>
     <td  style='width:30%'>Salesman Sign </td>
     <td style='width:35%;padding-right:3px' class='text-right'>Customer Sign </td>
 </tr>
 <tr style='border-bottom:1px solid black;height:25px'></tr>
 <tr style='height:25px'></tr>
 <tr style=''>
     <td colspan='3' style='font-size:15px'><b><center><?php echo $zcomp['hoadd1'] . " " . $zcomp['hoadd2'] . " " . $zcomp['hoadd3'] . " " . $zcomp['hocity'] . " " . $zcomp['hopin']; ?></center></b></td>
 </tr>
</table>-->
