|
@@ -52,11 +52,11 @@ class Manage
|
|
|
$dui_total = 0;
|
|
|
if($card['create_type'] != 3){
|
|
|
$dnum = Dever::db('card/code')->getNum(array('card_id'=>$id,'status'=>3,'state'=>1));
|
|
|
- $dui_total = $dnum*$card['value'];
|
|
|
+ $dui_total = sprintf ("%01.2f", $dnum*$card['value']);
|
|
|
|
|
|
}else{
|
|
|
$dui = Dever::db('card/code')->getDuiprice(array('card_id'=>$id,'status'=>3,'state'=>1));
|
|
|
- $dui_total = $dui['total'];
|
|
|
+ $dui_total = sprintf ("%01.2f", $dui['total']);
|
|
|
}
|
|
|
if(!$type){
|
|
|
return $dui_total;
|
|
@@ -72,10 +72,10 @@ class Manage
|
|
|
if($card['create_type'] != 3){
|
|
|
$where['card_id'] = $id;
|
|
|
$num = Dever::db('card/code')->total($where);
|
|
|
- $wdui_total = ($num-$dnum) *$card['value'];
|
|
|
+ $wdui_total = sprintf ("%01.2f", ($num-$dnum) *$card['value']);
|
|
|
}else{
|
|
|
$wdui = Dever::db('card/code')->getDuiprice(array('card_id'=>$id,'status'=>'1,2','state'=>1));
|
|
|
- $wdui_total = $wdui['total'];
|
|
|
+ $wdui_total = sprintf ("%01.2f", $wdui['total']);
|
|
|
}
|
|
|
if($type == 2){
|
|
|
return $wdui_total;
|