|
|
@@ -1129,6 +1129,9 @@ SQL;
|
|
|
$destroys = [];
|
|
|
$owner = [$waybill->owner_id];
|
|
|
if (array_search($waybill->status,["未审核","已审核","待终审"])===false)$this->error("运单禁止合并");
|
|
|
+
|
|
|
+ $remark = [];
|
|
|
+ if ($waybill->ordering_remark)$remark[] = $waybill->ordering_remark;
|
|
|
for ($i=1;$i<$waybills->count();$i++){
|
|
|
//信息一致性校验
|
|
|
$identical = ($waybill->order && ($waybills[$i]->order->consignee_name!=$waybill->order->consignee_name
|
|
|
@@ -1136,7 +1139,7 @@ SQL;
|
|
|
(!$waybill->order && ($waybills[$i]->recipient!=$waybill->recipient
|
|
|
|| $waybills[$i]->recipient_mobile!=$waybill->recipient_mobile
|
|
|
|| $waybills[$i]->destination!=$waybill->destination));
|
|
|
- if (array_search($waybills[$i]->status,["未审核","已审核"])===false
|
|
|
+ if (array_search($waybills[$i]->status,["未审核","已审核","待终审"])===false
|
|
|
|| $identical)$this->error("信息不一致,无法进行合并");
|
|
|
$destroys[] = $waybills[$i]->id;
|
|
|
$waybill->source_bill .= $waybills[$i]->source_bill ? ",".$waybills[$i]->source_bill : '';
|
|
|
@@ -1146,9 +1149,10 @@ SQL;
|
|
|
$waybill->other_fee += (double)$waybills[$i]->other_fee;
|
|
|
$waybill->warehouse_weight_other += (double)$waybills[$i]->warehouse_weight_other;
|
|
|
$waybill->warehouse_weight += (double)$waybills[$i]->warehouse_weight;
|
|
|
- $waybill->ordering_remark = $waybill->ordering_remark ? $waybill->ordering_remark.",".$waybills[$i]->ordering_remark : $waybills[$i]->ordering_remark;
|
|
|
+ if ($waybills[$i]->ordering_remark)$remark[] = $waybills[$i]->ordering_remark;
|
|
|
$owner[] = $waybills[$i]->owner_id;
|
|
|
}
|
|
|
+ $waybill->ordering_remark = implode(",",array_unique($remark));
|
|
|
if (strlen($waybill->source_bill)>191 || strlen($waybill->wms_bill_number)>191)$this->error("单号超长,无法合并");
|
|
|
$owner = array_unique($owner);
|
|
|
if (count($owner)>1)$waybill->merge_owner = implode(',',$owner);
|