<form action="<?php echo site_url('apps/paypal/index/note_modal_save'); ?>" method="post" id="form_modal_orderid" name="form_modal_orderid">

    <dl class="dl-horizontal">
        <dt>交易号</dt>
        <dd><?php echo $note->pn_txn_id ?> ( <?php echo $note->pn_payment_status; ?> )</dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>付款金额</dt>
        <dd><?php echo $note->pn_mc_currency . ' ' . $note->pn_mc_gross ?></dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>客人姓名，邮箱</dt>
        <dd><?php echo $note->pn_payer ?> , <?php echo $note->pn_payer_email ?></dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>产品名</dt>
        <dd><?php echo $note->pn_item_name ?></dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>产品号</dt>
        <dd><?php echo $note->pn_item_number ?></dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>付款时间</dt>
        <dd><?php echo date('Y-m-d H:i:s', strtotime($note->pn_payment_date) + 3600 * 8); ?></dd>
    </dl>
    <dl class="dl-horizontal">
        <dt>备注&nbsp;/&nbsp;留言</dt>
        <dd>
            <?php
            $content = json_decode($note->pn_memo);
            if (isset($content->memo)) {
                echo $content->memo . "<br>";
            }
            if (isset($content->transaction_subject)) {
                echo $content->transaction_subject;
            } ?>
        </dd>
    </dl>


    <dl class="dl-horizontal">
        <dt>订单号</dt>
        <dd>
            <div class="input-group">
                <input type="text" class="form-control" id="pn_invoice" name="pn_invoice" value="<?php echo !empty($pn_invoice) ? $pn_invoice : $note->pn_invoice; ?>"
                <?php 
                if ($group_accout_info['GAI_State'] > 0) { ?>
                    disabled="disabled"
                <?php }  ?> 
                >
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" onclick="show_order_modal('<?php echo $note->pn_txn_id; ?>', 0, $('#pn_invoice').val())"><span class="glyphicon glyphicon-search"></span></button>
                </span>
            </div>
            <label class="text-danger">订单号形如: 160414408_B，B商务订单，JJ160321052_T，T传统订单，请务必加上后缀</label>
            <?php if ($group_accout_info['GAI_State'] > 0) { ?>
                <label class="text-danger">此项记录财务已审核，请联系财务先取消收款审核。</label>
            <?php }  ?>
            <div style='display: none'><?php var_dump($group_accout_info); ?></div>
        </dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>订单详细内容</dt>
        <dd>

            <?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 '找不到订单内容';
            }
            ?>

        </dd>
    </dl>
    <dl class="dl-horizontal">
        <dt><a href="javascript:void(0);" onclick="$('#note_original_data').toggle()">原始数据</a></dt>
        <dd> <span style="display: none;" id="note_original_data">
                <?php echo str_replace('","', '"<br/>"', $note->pn_memo); ?>
            </span></dd>
    </dl>

    <input type="hidden" name="pn_txn_id" id="pn_txn_id" value="<?php echo $note->pn_txn_id ?>" />
    <input type="hidden" name="pn_id" id="pn_id" value="<?php echo $note->pn_sn; ?>" />
</form>
