|
@@ -96,6 +96,10 @@ class Report extends Command
|
|
|
$method="M";
|
|
|
$file='对账单汇总表';
|
|
|
break;
|
|
|
+ case 'N':
|
|
|
+ $method="N";
|
|
|
+ $file='退货台账';
|
|
|
+ break;
|
|
|
default:
|
|
|
$file='暂无数据';
|
|
|
$method="";
|
|
@@ -548,7 +552,7 @@ class Report extends Command
|
|
|
->alias('a')
|
|
|
->field('
|
|
|
a.invNo 发票申请编号,
|
|
|
- d.orderCode 确认单编号,
|
|
|
+ m.orderCode 确认单编号,
|
|
|
e.cxCode 销售主单编号,
|
|
|
e.qrdSource 销售来源,
|
|
|
b.seller_title 销售方抬头,
|
|
@@ -595,7 +599,7 @@ class Report extends Command
|
|
|
->leftJoin("invoice_good m","m.invNo=a.invNo and m.invtype=0 and m.is_del=0")
|
|
|
// ->leftJoin('assoc d', 'd.viceCode=a.invNo and d.type=1')
|
|
|
->leftJoin('qrd_info e', 'e.sequenceNo=m.orderCode')
|
|
|
- ->leftJoin('cgd_info f', 'e.cgdNo=d.orderCode')
|
|
|
+ ->leftJoin('cgd_info f', 'e.cgdNo=e.cgdNo')
|
|
|
->leftJoin('invoice_return g', 'g.invNo=a.invNo and g.status=2')
|
|
|
->where($where)
|
|
|
->order(['a.id' => 'desc'])
|
|
@@ -932,7 +936,7 @@ class Report extends Command
|
|
|
round(a.th_num * ifnull(c.goodPrice,b.total_origin_price/b.goodNum),2) 退货采购货款,
|
|
|
c.tax 采购税点,
|
|
|
c.supplierName 供应商名称,
|
|
|
- f(b.isStock=1,'是','否') 是否库存,
|
|
|
+ if(b.isStock=1,'是','否') 是否库存,
|
|
|
c.sendType 发货方式,
|
|
|
if(a.is_th=1,'是','否') 供应商是否同意退货,
|
|
|
'' as 付款方式,
|