From 0493057805d82e55f2769aaa559d7e5c036c9814 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 22 Sep 2022 13:34:56 +0800 Subject: [PATCH] debug invoice --- .../ControllersLogic/CreateShippingInvoiceTransactionLogic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php index c823fd1c..ef3cd063 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php @@ -128,10 +128,11 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic $state_select = ''; $segment_price = $connection->segments()->whereHas('constants')->get()->map(function($segment){ + if(is_array($segment->constants()->first()->value)) dd($segment->constants()->first()->value); return (float) $segment->constants()->first()->value[0]; })->sort()->first(); $segment_price = $segment_price ? $segment_price : 0; -dd($segment_price); + $packing_list_drop_date = PackingList::where('reference', $packing_list->reference)->where('type', 1)->first()->transports->first()->drop_date->format('Y-m-d'); $base_price = $this->getConstantByKey($base_price_constant, $packing_list_drop_date);