|
@@ -518,7 +518,18 @@ class Fullorderexcel extends Start_Controller {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //处理额外加上的subtotal和rowtoal 但是不想在表中加太多字段 想着以后有关金额的都给怼到extra_price字段中
|
|
|
|
+ if((strpos($feq,'subtotal')!= false)||(strpos($feq,'rowtotal')!= false)){
|
|
|
|
+ if(strpos($feq,'subtotal')!= false){
|
|
|
|
+ $feq = str_replace('subtotal,',"extra_price as subtotal,",$feq);
|
|
|
|
+ }
|
|
|
|
+ if(strpos($feq,'rowtotal')!= false){
|
|
|
|
+ $feq = str_replace('rowtotal,',"extra_price as rowtotal,",$feq);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
$feq = rtrim($feq,',');
|
|
$feq = rtrim($feq,',');
|
|
|
|
+
|
|
|
|
+
|
|
$fexcelzhw = explode('|',rtrim($fexcel['contentzh'],'|'));
|
|
$fexcelzhw = explode('|',rtrim($fexcel['contentzh'],'|'));
|
|
foreach ($fexcelzhw as $k=>$v)
|
|
foreach ($fexcelzhw as $k=>$v)
|
|
{
|
|
{
|
|
@@ -630,6 +641,31 @@ class Fullorderexcel extends Start_Controller {
|
|
$info_list[$key]['issku'] = $value['issku'];
|
|
$info_list[$key]['issku'] = $value['issku'];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ if(isset($value['subtotal'])){
|
|
|
|
+ $tmp_sub_str = "";
|
|
|
|
+ $subtotal_list = json_decode($value['subtotal'],true);
|
|
|
|
+ foreach($subtotal_list as $v){
|
|
|
|
+ if(isset($v['sub_total'])){
|
|
|
|
+ $tmp_sub_str .= $v['sub_total']."<br>";
|
|
|
|
+ }else{
|
|
|
|
+ $tmp_sub_str .= "0<br>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $info_list[$key]['subtotal'] = $tmp_sub_str;
|
|
|
|
+ }
|
|
|
|
+ if(isset($value['rowtotal'])){
|
|
|
|
+ $tmp_sub_str = "";
|
|
|
|
+ $subtotal_list = json_decode($value['rowtotal'],true);
|
|
|
|
+ foreach($subtotal_list as $v){
|
|
|
|
+ if(isset($v['row_total'])){
|
|
|
|
+ $tmp_sub_str .= $v['row_total']."<br>";
|
|
|
|
+ }else{
|
|
|
|
+ $tmp_sub_str .= "0<br>";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $info_list[$key]['rowtotal'] = $tmp_sub_str;
|
|
|
|
+
|
|
}
|
|
}
|
|
if(isset($value['librarytime']))
|
|
if(isset($value['librarytime']))
|
|
{
|
|
{
|
|
@@ -1216,12 +1252,12 @@ class Fullorderexcel extends Start_Controller {
|
|
unset($info_list[$key]['id']);
|
|
unset($info_list[$key]['id']);
|
|
unset($info_list[$key]['fpdata']);
|
|
unset($info_list[$key]['fpdata']);
|
|
}
|
|
}
|
|
-
|
|
|
|
$fzh = "";
|
|
$fzh = "";
|
|
foreach ($fexcelzh as $v)
|
|
foreach ($fexcelzh as $v)
|
|
{
|
|
{
|
|
$fzh .= "<td>".$v."</td>";
|
|
$fzh .= "<td>".$v."</td>";
|
|
}
|
|
}
|
|
|
|
+
|
|
$data = array($shouldmoney.' CNY');
|
|
$data = array($shouldmoney.' CNY');
|
|
$title = $fexcel['title'].'-'.date('Ymd',time());
|
|
$title = $fexcel['title'].'-'.date('Ymd',time());
|
|
$titlename = "<table border=1>
|
|
$titlename = "<table border=1>
|