|
@@ -20,7 +20,7 @@ class merchant_infoControl extends mbMerchantControl
|
|
$member_info['available_predeposit'] = 0;
|
|
$member_info['available_predeposit'] = 0;
|
|
}
|
|
}
|
|
if(!empty($merchant_info['credit_bonus'])) {
|
|
if(!empty($merchant_info['credit_bonus'])) {
|
|
- $member_info['available_predeposit'] = ncPriceFormat($member_info['available_predeposit'] - $member_info['credit_bonus']);
|
|
|
|
|
|
+ $member_info['available_predeposit'] = ncPriceFormat($member_info['available_predeposit'] - $merchant_info['credit_bonus']);
|
|
}
|
|
}
|
|
$merchant_info['member'] = $member_info;
|
|
$merchant_info['member'] = $member_info;
|
|
|
|
|
|
@@ -88,13 +88,13 @@ class merchant_infoControl extends mbMerchantControl
|
|
{
|
|
{
|
|
$mchid = $this->mchid();
|
|
$mchid = $this->mchid();
|
|
$model_merchant = Model('merchant');
|
|
$model_merchant = Model('merchant');
|
|
- $merchant_info = $model_merchant->getMerchantInfo(['mchid' => $mchid], 'mchid,admin_id,name,company_name');
|
|
|
|
|
|
+ $merchant_info = $model_merchant->getMerchantInfo(['mchid' => $mchid], 'mchid,admin_id,name,company_name,credit_bonus');
|
|
$model_member = Model('member');
|
|
$model_member = Model('member');
|
|
$member_info = $model_member->getMemberInfo(['member_id' => $merchant_info['admin_id']], 'available_predeposit');
|
|
$member_info = $model_member->getMemberInfo(['member_id' => $merchant_info['admin_id']], 'available_predeposit');
|
|
if (empty($member_info)) {
|
|
if (empty($member_info)) {
|
|
$merchant_info['available_predeposit'] = 0;
|
|
$merchant_info['available_predeposit'] = 0;
|
|
} else {
|
|
} else {
|
|
- $merchant_info['available_predeposit'] = ncPriceFormat($member_info['available_predeposit']);
|
|
|
|
|
|
+ $merchant_info['available_predeposit'] = ncPriceFormat($member_info['available_predeposit'] - $merchant_info['credit_bonus']);
|
|
}
|
|
}
|
|
|
|
|
|
$statistics = $this->statistics();
|
|
$statistics = $this->statistics();
|