403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2c.hellogtx.com/application/views/scripts/flight/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2c.hellogtx.com/application/views/scripts/flight/invoice-api.phtml
<?php

$baseUrl = $this->baseUrl;
$B2BType = $this->B2BType;
$type = $this->type;
$apiResponse = $this->apiResponse;
$withprice = $this->withprice;
$TaxSetting = $this->TaxSetting;
$FlightInvoice = $this->FlightInvoice;
$FlightNumber = $this->FlightNumber;
$bookingDataByAPI = $apiResponse['FlightBookingData'];
$customer = $apiResponse['customer'];
$getSupportContact = $apiResponse['SupportContact'];
$CompanyName = $bookingDataByAPI[0]['MasterDisplayName'];
$strCompanyAddress = $bookingDataByAPI[0]['MasterAddress'];
$Pincode = $bookingDataByAPI[0]['MasterPincode'];
$strCityTitle = $bookingDataByAPI[0]['MasterCityTitle'];
$strCountry = $bookingDataByAPI[0]['MasterCountry'];
$PrimaryMobileNo = $bookingDataByAPI[0]['MasterPrimaryMobileNo'];
$countrycode = $bookingDataByAPI[0]['Mastercountrycode'];
$PrimaryContactNo = isset($bookingDataByAPI[0]['ContactNo2']) && !empty(trim($bookingDataByAPI[0]['ContactNo2'])) ? $bookingDataByAPI[0]['ContactNo2'] : $bookingDataByAPI[0]['PrimaryContactNo'];
$PrimaryContactNo = $countrycode . $PrimaryContactNo;
$PrimaryEmail = isset($bookingDataByAPI[0]['SecondaryEmail']) && !empty(trim($bookingDataByAPI[0]['SecondaryEmail'])) ? $bookingDataByAPI[0]['SecondaryEmail'] : $bookingDataByAPI[0]['PrimaryEmail'];

if (isset($getSupportContact['EmailId']) && !empty($getSupportContact['EmailId']) && $B2BType == 2) {
    $PrimaryEmail = trim($getSupportContact['EmailId']);
}
if (isset($getSupportContact['EmailId']) && !empty($getSupportContact['EmailId']) && $B2BType == 2) {
    $PrimaryContactNo = trim($getSupportContact['countrycode']) . '-' . trim($getSupportContact['ContactNo1']);
}
$arrBookingDate = $bookingDataByAPI[0]['bookingDate'];
$XRefBookingId = $bookingDataByAPI[0]['XRefBookingId'];
$BookingStatus = $bookingDataByAPI[0]['BookingStatus'];
$AgencyGst = trim($bookingDataByAPI[0]['AgencyGst']);
$InvoiceNumber = $bookingDataByAPI[0]['InvoiceNumber'];
$InvoiceDate = $bookingDataByAPI[0]['InvoiceDate'];
$CustomerDetails = $apiResponse['CustomerDetails'];
$FareBreakdownarr = $apiResponse['FareBreakdownarr'];
$LocalFromTime = $bookingDataByAPI[0]['LocalFromTime'];
$GstNumber = $bookingDataByAPI[0]['GstNumber'];
$isgstapply = isset($customer[0]['isgstapply'])?$customer[0]['isgstapply']:0;



// echo '<pre>';
// print_r($bookingDataByAPI);
// echo '</pre>';
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="shortcut icon" href="<?php echo $this->baseUrl('public/assets/images/ico/fab.ico'); ?>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>
        GTX
    </title>

    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">

    <script type="text/javascript">
        window.onload = function() {
            let tempTitle = document.title;
            document.title = "INVOICE - <?= $XRefBookingId ?>";
            //window.print();
        };
    </script>

<style>
        body {
            font-size: 13px !important;
            font-family: 'Rubik', sans-serif;
        }

        .ticketbody__print {
            width: 100% !important;
            padding: 10px 0px;
        }

        table {
            width: 100%;
            text-align: left;
            border-collapse: collapse;
        }

        .tkt_details-table {
            margin: 20px 0;
        }

        .tkt_details-table tr th {
            border: 1px solid #262626;
            padding: 5px;
            font-size: 14px;
            background: #4a4a4a;
            color: #fff;
        }

        .tkt_details-table tr td {
            border: 1px solid #262626;
            padding: 5px;
            font-size: 14px;
        }

        @media print {
            body {
                -webkit-print-color-adjust: exact;
            }
        }

        p {
            margin: 3px !important;
        }
    </style>

