diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 7a1b2ed5..3c0a9303 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1386,7 +1386,7 @@ class Index extends CI_Controller { // 记录这次导出的最后一条 if (isset($all_list['last_flag']) && ! empty($all_list['last_flag'])) { $balance_diff = bcsub($all_list['now_amount'], $amount); - $last_record_export = bcsub($all_list['last_flag']->pn_mc_gross, $balance_diff); + $last_record_export = $balance_diff>0 ? bcsub($all_list['last_flag']->pn_mc_gross, $balance_diff) : $all_list['last_flag']->pn_mc_gross; $insert_db = array( "TEL_transactionType" => 15002 ,"TEL_transactionNoticeId" => $all_list['last_flag']->pn_sn