|
@@ -391,7 +391,7 @@ class refill_companyControl extends SystemControl
|
|
|
$remit = $this->check_remit($remit_id);
|
|
|
$params = json_decode($remit['params']);
|
|
|
$remit_cfg = $this->remit_cfg();
|
|
|
- $remit_max = intval($remit_cfg['remit_max']);
|
|
|
+ $remit_max = floatval($remit_cfg['remit_max']);
|
|
|
$refill_company = $this->refill_companys(['co_type' => refill_companyModel::co_type_provider]);
|
|
|
|
|
|
foreach ($params as $co_id => $item)
|
|
@@ -405,10 +405,10 @@ class refill_companyControl extends SystemControl
|
|
|
$refill_company[$co_id]['money'] = $remit_total;
|
|
|
$remit_data[] = $refill_company[$co_id];
|
|
|
}else{
|
|
|
- for ( $i = $remit_total / $remit_max; $i>=0; --$i)
|
|
|
+ for ( $i = $remit_total / $remit_max; $i>=0; --$i )
|
|
|
{
|
|
|
if($i < 1) {
|
|
|
- $refill_company[$co_id]['money'] = $remit_total % $remit_max;
|
|
|
+ $refill_company[$co_id]['money'] = fmod($remit_total, $remit_max);
|
|
|
} else {
|
|
|
$refill_company[$co_id]['money'] = $remit_max;
|
|
|
}
|