File: /var/www/grapossconnect/admin-dash/api/view_invoice_details.php
<?php
require_once('../_dbconfig.php');
// echo "ashjygsadjh";
$invcID = $_REQUEST['invcid'];
if (!empty($invcID)) {
$invoiceQuery = $conn->query("SELECT invoice_id, from_domain, if_vendor, transaction_type, payment_for, payment_type, payment_gateway_name, order_id, product_mrp, gst_rate, igst_amount, cgst_amount, sgst_amount, taxable_amount, gepl_amount, discount_amount, net_amount, customer_name, customer_address, customer_mobile, customer_email, customer_gst_name, customer_gstin, customer_state_id, customer_state_code, customer_state_name, transaction_id1, transaction_id2, transaction_date, invoice_issue_date, year_extn, invoice_status, system_datetime, cancelled_reason_if_any, cancelled_datetime, ref_name1, ref_id1, ref_name2, ref_id2, ref_name3, ref_id3, last_update_date FROM grp_gepl_invoice WHERE invoice_id='$invcID'");
$result = $invoiceQuery->fetch_assoc();
?>
<article class="panel-body">
<figure class="text-center">
<figcaption>
<h3><?php echo $result['from_domain'] . ' ( Vendor:' . $result['if_vendor'].')'; ?></h3>
</figcaption>
</figure>
</article>
<article>
<!-- <h6><strong>Details</strong></h6> -->
<div class="dropdown-divider"></div>
<div class="row">
<div class="col-md-6">
<h5><u> Customer Details </u></h5>
<dd><strong>Customer name : </strong> <?php echo $result['customer_name']; ?></dd>
<dd><strong>Customer Mobile : </strong> <?php echo $result['customer_mobile']; ?></dd>
<dd><strong>Customer Email : </strong> <?php echo $result['customer_email']; ?></dd>
<dd><strong>Customer Address : </strong> <?php echo $result['customer_address']; ?></dd>
<dd><strong>Customer GSTin : </strong> <?php echo $result['customer_gstin']; ?></dd>
<dd><strong>Customer GST Nme : </strong> <?php echo $result['customer_gst_name']; ?></dd>
<dd><strong>Customer State Name : </strong> <?php echo $result['customer_state_name'] . ' (' . $result['customer_state_code'] . ')'; ?>
<dd><strong>Transaction ID : </strong> <?php echo $result['transaction_id1']; ?></dd>
<dd><strong>Transaction Date : </strong> <?php echo $result['transaction_date']; ?></dd>
<dd><strong>Invoice Issue Date : </strong> <?php echo $result['invoice_issue_date']; ?></dd>
<dd><strong>Net Amount Paid : </strong> <?php echo $result['net_amount']; ?></dd>
<dd><strong>Order Id : </strong> <?php echo $result['order_id']; ?></dd>
</div>
<div class="col-md-6">
<h5><u> Transaction Details</u></h5>
<dd><strong>Payment For : </strong> <?php echo $result['payment_for']; ?></dd>
<dd><strong>Transaction Type : </strong> <?php echo $result['transaction_type']; ?></dd>
<dd><strong>Payment Type : </strong> <?php echo $result['payment_type']; ?></dd>
<dd><strong>Payment Gateway Name : </strong> <?php echo $result['payment_gateway_name']; ?></dd>
<dd><strong>Year Extension : </strong> <?php echo $result['year_extn']; ?></dd>
<dd><strong>Product MRP : </strong> <?php echo $result['product_mrp']; ?></dd>
<dd><strong>GST Rate : </strong> <?php echo $result['gst_rate']; ?></dd>
<dd><strong>IGST Amount : </strong> <?php echo $result['igst_amount']; ?></dd>
<dd><strong>CGST Amount : </strong> <?php echo $result['cgst_amount']; ?></dd>
<dd><strong>SGST Amount : </strong> <?php echo $result['sgst_amount']; ?></dd>
<dd><strong>Taxable Amount : </strong> <?php echo $result['taxable_amount']; ?></dd>
<dd><strong>Gepl Amount : </strong> <?php echo $result['gepl_amount']; ?></dd>
<dd><strong>Discount Amount : </strong> <?php echo $result['discount_amount']; ?></dd>
</div>
<hr>
<h5 class="text-center"><u> Other Misc Details</u></h5>
<div class="col-md-6">
<dd><strong>Invoice Status : </strong> <?php if ($result['invoice_status'] == 1) {
echo "Success";
} else {
echo "Fail";
} ?></dd>
<dd><strong>System Datetime : </strong> <?php echo $result['system_datetime']; ?></dd>
<dd><strong>Cancelled Reason If Any : </strong> <?php echo $result['cancelled_reason_if_any']; ?></dd>
<dd><strong>Cancelled Datetime : </strong> <?php echo $result['cancelled_datetime']; ?></dd>
</div>
<div class="col-md-6">
<dd><strong>Refernce Name1 : </strong> <?php echo $result['ref_name1']; ?></dd>
<dd><strong>Refernce Id1 : </strong> <?php echo $result['ref_id1']; ?></dd>
<dd><strong>Refernce Name2 : </strong> <?php echo $result['ref_name2']; ?></dd>
<dd><strong>Refernce Id2 : </strong> <?php echo $result['ref_id2']; ?></dd>
<dd><strong>Refernce Name3 : </strong> <?php echo $result['ref_name3']; ?></dd>
<dd><strong>Refernce Id3 : </strong> <?php echo $result['ref_id3']; ?></dd>
</div>
</div>
</article>
<?php } ?>