fix: PayPal set invoice

feature/pay
lyt 6 years ago
parent 0e86157c80
commit de9ec9ee90

@ -1277,11 +1277,10 @@ class Index extends CI_Controller {
//获取note详情修改各项数据
public function note_modal($pn_txn_id, $pn_id=false, $pn_invoice=false) {
$this->permission->is_admin(true);
$data = array();
$data = array('pn_invoice'=>$pn_invoice);
if (!empty($pn_txn_id)) {
$data['note'] = $this->Note_model->note($pn_txn_id, $pn_id);
if (!empty($data['note'])) {
$data['pn_invoice'] = $data['note']->pn_invoice;
if (!empty($pn_invoice)) {
$orderid_info = $this->analysis_orderid($pn_invoice);
} else {
@ -1291,6 +1290,7 @@ class Index extends CI_Controller {
$orderid_info = json_decode($orderid_info);
$data['order_info'] = $this->Paypal_model->get_order($orderid_info->orderid, true, $orderid_info->ordertype);
}
$data['pn_invoice'] = $pn_invoice ? $pn_invoice : $data['note']->pn_invoice ;
echo json_encode($this->load->view('note_setting', $data, true));
return true;
}

@ -335,11 +335,13 @@ echo "<option value=\"$vf->TEL_SN@" . strstr($vf->TEL_transactionDate, " ", true
});
}
function show_order_modal(pn_txn_id, pn_id) {
function show_order_modal(pn_txn_id, pn_id, new_order) {
var url = '<?php echo site_url('apps/paypal/index/note_modal/'); ?>' + '/' + pn_txn_id + '/' + pn_id;
if (new_order) url += '/' + new_order;
$.ajax({
type: "get",
dataType: "json",
url: '<?php echo site_url('apps/paypal/index/note_modal/'); ?>' + '/' + pn_txn_id + '/' + pn_id,
url: url,
success: function(data, textStatus) {
$('#modal_set_orderid_body').html(data);
$('#modal_set_orderid').modal('show');

Loading…
Cancel
Save