HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /www/exchange0old/exchange/cache/%%C2^C28^C280C466%%create_orpa.html.php
<?php /* Smarty version 2.6.19, created on 2024-06-17 14:14:55
         compiled from create_orpa.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'cat', 'create_orpa.html', 43, false),array('modifier', 'siteUrl', 'create_orpa.html', 115, false),array('modifier', 'storage', 'create_orpa.html', 180, false),array('modifier', 'number_format', 'create_orpa.html', 206, false),array('modifier', 'tokenUrl', 'create_orpa.html', 207, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tbody>
    <tr>
        <td align="left" valign="top">

            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                <tbody>

                <tr>
                    <td align="center" valign="top">&nbsp;</td>
                </tr>
                <tr>
                    <td align="left" valign="middle" class="login_bg"><table cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                        <tr>
                            <td align="left" width="" valign="middle" class="login_bg_t">Exchange Trade Centre |
                                <?php if (isset ( $this->_tpl_vars['orpa']['id'] )): ?>
                                Edit b-ETR Trade
                                <?php else: ?>
                                Open b-ETR Trade
                                <?php endif; ?></td>
                            <td width="" align="left" valign="middle" class="txt_11">Originator Organisation ID: <?php echo $_SESSION['user']['org_ref_id']; ?>
  </td>
                            <td align="right" width="" valign="middle" class="txt_11"><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'originator_top_dashboard_links.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
                        </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
                <tr>

                    <td align="center" valign="top" class="about_c">

                        <table cellspacing="5" cellpadding="5" border="0" width="100%">
                            <tbody>

                            <tr>

                                <td align="left" width="18%" valign="top"><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'left_sidebar.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
                                <td align="right" width="82%" valign="top"  id="tool">

                                    <?php if (isset ( $this->_tpl_vars['orpa']['id'] )): ?>
                                    <?php $this->assign('action_url', ((is_array($_tmp="index.php?do=save_oetr&orpa_id=")) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['orpa']['id']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['orpa']['id']))); ?>
                                    <?php else: ?>
                                    <?php $this->assign('action_url', "index.php?do=save_oetr"); ?>
                                    <?php endif; ?>
                                    <form name="form" action="<?php echo $this->_tpl_vars['action_url']; ?>
" id="opentrade" method="post" enctype="multipart/form-data">
                                        <table cellspacing="2" cellpadding="3" border="0" width="100%" class="hdr_center">
                                            <tbody>
                                            <tr>
                                                <td align="left" valign="top" class="inves_top1" colspan="3">
                                                    <?php if (isset ( $this->_tpl_vars['orpa']['id'] )): ?>
                                                    Edit b-ETR Trade
                                                    <?php else: ?>
                                                    Open b-ETR Trade
                                                    <?php endif; ?>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td colspan="3">
                                                    <table cellspacing="0" cellpadding="0" border="0" width="100%" >
                                                        <tr>
                                                            <td>
                                                                <?php if (! empty ( $this->_tpl_vars['result'] )): ?>
                                                                <div class="success-msgbox">
                                                                    <?php echo $this->_tpl_vars['result']; ?>

                                                                </div>
                                                                <?php endif; ?>

                                                                <?php if (! empty ( $this->_tpl_vars['error_message'] )): ?>
                                                                <div class="error-msgbox">
                                                                    <?php echo $this->_tpl_vars['error_message']; ?>

                                                                </div>
                                                                <?php endif; ?>

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

                                            <tr>
                                                <td align="center" valign="top" class="txt_11_red" width="2">&nbsp;</td>
                                                <td align="left" valign="top" width="33%">&nbsp;</td>
                                                <td align="left" valign="top" width="70%"><div class="error-msgbox" >
                                                    Submit Trades before <b style="color:#FF0000;font-size:11px;"><?php echo $this->_tpl_vars['clearSweepOut']; ?>
</b> to receive <a href="javascript:void(0);" onclick="javascript:window.open('/faq#tomnext','','scrollbars=yes,width=1000,height=800');" style="color:#0033FF;text-decoration:underline;font-size:11px;">TomNext</a> Purchase Payment
                                                </div></td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td align="center" valign="top" class="txt_11_red">*</td>
                                                <td align="left" valign="top" id="selface">
                                                    <b>Expected Date :</b>&nbsp; <span class="txt_11_cute">(DD/MM/YYYY)</span>
                                                </td>
                                                <td align="left" valign="top" width="75%">
                                                    <div id="body_tag">
                                                        <div class="search_all" id="search_all_id">
                                                            <div class="search_element1">
                                                                <div class="city_div">
                                                                    <input type="text" value="<?php echo $this->_tpl_vars['values']['ex_date']; ?>
" name="ex_date" id="ex_date" class="text_dd_code clsBlurs" tabindex="11" size="2" maxlength="2">
                                                                    &nbsp;
                                                                    <input type="text" value="<?php echo $this->_tpl_vars['values']['ex_month']; ?>
" name="ex_month" id="ex_month" class="text_dd_code clsBlurs" tabindex="12" size="2" maxlength="2">
                                                                    &nbsp;
                                                                    <input type="text" maxlength="4" size="4" tabindex="13" class="text_c_code clsBlurs" id="ex_year" name="ex_year" value="<?php echo $this->_tpl_vars['values']['ex_year']; ?>
">
                                                                    &nbsp;<a href="javascript:void(0);" title="<?php echo $this->_tpl_vars['help']['9']['content']; ?>
" class="under">(?)</a>
                                                                    <script>
                                                                        //For Date Picker
                                                                        $(function() {
                                                                            $( "#ex_year" ).datepicker({
                                                                                minDate: 0,
                                                                                showOn: "button",
                                                                                buttonImage: "<?php echo ((is_array($_tmp='/images/calender_month.png')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
",
                                                                                buttonImageOnly: true,
                                                                                onSelect: function( selectedDate ) {
                                                                                    var
                                                                                            i =0,
                                                                                            selDate = selectedDate.split('/'),
                                                                                            dates = ["ex_month","ex_date","ex_year"];

                                                                                    for(i = 0; i <=2; i++){
                                                                                        $( "#"+dates[i] ).val(selDate[i]);
                                                                                    }
                                                                                }
                                                                            });
                                                                        });
                                                                    </script>
                                                                </div>
                                                            </div>
                                                            <div class="clear_div"></div>
                                                        </div>
                                                    </div>
                                                    <br/>
                                                    <span style="color:#FF0000;"><?php echo $this->_tpl_vars['messages']['ex_date']; ?>
</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td align="left" valign="top">Friendly Name :</td>
                                                <td align="left" valign="top">
                                                    <table cellpadding="0" cellspacing="1" border="0">
                                                    <tr>
                                                        <td align="left" valign="top">
                                                            <input type="text" name="friendly_name" id="friendly_name" id="friendly_name" value="<?php if ($this->_tpl_vars['values']['friendly_name']): ?><?php echo $this->_tpl_vars['values']['friendly_name']; ?>
<?php else: ?><?php echo $this->_tpl_vars['orpa']['friendly_name']; ?>
<?php endif; ?>" class="text_b" />
                                                            <br/>
                                                            <span style="color:#FF0000;"><?php echo $this->_tpl_vars['messages']['friendly_name']; ?>
</span>
                                                        </td>
                                                        <td align="left" valign="top">&nbsp;<a href="javascript:void(0);" title="Friendly Name" class="under">(?)</a></td>
                                                    </tr>
                                                </table></td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td align="left" valign="top"> Description :</td>
                                                <td align="left" valign="top"><table cellpadding="0" cellspacing="1" border="0">
                                                    <tr>
                                                        <td align="left" valign="top">
                                                            <textarea cols="30" tabindex="17" rows="2" name="description" id="description"><?php if ($this->_tpl_vars['values']['description']): ?><?php echo $this->_tpl_vars['values']['description']; ?>
<?php else: ?><?php echo $this->_tpl_vars['orpa']['description']; ?>
<?php endif; ?></textarea>
                                                            <br/>
                                                            <span style="color:#FF0000;"><?php echo $this->_tpl_vars['messages']['description']; ?>
</span>
                                                        </td>
                                                        <td align="left" valign="top">&nbsp;<a href="javascript:void(0);" title="Description" class="under">(?)</a></td>
                                                    </tr>
                                                </table></td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td align="left" valign="middle">Attach Supporting Document: </td>
                                                <td align="left" valign="top">
                                                    <?php if ($this->_tpl_vars['orpa']['file_support']): ?>
                                                        <label  class="btn btn-yellow btn-default js-file-upload"
                                                                data-name="file"
                                                                data-accept=".pdf"
                                                                data-action="?do=upload_oetr_file_support"
                                                                data-tabindex="15">Change File
                                                        </label>
                                                        <div style="margin-top: 5px;">Use View button to view File
                                                            <a href="<?php echo ((is_array($_tmp=$this->_tpl_vars['orpa']['file_support'])) ? $this->_run_mod_handler('storage', true, $_tmp, "originator-documents") : smarty_modifier_storage($_tmp, "originator-documents")); ?>
" class="viewlink" target="_blank" style="border:1px solid #000; padding:1px 5px;">View</a>
                                                        </div>
                                                    <?php else: ?>
                                                        <label  class="btn btn-yellow btn-default js-file-upload"
                                                                data-name="file"
                                                                data-accept=".pdf"
                                                                data-action="?do=upload_oetr_file_support"
                                                                data-tabindex="15">Choose File
                                                        </label>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">&nbsp;</td>
                                            </tr>
                                            <tr class="row2">
                                                <td align="center" valign="top" colspan="3"><span class="black">Your Trade Terms</span></td>
                                            </tr>
                                            <tr>
                                                <td height="43">&nbsp;</td>
                                                <td align="left" valign="top"></td>
                                                <td align="left" valign="top">
                                                    <table cellpadding="3" cellspacing="0" border="0" width="100%" id="field_set1_model2" style="">
                                                        <tbody><tr>
                                                            <td valign="top" align="center" class="txt_11_red" width="5">*</td>
                                                            <td width="170" valign="top">d-ETR Monthly Discount Percentage: </td>
                                                            <td width="300" valign="top"><input type="text" maxlength="9" size="6" tabindex="24" class="text_6_code" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['values']['discount_price'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 3) : smarty_modifier_number_format($_tmp, 3)); ?>
" name="discount_price" id="discount_price" readonly="">
                                                                &nbsp;<a href="javascript:void(0);" title="The Monthly Discount Percentage is pre-set according to your RSA agreement with Credebt Exchange&reg;" class="under">(?)</a> &nbsp;<a href="javascript:void(0);" onclick="javascript:window.open('<?php echo ((is_array($_tmp='/exchange-help/originator/sales')) ? $this->_run_mod_handler('tokenUrl', true, $_tmp) : smarty_modifier_tokenUrl($_tmp)); ?>
','','scrollbars=yes,width=1300,height=800');" class="Clstr_hints">Learn more about Discount Percentages</a>&nbsp;<a href="javascript:void(0);" title="Learn more about Discount Percentages using this link" class="under">(?)</a> <br>
                                                                <span style="color:#FF0000;"></span>
                                                            </td></tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="43">&nbsp;</td>
                                                <td align="left" valign="top"></td>
                                                <td align="left" valign="top">
                                                    <table cellpadding="3" cellspacing="0" border="0" width="100%" id="field_set2_model2" style="">
                                                        <tbody>
                                                        <tr>
                                                            <td valign="top" align="center" class="txt_11_red" width="5">*</td>
                                                            <td width="170" valign="top">c-ETR Sell Rate Percentage: </td>
                                                            <td width="300" valign="top"><input type="text" maxlength="9" size="6" tabindex="27" class="text_6_code" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['values']['buyout_discount_price'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 3) : smarty_modifier_number_format($_tmp, 3)); ?>
" name="buyout_discount_price" id="buyout_discount_price" readonly="">
                                                                &nbsp;<a href="javascript:void(0);" title="Your current c-ETR Sell Rate agreed with Credebt Exchange&reg;" class="under">(?)</a> <br>
                                                                <span style="color:#FF0000;"></span>
                                                            </td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr class="row2">
                                                <td align="center" valign="top" colspan="3">&nbsp;</td>
                                            </tr>
                                            <?php if (! empty ( $this->_tpl_vars['po_documents'] )): ?>
                                            <tr>
                                                <td colspan="3">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="op_list" class="tbl-op-list">
                                                        <thead>
                                                        <tr>
                                                            <th colspan="4" style="border-bottom: 1px solid black;">PO List</th>
                                                        </tr>
                                                        <tr>
                                                            <th class="debtor" valign="top" >Debtor</th>
                                                            <th valign="top">Currency</th>
                                                            <th valign="top" class="amount">Amount</th>
                                                            <th valign="top">Actions</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody>
                                                        <?php $_from = $this->_tpl_vars['po_documents']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['po_doc']):
?>
                                                        <tr>
                                                            <td><?php echo $this->_tpl_vars['po_doc']['debtor_name']; ?>
</td>
                                                            <td><?php echo $this->_tpl_vars['po_doc']['currency_code']; ?>
</td>
                                                            <td class="amount"><?php echo ((is_array($_tmp=$this->_tpl_vars['po_doc']['amount'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : smarty_modifier_number_format($_tmp, 2)); ?>
</td>
                                                            <td>
                                                                <a class="Clstr_hints" href="<?php echo $this->_tpl_vars['po_doc']['doc_url']; ?>
" target="_blank">
                                                                    View
                                                                </a>
                                                                &nbsp;
                                                                <a href="#" onclick="deleteExistPo($(this), <?php echo $this->_tpl_vars['po_doc']['id']; ?>
);return false;" class="Clstr_hints">
                                                                    Delete
                                                                </a>
                                                            </td>
                                                        </tr>
                                                        <?php endforeach; endif; unset($_from); ?>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">&nbsp;</td>
                                            </tr>
                                            <?php endif; ?>
                                            <?php if ($this->_tpl_vars['orpa']['status'] != 4): ?>
                                            <tr>
                                                <td align="center" valign="top" colspan="3">
                                                    <?php if (isset ( $this->_tpl_vars['orpa']['id'] ) && count ( $this->_tpl_vars['po_documents'] )): ?>
                                                        <input type="submit" tabindex="29"  class="login_bttn" value="Submit" name="submit"/>
                                                    <?php else: ?>
                                                    <input type="submit" tabindex="29"  class="login_bttn" value="Next" name="save"/>
                                                    <?php endif; ?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3"  id="clsAckNots">&nbsp;</td>
                                            </tr>
                                            <?php endif; ?>
                                            </tbody>

                                        </table>
                                    </form>
                                </td>

                            </tr>

                            </tbody>

                        </table>
                    </td>

                </tr>

                </tbody>

            </table>
        </td>

    </tr>

    <tr>
        <td align="left" valign="top">&nbsp;</td>
    </tr>
    </tbody>

</table>
<script>
    $(function() {
        orpa_date = null;
        ex_date = null;
        <?php if (isset ( $this->_tpl_vars['values']['orpa_date'] )): ?>
        orpa_date = '<?php echo $this->_tpl_vars['values']['orpa_year']; ?>
-<?php echo $this->_tpl_vars['values']['orpa_month']; ?>
-<?php echo $this->_tpl_vars['values']['orpa_date']; ?>
';
        <?php elseif (isset ( $this->_tpl_vars['orpa']['orpa_date'] )): ?>
        orpa_date = '<?php echo $this->_tpl_vars['orpa']['orpa_date']; ?>
';
        <?php endif; ?>
        <?php if (isset ( $this->_tpl_vars['values']['ex_date'] )): ?>
        ex_date = '<?php echo $this->_tpl_vars['values']['ex_year']; ?>
-<?php echo $this->_tpl_vars['values']['ex_month']; ?>
-<?php echo $this->_tpl_vars['values']['ex_date']; ?>
';
        <?php elseif (isset ( $this->_tpl_vars['orpa']['expected_date'] )): ?>
        ex_date = '<?php echo $this->_tpl_vars['orpa']['expected_date']; ?>
';
        <?php endif; ?>
        if(orpa_date){
            $dateAr = orpa_date.split('-');
            $('#orpa_year').val($dateAr[0]);
            $('#orpa_month').val($dateAr[1]);
            $('#orpa_date').val($dateAr[2]);
        }
        if(ex_date){
            $dateAr = ex_date.split('-');
            $('#ex_year').val($dateAr[0]);
            $('#ex_month').val($dateAr[1]);
            $('#ex_date').val($dateAr[2]);
        }
    });
    function deleteExistPo($el, $id) {
        if (confirm('Do you want to delete this record ?')) {
            $.get('?do=delete_oetr_po&orpa_po_id=' + $id, function () {
                window.location.reload();
            });
        }
    }
</script>
<style>
    .tbl-op-list th,
    .tbl-op-list td{padding: 5px 20px 5px 5px ; text-align: left;}
    .tbl-op-list .amount{text-align: right;}

    .clsrm td{
        line-height:normal;
        padding:0 !important;
    }
    .none{
        display:none;
    }
    .Clstr_hints, .Clstr_hints:hover{
        font-size:10px !important;
    }
    .text_dd_code{
        width:15px;
    }

    .hdr_center {padding: 1px}

</style>
<script type="text/javascript" src="<?php echo ((is_array($_tmp='/js/jquery.form.js')) ? $this->_run_mod_handler('siteUrl', true, $_tmp) : smarty_modifier_siteUrl($_tmp)); ?>
"></script>
<script type="text/javascript">
    var jsInputFiles = $('.js-file-upload');

    jsInputFiles.each(function () {
        var $btn = $(this),
                accept = $btn.attr('data-accept'),
                name = $btn.attr('data-name'),
                tabindex = $btn.attr('data-tabindex'),
                $form = $('<form method="POST" ecntype="multipart/form-data" action="' + $btn.attr('data-action') + '"></form>');

        $btn.after($form);

        $form
                .addClass('js-form-file-upload')
                .append($btn)
                .append('<div class="progress"><div class="bar">0%</div></div>')
                .append('<div class="form-result"></div>');

        $btn.append('<input type="file" name="document" style="display: none"/>');

        var $input = $btn.find('input[type=file]'),
                $progress = $form.find('.progress'),
                $progressBar = $progress.find('.bar'),
                $formResult = $form.find('.form-result');

        if (accept) {
            $input.attr('accept', accept);
        }

        if (name) {
            $input.attr('name', name);
            $("#" + name + "_help").insertAfter('label[data-name="' + name + '"]');
        }

        if (tabindex) {
            $input.attr('tabindex', tabindex);
        }

        $form.ajaxForm({
            beforeSend: function() {
                $progress.css('visibility', 'visible');
            },
            uploadProgress: function(event, position, total, percentComplete) {
                var percentVal = percentComplete + '%';
                $progressBar.width(percentVal).html(percentVal);
            },
            success: function() {
                var percentVal = '100%';
                $progressBar.width(percentVal).html(percentVal);
            },
            complete: function(xhr) {
                $formResult.html(xhr.responseText);
            }
        });

        // bind submit handler to form
        $input.on('change', function () {
            $(this).appendTo('#' + $(this).attr('name') + '_block');
            $form.submit();
            return false;
        });
    });

</script>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>