siddharth_application/application/views/viewIndIncomeExpense.php
2018-01-10 11:08:50 +05:30

109 lines
3.9 KiB
PHP
Executable File

<?php //print_r($data);
$extype= '';
$exname = '';
$flag = 0;
$invoiceno = '';
$document = '';
$label = '';
if(!empty($data))
{
$extype = $data[0]->type;//['type'];
$exname = $data[0]->name;//['name'];
$invoiceno = $data[0]->invoice_no;
$document =$data[0]->document;
if(!empty($invoiceno))
{
$flag = 1;
}
if($document == null)
{
$document = 'uploads/cashbook/noimage.png';
}
if($extype == 'RECEIPT')
{
$label = 'Received From :';
}
else
{
$label = 'Paid To :';
}
$final = base_url().$document;
//echo $final;
}
?>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<div align="right" style="padding-right:10px">
<a href="<?php echo base_url()?>cashbook/incomeExpenseList/<?php echo $data[0]->id.'/pdf'?>" target="_blank" class="btn btn-primary" align="right"style="padding-right:10px" >Print</a>
</div>
</div>
<div class="box-body">
<div style="left-margin:10px;">
<legend><b><?php echo $extype."&nbsp;&nbsp;-&nbsp;&nbsp;".$exname;?><b><legend>
</div>
<div class="col-md-12">
<div class="col-md-7">
<table id="viewIS">
<thead></thead>
<tbody>
<tr> <td style="text-align:right;"><h4>Date :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td></tr>
<tr> <td style="text-align:right;"><h4><?php echo $label;?></h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td></tr>
<?php if($flag == 1){?>
<tr> <td style="text-align:right;"><h4>Invoice No :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Merchant Name :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Merchant GST No :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>HSN/SAC No :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Value Before GST :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>SGST :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>CGST :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>IGST :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td></tr>
<?php }?>
<tr> <td style="text-align:right;"><h4>Total Amount :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->total)){echo $data[0]->total;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Description :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
</tbody>
</table>
</div>
<div class="col-md-5" style="border:0px solid;">
<img id="receipt" src="<?php echo $final ?>" alt="No Receipt Available" style="width: 400px;height:400px;"/><br/>
</div>
</div>
</div>
</div>
</div> </section>
</div>
<script>
$(function () {
$('#inexlist').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"aaSorting": [[ 0, "desc" ]],
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>