|
|
@@ -47,7 +47,13 @@ class WaybillsController extends Controller
|
|
|
$waybills=$waybills->where('owner_id','=',$request->input('owner_id'));
|
|
|
}
|
|
|
if ($request->input('wms_bill_number')){
|
|
|
- $waybills=$waybills->where('wms_bill_number','like','$'.$request->input('wms_bill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
|
|
|
+ $waybills=$waybills->where('wms_bill_number','like','%'.$request->input('wms_bill_number').'%')->where('created_at','>',$today->format('Y-m-d'));
|
|
|
+ }
|
|
|
+ if ($request->input('origination')){
|
|
|
+ $waybills=$waybills->where('origination','like','%'.$request->input('origination').'%')->where('created_at','>',$today->format('Y-m-d'));
|
|
|
+ }
|
|
|
+ if ($request->input('destination')){
|
|
|
+ $waybills=$waybills->where('destination','like','%'.$request->input('destination').'%')->where('created_at','>',$today->format('Y-m-d'));
|
|
|
}
|
|
|
if ($request->input('created_at_start')){
|
|
|
$waybills=$waybills->where('created_at','>',$request->input('created_at_start'));
|
|
|
@@ -279,7 +285,8 @@ class WaybillsController extends Controller
|
|
|
$waybill->waybill_price_model_id=$waybillPriceModel_id;
|
|
|
}
|
|
|
$waybill->save();
|
|
|
- $total_receivable=($waybill->charge);
|
|
|
+ if ($waybill->charge)$total_receivable=($waybill->charge);
|
|
|
+ elseif ($waybill->collect_fee)$total_receivable=($waybill->collect_fee);
|
|
|
$total_expense=($waybill->pick_up_fee)+($waybill->other_fee)+($waybill->fee);
|
|
|
}
|
|
|
if ($total_receivable){
|