</head>

<body id="body">

    <div class="relative sm:flex sm:justify-center sm:items-center min-h-screen bg-dots-darker bg-center bg-gray-100 dark:bg-dots-lighter dark:bg-gray-900 selection:bg-red-500 selection:text-white">
        <div class="max-w-7xl mx-auto p-6 lg:p-8">
            <div class="flex justify-center" style="text-align: center;">
                <table style="background:#fff; width:100%; margin: 0px auto; box-shadow: 1px 1px 15px rgba(0, 0, 0,
                0.1);" class="ticketbody__print">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style=" width:33.33%; padding:5px 40px; text-align: left;"><img src="<?= $baseUrl ?>public/upload/<?php echo $this->stylecss ?>/images/logo_email.png" class=" print_image-success"></td>
                                    <td style="width:33.33%; text-align: center;font-size: 25px;">
                                        <strong>INVOICE</strong>
                                    </td>
                                    <td style="width:33.33%; font-weight: 400; font-size: 12px;  text-align:right;line-height: 18px;">
                                        <?php if ($project != 'aerobide') { ?>
                                            <strong style="font-size: 14px;"><?= $CompanyName ?></strong><br>
                                            Email: <?= $PrimaryEmail ?><br>
                                            Phone: <?= $PrimaryContactNo ?><br>
                                            Address: <?php echo $strCompanyAddress; ?><br>
                                            <?php echo $strCityTitle; ?>
                                            <?php echo $strCountry; ?>,
                                            <?php echo $Pincode; ?><br>
                                            <?php if (isset($AgencyGst) && !empty($AgencyGst)) { ?><strong>GSTIN</strong> : <?php echo $AgencyGst; ?><br><?php } else {
                                                                                                                                                            echo 'GSTIN : NA';
                                                                                                                                                        } ?>
                                        <?php } ?>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style="border-top: 1px solid #757575;">
                                        <table style="margin-bottom: 1px;">
                                            <tbody>
                                                <tr>
                                                    <td style="width: 40px;font-weight:600;">
                                                        To,
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 40px; font-size: 13px;">
                                                        Name : <?= $CustomerDetails['name'] ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 40px; font-size: 13px;">
                                                        Address:
                                                        <?= $CustomerDetails['Address'] ?>,<?= $CustomerDetails['CityTitle'] ?>
                                                        <?= $CustomerDetails['CountryTitle'] ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 40px; font-size: 13px;">
                                                        Mobile : <?= $CustomerDetails['countrycode'] ?>
                                                        <?= $CustomerDetails['Contacts'] ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 40px; font-size: 13px;">
                                                        Email : <?= $CustomerDetails['EmailId'] ?>
                                                    </td>
                                                </tr>
                                                <?php if ($isgstapply == 1 && !empty($GstNumber)) { ?>
                                                    <tr>
                                                        <td style="width: 40px; font-size: 13px;">
                                                            GSTIN : <?= $GstNumber ?>
                                                        </td>
                                                    </tr>
                                                <?php } ?>
                                            </tbody>
                                        </table>
                                    </td>
                                    <td style="width:50%; text-align:right;font-size: 13px;  border-top: 1px solid #757575; padding: 8px; line-height: 20px;">
                                        <table>
                                            <tr>
                                                <td align="right" style="text-align:right;">
                                                    <strong>Booking ID:</strong> <?= $XRefBookingId ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="text-align:right;">
                                                    <strong>Invoice No:</strong> <?= $InvoiceNumber ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="text-align:right;">
                                                    <strong>Invoice Date:</strong>
                                                    <?= date('d-M-Y', strtotime($InvoiceDate)) ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="text-align:right;">
                                                    <strong>Travel Date:</strong>
                                                    <?= date('d-M-Y H:i', strtotime($LocalFromTime)) ?>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>

                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>

                            <div class="ticket_details-container">
                                <table class="tkt_details-table invoice_table">
                                    <thead>
                                        <tr>
                                            <th>S No.</th>
                                            <th>PNR/Ticket No.</th>
                                            <th nowrap>Sectors</th>
                                            <th>Flight</th>
                                            <th>PAX Name</th>
                                            <th>Base Fare</th>
                                            <th>OT Tax</th>
                                            <th>K3/GST</th>
                                            <th>YQ Tax</th>
                                            <th>Baggage Charges</th>
                                            <th>Meal Charges</th>
                                            <th>Seat Charges</th>
                                            <th>MF</th>
                                            <th>MFT</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $TotalFare = 0;
                                        $TotalGST = 0;
                                        $TotalDiscountValue = 0;
                                        $couponVal = 0;
                                        $TotalServiceFee = 0;
                                        $CurrencySymbol = '';
                                        $paxCount = count($bookingDataByAPI);
                                        if ($apiResponse['customer']) {
                                            foreach ($apiResponse['customer'] as $key => $trevllerValue) {
                                                $paxType = $trevllerValue['paxType'];
                                                $CustomerTitle = $trevllerValue['Title'];
                                                $CustomerFirstName = $trevllerValue['FirstName'];
                                                $CustomerLastName = $trevllerValue['LastName'];

                                                $TicketId = explode('-', $trevllerValue['TicketId']);
                                                $TicketNumber = explode('-', $trevllerValue['TicketNumber']);
                                                $Sectors = explode('@@', $trevllerValue['Sectors']);

                                                $TotalBaggFare = $trevllerValue['BagPrice'];
                                                $TotalMealFare = $trevllerValue['MealPrice'];
                                                $TotalSeatFare = $trevllerValue['SeatPrice'];
                                                $paxtypeName = $trevllerValue['paxtypeName'];
                                                $FareBreak = isset($FareBreakdownarr[$paxType]) ? $FareBreakdownarr[$paxType] : [];
                                                $FlightNumbers = [];
                                                if ($Sectors) {
                                                    foreach ($Sectors as $fl) {
                                                        $FlightNumbers[] = isset($FlightNumber[$fl]) ? $FlightNumber[$fl] : '';
                                                    }
                                                }

                                                // $BaseFare = $FareBreak['BaseFare'] / $paxCount;
                                                $CurrencySymbol = trim($FareBreak['CurrencySymbol']);
                                                

                                                $BaseFare = $FareBreak['BaseFare'];
                                                $CommissionEarned = $FareBreak['CommissionEarned'];
                                                $couponVal += isset($FareBreak['couponVal']) ? $FareBreak['couponVal'] / $paxCount : 0;
                                                $TDSEarn = $FareBreak['TDSEarn'];
                                                $AGST = $FareBreak['AGST'];
                                                $YQTax = $FareBreak['YQTax'];
                                                $MF = $FareBreak['MF'];
                                                $MFT = $FareBreak['MFT'];
                                                $Tax = $FareBreak['Tax'];
                                                $YR = $FareBreak['YR'];
                                                $FixedMarkUp = $FareBreak['FixedMarkUp'] / $paxCount;
                                                $OtherCharges = ($FareBreak['OtherCharges'] + $CommissionEarned + $TDSEarn + $YR);

                                                $BaseFare = ($BaseFare / $paxCount);
                                                $CommissionEarned = ($CommissionEarned / $paxCount);
                                                $ExtraMarkup = 0;
                                                $ExtraMarkupOnGST = 0;
                                                $Tax = ($Tax / $paxCount);
                                                $Discount = ($FareBreak['Discount'] / $paxCount);
                                                $TDSEarn = ($TDSEarn / $paxCount);
                                                $TotalFare += ($BaseFare + $CommissionEarned + $TDSEarn + $Tax + $TotalBaggFare + $TotalMealFare + $TotalSeatFare + $Discount);
                                                $TotalServiceFee += $FixedMarkUp;
                                                $OtherCharges = ($OtherCharges / $paxCount);
                                                $TotalGST += ($FareBreak['GSTOnMarkUp'] / $paxCount);
                                                $TotalDiscountValue += ($Discount);
                                        ?>
                                                <tr>
                                                    <td data-title="S.NO"><?= $key + 1 ?> </td>
                                                    <td data-title="Ticket No">
                                                        <?php
                                                        if ($TicketId) {
                                                            foreach ($TicketId as $tk => $pnr) {
                                                                $TicketNum = (isset($TicketNumber[$tk]) && $TicketNumber[$tk]) ? '(' . $TicketNumber[$tk] . ')' : '';

                                                        ?>
                                                                <p style="margin: 0px;"><?= $pnr . $TicketNum ?></p>
                                                        <?php }
                                                        } ?>
                                                    </td>
                                                    <td nowrap data-title="Sectors"><?= implode('<br>', $Sectors) ?></td>
                                                    <td nowrap data-title="Flight"> <?= implode('<br>', $FlightNumbers) ?></td>
                                                    <td data-title="PAX Name"><?= $CustomerTitle ?>. <?= $CustomerFirstName ?>
                                                        <?= $CustomerLastName ?>(<?= $paxtypeName ?>)</td>
                                                    <td data-title="Fare"><?= number_format($BaseFare, 2) ?></td>
                                                    <td data-title="OT Tax"><?= number_format(($OtherCharges), 2) ?></td>
                                                    <td data-title="K3/GST"><?= number_format($AGST, 2) ?></td>
                                                    <td data-title="YQ Tax"><?= number_format($YQTax, 2) ?></td>
                                                    <td data-title="Bag Ch"><?= number_format($TotalBaggFare, 2) ?></td>
                                                    <td data-title="Bag Ch"><?= number_format($TotalMealFare, 2) ?></td>
                                                    <td data-title="Bag Ch"><?= number_format($TotalSeatFare, 2) ?></td>
                                                    <td data-title="Bag Ch"><?= number_format($MF, 2) ?></td>
                                                    <td data-title="Bag Ch"><?= number_format($MFT, 2) ?></td>
                                                </tr>
                                        <?php
                                            }
                                        }
                                        ?>

                                    </tbody>
                                </table>
                                   <table class="tkt_details-table invoice_table">
                                    <thead>
                                        <tr>
                                            <th>GST Number</th>
                                            <th>GST Company Phone</th>
                                            <th>GST Company Address</th>
                                            <th>GST Company Email</th>
                                            <th>GST Company Name</th>
                                            <!-- <th colspan="9"></th> -->
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if (isset($bookingDataByAPI[0]['GstNumber']) && !empty($bookingDataByAPI[0]['GstNumber'])) {
                                            $GstNumber = isset($bookingDataByAPI[0]['GstNumber']) ? $bookingDataByAPI[0]['GstNumber'] : '';
                                            $GstCompany = isset($bookingDataByAPI[0]['GstCompany']) ? $bookingDataByAPI[0]['GstCompany'] : '';
                                            $GstPhone = isset($bookingDataByAPI[0]['GstPhone']) ? $bookingDataByAPI[0]['GstPhone'] : '';
                                            $GstEmail = isset($bookingDataByAPI[0]['GstEmail']) ? $bookingDataByAPI[0]['GstEmail'] : '';
                                            $GstAddress = isset($bookingDataByAPI[0]['GstAddress']) ? $bookingDataByAPI[0]['GstAddress'] : '';
                                            ?>
                                            <tr>
                                                <td data-title="GST Number"><?= $GstNumber ?></td>
                                                <td data-title="GST Company Phone"><?= $GstPhone ?></td>
                                                <td data-title="GST Company Address"><?= $GstAddress ?></td>
                                                <td data-title="GST Company Email"><?= $GstEmail ?></td>
                                                <td data-title="GST Company Name"><?= $GstCompany ?></td>
                                                <!-- <td colspan="9"></td> -->
                                            </tr>
                                        <?php } ?>

                                    </tbody>
                                </table>
                            </div>

                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tkt_details-table invoice_table">

                                <tr>
                                    <td valign="middle" style="padding:5px;font-weight: 600;font: 12px Arial;line-height: 16px;">
                                        <strong>Note</strong>: * Voidation and Refund as per fare rules 
                                        <br /><strong>Billed by</strong>: <?= $CompanyName ?>
                                    </td>
                                    <td>
                                        <table style="border:1px solid #333; width:100%; text-align:left; line-height: 19px;padding: 10px;">
                                            <tbody>
                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        Gross
                                                    </td>
                                                    <td style="padding:3px; font-size:12px; color:#000; text-align:right;">
                                                        <?= $CurrencySymbol ?> <?= number_format($TotalFare, 2) ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        Service Fee
                                                    </td>
                                                    <td style="padding:3px; font-size:12px; color:#000; text-align:right;">
                                                        <?= $CurrencySymbol ?> <?= number_format($TotalServiceFee, 2) ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        <?= ($CurrencySymbol == 'INR') ? 'GST/IGST/CGST' : 'VAT' ?>
                                                    </td>
                                                    <td style="padding:3px; font-size:12px; color:#000; text-align:right;">
                                                        <?= $CurrencySymbol ?> <?= number_format($TotalGST, 2) ?>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        Discount
                                                    </td>
                                                    <td style="padding:3px; font-size:12px; color:#000; text-align:right;">

                                                        <?= $CurrencySymbol ?> <?= number_format($TotalDiscountValue, 2) ?>

                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        Refund Upgrade
                                                    </td>
                                                    <td style="padding:3px; font-size:12px; color:#000; text-align:right;">

                                                        <p style="font-size:12px">
                                                            <?= $CurrencySymbol ?> 0.00
                                                        </p>

                                                    </td>
                                                </tr>
                                                <?php if ($couponVal > 0) { ?>
                                                    <tr>
                                                        <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                            Coupon Discount
                                                        </td>
                                                        <td style="padding:3px; font-size:12px; color:#000; text-align:right;">

                                                            <p style="font-size:12px">
                                                                <?= $CurrencySymbol ?> <?= number_format($couponVal) ?>
                                                            </p>

                                                        </td>
                                                    </tr>
                                                <?php } ?>
                                                <tr>
                                                    <td style="padding:3px; font-size:12px; color:#000; padding-left: 20px">
                                                        Total Price
                                                    </td>
                                                    <td style="padding:3px; font-weight:bold; text-align:right;">
                                                        <?= $CurrencySymbol ?>
                                                        <?= number_format(round($TotalFare + $TotalServiceFee + $TotalGST - ($TotalDiscountValue + $couponVal), 2), 2) ?>
                                                    </td>
                                                </tr>

                                            </tbody>
                                        </table>
                                    </td>

                                </tr>
                            </table>


                            <table style="margin-top:12px; width:100%; text-align:left;">
                                <tbody>
                                    <tr>
                                        <td style="background: #4a4a4a; color:#fff; padding:5px; padding-left: 20px">
                                            Terms & Conditions
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <table style="width:100%; margin-bottom: 40px;padding-top: 15px;text-align:left; line-height: 25px;" class="print-info">
                                <tbody>
                                    <tr>
                                        <td align="left">
                                            <strong>OT Tax</strong> : Other Taxes<br />
                                            <strong>K3 / GST</strong> : Goods and Services Tax<br />
                                            <strong>YQ Tax</strong> : Fuel Surcharge<br />
                                            <strong>MF</strong> : Management Fee<br />
                                            <strong>MFT</strong> : Management Fee Tax<br />
                                            <?= $FlightInvoice ?>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table style="width:100%; border-top: 1px solid black;">
                                <tbody>
                                    <tr>
                                        <td align="center" style="padding: 8px 12px; font: 13px Arial, Helvetica, sans-serif;">
                                            <b>Note:-</b> This is an electronically generated invoice and does not
                                            require a physical signature
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>

        </div>
    </div>




</body>
<script>
    const pairs = document.cookie.split(';');
    const cookies = {};
    pairs.forEach(function(value) {
        const pair = value.split('=');
        cookies[(pair[0] + '').trim()] = unescape(pair.slice(1).join('='));
    });
    if (cookies['ccode'] === 'SA') {
        var element = document.getElementsByTagName('body')[0];
        element.classList.add("body-arabic--wrapper");
    }
    // else {
    //     var element = document.getElementsByTagName('body')[0];
    //     element.classList.add("");
    // }
</script>


</html>

Youez - 2016 - github.com/yon3zu
LinuXploit