<?php
/* Smarty version 5.4.2, created on 2024-12-20 20:04:11
  from 'file:/Users/razib/Herd/suite/ui/theme/default/../../../apps/psl/views/view_application.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_6766140b3d8b46_01153335',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'e851956acd111870392321636c2d4f9c93b1524a' => 
    array (
      0 => '/Users/razib/Herd/suite/ui/theme/default/../../../apps/psl/views/view_application.tpl',
      1 => 1734743050,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_6766140b3d8b46_01153335 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_19895038586766140b3a5a93_51768008', "content");
}
/* {block "content"} */
class Block_19895038586766140b3a5a93_51768008 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/psl/views';
?>

    <div class="container">
        <div class="mx-auto card my-4" style="max-width: 900px;">
            <div class="card-body">
                <div class="d-flex justify-content-between">
                    <h3>Loan Application</h3>
                    <a target="_blank" href="<?php echo $_smarty_tpl->getValue('_url');?>
psl/app/loan-application-form/0/<?php echo $_smarty_tpl->getValue('loan_application')->uuid;?>
" class="btn btn-primary">Edit Application</a>
                </div>
                <hr>
                <div class="row">
                    <div class="col-md-6">
                        <h3>Loan Amount</h3>
                        <p><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('loan_application')->loan_amount,'USD');?>
</p>
                    </div>
                    <div class="col-md-6">
                        <h3>Interest Rate</h3>
                        <p><?php echo round((float) $_smarty_tpl->getValue('loan_application')->interest_rate, (int) 2, (int) 1);?>
%</p>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <h3>Loan Term</h3>
                        <p><?php echo $_smarty_tpl->getValue('loan_application')->loan_term;?>
 months</p>
                    </div>
                    <div class="col-md-6">
                        <h3>Monthly Payment</h3>
                        <p><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('loan_application')->monthly_payment,'USD');?>
