|
@@ -37,7 +37,7 @@ class Cash
|
|
|
public function up($id, $status = 2, $amount = false, $fenzhang = 0)
|
|
|
{
|
|
|
if ($amount) {
|
|
|
- $amount = $amount * $this->num;
|
|
|
+ $amount = $amount * 100;
|
|
|
}
|
|
|
if (is_numeric($id)) {
|
|
|
$where['id'] = $id;
|
|
@@ -88,6 +88,7 @@ class Cash
|
|
|
|
|
|
private function getCash($amount, $merchant, &$data, $fenzhang = 0)
|
|
|
{
|
|
|
+ $amount = $amount*10;
|
|
|
$yspay = Dever::db('pay/yspay')->one(array('account_id' => $merchant['account_id']));
|
|
|
if ($yspay) {
|
|
|
$cash_per = 0;
|
|
@@ -109,20 +110,20 @@ class Cash
|
|
|
$cash_jy_per = $yspay['cash_jy_per']/$this->num;
|
|
|
|
|
|
$data['ycash'] = $amount/$this->num;
|
|
|
- $data['yl_cash'] = round($data['ycash'] * $per, 2);
|
|
|
- $data['pt_cash'] = round($data['ycash'] * $cash_jy_per, 2);
|
|
|
- $data['cash'] = round($data['ycash'] - $data['yl_cash'] - $data['pt_cash'], 2);
|
|
|
+ $data['yl_cash'] = round($data['ycash'] * $per, 3);
|
|
|
+ $data['pt_cash'] = round($data['ycash'] * $cash_jy_per, 3);
|
|
|
+ $data['cash'] = round($data['ycash'] - $data['yl_cash'] - $data['pt_cash'], 3);
|
|
|
if ($yspay['cash_type'] == 1) {
|
|
|
$fz_cash = $data['ycash'];
|
|
|
} else {
|
|
|
$fz_cash = $data['cash'];
|
|
|
}
|
|
|
- //$data['fz_cash'] = round($fz_cash*$cash_per, 2);
|
|
|
+ //$data['fz_cash'] = round($fz_cash*$cash_per, 3);
|
|
|
$data['fz_cash'] = 0;
|
|
|
if ($fenzhang && $fenzhang > 0) {
|
|
|
$data['fz_cash'] += $fenzhang;
|
|
|
}
|
|
|
- $data['hf_cash'] = round($data['cash'] - $data['fz_cash'], 2);
|
|
|
+ $data['hf_cash'] = round($data['cash'] - $data['fz_cash'], 3);
|
|
|
|
|
|
$data['ycash'] *= $this->num;
|
|
|
$data['yl_cash'] *= $this->num;
|