瀏覽代碼

格式化excel导出的数据

lvhao 6 月之前
父節點
當前提交
b42a9e40e8
共有 1 個文件被更改,包括 2 次插入2 次删除
  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>";
 						}