Browse Source

格式化excel导出的数据

lvhao 6 months ago
parent
commit
b42a9e40e8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/CoreApp/controllers/Fullorderexcel.php

+ 2 - 2
core/CoreApp/controllers/Fullorderexcel.php

@@ -647,7 +647,7 @@ class Fullorderexcel extends Start_Controller {
 					$subtotal_list = json_decode($value['subtotal'],true);
 					foreach($subtotal_list as $v){
 						if(isset($v['sub_total'])){
-							$tmp_sub_str .= $v['sub_total']."<br>";
+							$tmp_sub_str .= sprintf( "%.2f",$v['sub_total'])."<br>";
 						}else{
 							$tmp_sub_str .= "0<br>";
 						}
@@ -659,7 +659,7 @@ class Fullorderexcel extends Start_Controller {
 					$subtotal_list = json_decode($value['rowtotal'],true);
 					foreach($subtotal_list as $v){
 						if(isset($v['row_total'])){
-							$tmp_sub_str .= $v['row_total']."<br>";
+							$tmp_sub_str .= sprintf( "%.2f",$v['row_total'])."<br>";
 						}else{
 							$tmp_sub_str .= "0<br>";
 						}