|
@@ -46,7 +46,7 @@ class Report extends Command
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
try{
|
|
try{
|
|
$info = json_decode($info,true);
|
|
$info = json_decode($info,true);
|
|
- ini_set ('memory_limit', '512M') ;
|
|
|
|
|
|
+ ini_set ('memory_limit', '1024M') ;
|
|
$date=date("Y-m-d H:i:s");
|
|
$date=date("Y-m-d H:i:s");
|
|
$param = Db::name("exec_log")->where("id",$info['id'])->findOrEmpty();
|
|
$param = Db::name("exec_log")->where("id",$info['id'])->findOrEmpty();
|
|
if(isset($param) && !empty($param)){
|
|
if(isset($param) && !empty($param)){
|
|
@@ -501,7 +501,7 @@ class Report extends Command
|
|
b.costPrice 工艺费,
|
|
b.costPrice 工艺费,
|
|
b.deliveryPrice 物流费,
|
|
b.deliveryPrice 物流费,
|
|
b.goodPrice 采购单价合计,
|
|
b.goodPrice 采购单价合计,
|
|
- ifnull(b.totalPrice,a.total_origin_price) 采购总货款,
|
|
|
|
|
|
+ (ifnull(b.totalPrice,a.total_origin_price)+ifnull(b.th_fee,0)) 采购总货款,
|
|
(a.totalPrice -ifnull(b.totalPrice,a.total_origin_price)) 毛利润,
|
|
(a.totalPrice -ifnull(b.totalPrice,a.total_origin_price)) 毛利润,
|
|
round((a.totalPrice -ifnull(b.totalPrice,a.total_origin_price))/a.totalPrice,2) 毛利率,
|
|
round((a.totalPrice -ifnull(b.totalPrice,a.total_origin_price))/a.totalPrice,2) 毛利率,
|
|
round(b.tax/100,2) 采购税点,
|
|
round(b.tax/100,2) 采购税点,
|
|
@@ -543,7 +543,7 @@ class Report extends Command
|
|
{
|
|
{
|
|
// $param = $this->request->only(['company' => '', 'start' => '', 'end' => ''], 'post', 'trim');
|
|
// $param = $this->request->only(['company' => '', 'start' => '', 'end' => ''], 'post', 'trim');
|
|
|
|
|
|
- $where = [['a.is_del', '=', 0], ['d.is_del', '=', 0], ['a.status', '>=', 4]];
|
|
|
|
|
|
+ $where = [['a.is_del', '=', 0], ['a.status', '>=', 4]];
|
|
|
|
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.addtime', 'between', [$param['start'], $param['end']]];
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.addtime', 'between', [$param['start'], $param['end']]];
|
|
if ($param['companyNo'] != '') $where[] = ['a.inv_out', '=', $param['companyNo']];
|
|
if ($param['companyNo'] != '') $where[] = ['a.inv_out', '=', $param['companyNo']];
|
|
@@ -886,7 +886,7 @@ class Report extends Command
|
|
private function N($param=[]){
|
|
private function N($param=[]){
|
|
$where = [];
|
|
$where = [];
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.createtime', 'between', [$param['start'],$param['end']]];
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.createtime', 'between', [$param['start'],$param['end']]];
|
|
- if ($param['companyNo'] != '') $where[] = ['a.th_companyNo', '=', $param['companyNo']];
|
|
|
|
|
|
+ if ($param['companyNo'] != '') $where[] = ['b.companyNo', '=', $param['companyNo']];
|
|
$list = Db::name("th_source")
|
|
$list = Db::name("th_source")
|
|
->alias("a")
|
|
->alias("a")
|
|
->leftJoin("qrd_info b","a.th_qrdNo=b.sequenceNo or a.th_qrdNo=b.cxCode")
|
|
->leftJoin("qrd_info b","a.th_qrdNo=b.sequenceNo or a.th_qrdNo=b.cxCode")
|