<form action="http://www.mycht.cn/webht.php/apps/pay/iPayLinksService/gai_modal_save" method="post" id="form_modal_gai" name="form_modal_gai">
    <?php if ( ! empty($gai_info)) { ?>
    <p>已录入订单 <?php echo!empty($old_order) ? $old_order : ""; ?></p>
    <table class="table table-hover table-bordered">
        <thead>
            <th>订单号</th>
            <th>申请金额/币种</th>
            <th>实收金额</th>
        </thead>
        <?php foreach ($gai_info as $key => $value) { ?>
        <tr>
            <td><?php echo $value->COLI_ID; ?></td>
            <td><?php echo $value->GAI_SQJE; ?>&nbsp;<?php echo $value->GAI_SQJECurrency; ?></td>
            <td><?php echo $value->GAI_SSJE; ?>&nbsp;CNY</td>
        </tr>
        <?php } ?>
    </table>
    <p>撤回以上订单收款记录, 并转移到订单: (手动录入的不会撤回) </p>
    <?php } ?>
    <div class="input-group">
        <input type="text" class="form-control" id="pn_invoice" name="pn_invoice" value="<?php echo $new_order; ?>" placeholder="输入订单号" >
        <span class="input-group-addon search-btn" onclick="show_gai_modal('<?php echo $note->IPL_dealId; ?>','<?php echo $note->IPL_orderId; ?>','<?php echo $note->IPL_sn; ?>', $('#pn_invoice').val())"></span>
    </div>
    <label class="text-danger">订单号形如: 160414408_B , B商务订单，JJ160321052_T,T传统订单，请务必加上后缀</label>
    <div>订单详细内容: </div>
    <p>
        <?php
        if (!empty($order_info)) {
        echo "COLI_SN => $order_info->COLI_SN<br/>";
        echo "COLI_ID => $order_info->COLI_ID<br/>";
        echo "OPI_Email => $order_info->OPI_Email<br/>";
        echo "OPI_Name => $order_info->OPI_Name<br/>";
        echo!empty($order_info->COLI_GroupCode) ? "COLI_GroupCode => $order_info->COLI_GroupCode<br/>" : false;
        echo!empty($order_info->COLI_OrderDetailText) ? "COLI_OrderDetailText => $order_info->COLI_OrderDetailText\n" : false;
        } else {
        echo '找不到目标订单内容';
        }
        ?>
    </p>
    <input type="hidden" name="pn_txn_id" id="pn_txn_id" value="<?php echo $note->IPL_dealId; ?>" />
    <input type="hidden" name="pn_id" id="pn_id" value="<?php echo $note->IPL_sn; ?>" />
</form>