</p>
                    </div>
                </div>

                <hr>

                <h3>ID Documents</h3>

                <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('id_documents'), 'id_document');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('id_document')->value) {
$foreach0DoElse = false;
?>
                    <?php if ($_smarty_tpl->getSmarty()->getModifierCallback('str_ends_with')($_smarty_tpl->getValue('id_document'),'.jpg') || $_smarty_tpl->getSmarty()->getModifierCallback('str_ends_with')($_smarty_tpl->getValue('id_document'),'.png') || $_smarty_tpl->getSmarty()->getModifierCallback('str_ends_with')($_smarty_tpl->getValue('id_document'),'.gif')) {?>
                        <div class="mb-3">
                            <div class="mb-1">
                                <img src="<?php echo APP_URL;?>
/storage/media/<?php echo $_smarty_tpl->getValue('id_document');?>
" class="img-thumbnail" style="max-height: 150px; width: auto; height: auto; margin: 5px;">
                            </div>
                            <a href="<?php echo APP_URL;?>
/storage/media/<?php echo $_smarty_tpl->getValue('id_document');?>
" target="_blank" class="btn btn-primary btn-block">View</a>
                        </div>
                    <?php } else { ?>
                        <a href="<?php echo APP_URL;?>
/storage/media/<?php echo $_smarty_tpl->getValue('id_document');?>
" target="_blank" class="btn btn-primary btn-block">View</a>
                    <?php }?>
                <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

                <hr>

                <h3>Loan Purpose</h3>
                <?php if (!empty($_smarty_tpl->getValue('loan_purpose'))) {?>
                    <ul>
                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('loan_purpose'), 'purpose');
$foreach1DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('purpose')->value) {
$foreach1DoElse = false;
?>
                            <li><?php echo $_smarty_tpl->getValue('purpose');?>
</li>
                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                    </ul>
                <?php }?>

                <hr>

                <div class="mb-3">
                    <strong>First Name: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->first_name;?>

                </div>
                <div class="mb-3">
                    <strong>Last Name: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->last_name;?>

                </div>
                <div class="mb-3">
                    <strong>Date of Birth: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->date_of_birth;?>

                </div>
                <div class="mb-3">
                    <strong>Social Security Number: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->ssn;?>

                </div>
                <div class="mb-3">
                    <strong>Address: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->address;?>

                </div>
                <hr>
                <div class="mb-3">
                    <strong>Phone: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->phone;?>

                </div>
                <div class="mb-3">
                    <strong>Email: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->email;?>

                </div>

                <hr>

                <div class="mb-3">
                    <strong>Property Ownership: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->property_ownership;?>

                </div>

                <div class="mb-3">
                    <strong>Marital Status: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->marital_status;?>

                </div>

                <div class="mb-3">
                    <strong>Place of Work: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->place_of_work;?>

                </div>

                <div class="mb-3">
                    <strong>Job Title: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->job_title;?>

                </div>

                <div class="mb-3">
                    <strong>Years Employed: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->years_employed;?>

                </div>

                <div class="mb-3">
                    <strong>Monthly Net Income: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->monthly_net_income;?>

                </div>

                <div class="mb-3">
                    <strong>Work Address: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->work_address;?>

                </div>


                <h5>Bank Information</h5>
                <hr>

                <div class="mb-3">
                    <strong>Bank Name: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->bank_name;?>

                </div>

                <div class="mb-3">
                    <strong>Account Number: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->account_number;?>

                </div>

                <div class="mb-3">
                    <strong>Account Type: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->account_type;?>

                </div>


                <hr>

                <div class="mb-3">
                    <strong>Payment Frequency: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->payment_frequency;?>

                </div>
                <div class="mb-3">
                    <strong>Due Date: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->due_date;?>

                </div>
                <div class="mb-3">
                    <strong>Lump Sum Amount: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->lump_sum_amount;?>

                </div>
                <div class="mb-3">
                    <strong>Installment Amount: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->installment_amount;?>

                </div>
                <div class="mb-3">
                    <strong>First Payment Date: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->first_payment_date;?>

                </div>

                <hr>

                <div class="mb-3">
                    <strong>Compounding Option: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->compounded;?>

                </div>
                <div class="mb-3">
                    <strong>Other Compounding Text: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->other_compounding_text;?>

                </div>
                <div class="mb-3">
                    <strong>Payment Schedule: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->payment_schedule;?>

                </div>

                <hr>

                <div class="mb-3">
                    <strong>Security: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->security;?>

                </div>
                <?php if ($_smarty_tpl->getValue('loan_application')->security == 'pledgeSecurity') {?>
                    <div class="mb-3">
                        <strong>Collateral: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->collateral;?>

                    </div>
                    <div class="mb-3">
                        <strong>Collateral Possession: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->collateral_possession;?>

                    </div>
                <?php }?>

                <hr>

                <h3>Guarantor Details</h3>
                <?php if ($_smarty_tpl->getValue('loan_application')->co_signer_option == 1) {?>
                    <div class="mb-3">
                        <strong>Co-Signer Name: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->co_signer_name;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor Relationship to Applicant: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_relationship_applicant;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's Place of Work: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_place_of_work;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's Work Address: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_work_address;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's Monthly Income: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_monthly_income;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's ID Type: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_id_type;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's Signature Date: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_signature_date;?>

                    </div>
                    <div class="mb-3">
                        <strong>Guarantor's Printed Name: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->guarantor_print_name;?>

                    </div>
                <?php }?>

                <hr>

                <div class="mb-3">
                    <strong>Late Payment Fee Amount: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->late_payment_fee_amount;?>

                </div>
                <div class="mb-3">
                    <strong>Late Fee Type: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->late_fee_type;?>

                </div>
                <div class="mb-3">
                    <strong>Late Fee Option: </strong> <?php echo $_smarty_tpl->getValue('loan_application')->late_fee_option;?>

                </div>

                <hr>

                <?php if ($_smarty_tpl->getValue('loan_application')->signature) {?>
                    <div class="mb-3">
                        <img src="<?php echo $_smarty_tpl->getValue('loan_application')->signature;?>
" class="img-thumbnail" style="max-height: 150px; width: auto; height: auto; margin: 5px;">
                    </div>
                <?php }?>
                <div class="mb-3">
                    Applicant Signature
                </div>

                <hr>



                <?php if ($_smarty_tpl->getValue('loan_application')->guarantor_signature) {?>
                    <div class="mb-3">
                        <img src="<?php echo $_smarty_tpl->getValue('loan_application')->guarantor_signature;?>
" class="img-thumbnail" style="max-height: 150px; width: auto; height: auto; margin: 5px;">
                    </div>
                <?php }?>
                <div class="mb-3">
                    Guarantor Signature
                </div>





            </div>
        </div>
    </div>
<?php
}
}
/* {/block "content"} */
}
