<style type="text/css">
#dynamic-content-container{background: #fff;}
    .navbar-default.navbar-static-side{display: none !important;}
    #page-wrapper{margin: 0px !important; padding: 0 !important;}
    .row.border-bottom{display: none !important;}
    .footer.fixed{display: none;}
    .ibox-content{padding: 0 !important;}
    body {
    -webkit-print-color-adjust:exact;
    background: #fff;
    }
    @media print{
        th{font-size: 22px !important;}
        td{font-size: 17px !important;}
    }

</style>

<table style="width: 100%; background: #fff;">
    <tr>
        <td><img style="width: 100%; height: 200px;" src="<?= get_branch_image('banner'); ?>"></td>
    </tr>
</table>

<?php

$debit_currency_symbol = isset($currencies[$invoice_data['payment_currency']]) ? $currencies[$invoice_data['payment_currency']] : NULL;
$debit_account_name = isset($accounts[$invoice_data['payment_account']]) ? $accounts[$invoice_data['payment_account']] : NULL;

$credit_account_name = isset($accounts[$invoice_data['receiving_account']]) ? $accounts[$invoice_data['receiving_account']] : NULL;
$credit_currency_symbol = isset($currencies[$invoice_data['receiving_currency']]) ? $currencies[$invoice_data['receiving_currency']] : NULL;
?>

<table style="width: 100%; margin-top: 10px;">
    <tr>
        <td style="width: 50%;">
            <strong style="color: #000 !important; font-size: 18px !important;">
                <?= print_lang($app_lang,'mod_journal_invoice_jv_num').''.$invoice_data['serial_id']; ?>
            </strong>
        </td>
        <td style="width: 50%; text-align: <?php if($app_direction == 'rtl'){echo "left";}else{ echo "right"; }?>">
            <strong style="color: #000 !important; font-size: 18px !important;">
                <?= print_lang($app_lang,'mod_journal_invoice_date').': &nbsp;&nbsp;&nbsp;'.$invoice_data['journal_date'].' / '.get_persian_date($invoice_data['journal_date']); ?>
            </strong>
        </td>
    </tr>
</table>


<table class="table table-bordered" style="width: 100%; margin-top: 10px;">
    <thead>
        <tr class="text-center">
            <th class="text-center" style="text-transform: uppercase; border: none !important; background-color: #01ac24 !important; font-weight: 900 !important; color: #fff !important; width: 25%;"><?= print_lang($app_lang,'mod_journal_invoice_accounts'); ?></th>
            <th class="text-center" style="text-transform: uppercase; border: none !important; background-color: #01ac24 !important; font-weight: 900 !important; color: #fff !important; width: 31%;"><?= print_lang($app_lang,'mod_journal_invoice_details'); ?></th>
            <th class="text-center" style="text-transform: uppercase; border: none !important; background-color: #01ac24 !important; font-weight: 900 !important; color: #fff !important; width: 17%;"><?= print_lang($app_lang,'mod_journal_invoice_debit_amount'); ?></th>
            <th class="text-center" style="text-transform: uppercase; border: none !important; background-color: #01ac24 !important; font-weight: 900 !important; color: #fff !important; width: 10%;"><?= print_lang($app_lang,'mod_journal_invoice_ex_rate'); ?></th>
            <th class="text-center" style="text-transform: uppercase; border: none !important; background-color: #01ac24 !important; font-weight: 900 !important; color: #fff !important; width: 17%;"><?= print_lang($app_lang,'mod_journal_invoice_credit_amount'); ?></th>
        </tr>
    </thead>
    <tbody>
        <tr class="text-center">
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= ucwords($debit_account_name['name']); ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= ucfirst($invoice_data['receiving_narration']); ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= $debit_currency_symbol['symbol'].' '.$invoice_data['receiving_amount']; ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= $invoice_data['rate']; ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
        </tr>

        <tr class="text-center">
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= ucwords($credit_account_name['name']); ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= ucfirst($invoice_data['payment_narration']); ?></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"><?= $credit_currency_symbol['symbol'].' '.$invoice_data['payment_amount']; ?></td>
        </tr>
        <tr style="height: 200px;">
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
            <td style="border: 1px solid #000 !important; color: #000 !important;"></td>
        </tr>
        <tr style="border: 1px solid #000 !important;">
            <td colspan="2" style="text-transform: uppercase; border: none !important; padding: 15px !important; font-weight: 900 !important; color: #000 !important;"><?= print_lang($app_lang,'mod_journal_invoice_business_manager'); ?></td>
            <td colspan="3" style="text-align: <?php if($app_direction == 'rtl'){echo "left";}else{ echo "right"; }?>; text-transform: uppercase; border: none !important; padding: 15px !important; font-weight: 900 !important; color: #000 !important;"><?= print_lang($app_lang,'mod_journal_invoice_authorised_signatory'); ?></td>
        </tr>>ALPHA SOFTWARE | 0700573290 |Development By En Sudais Noori
    </tbody>
</table>