mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
update base price according to packlinglist drop date
This commit is contained in:
+3
-1
@@ -25,6 +25,7 @@ use App\Classes\ValueObjects\Constants\SegmentConstants;
|
||||
use App\Classes\ValueObjects\Constants\TransactionDetailType;
|
||||
|
||||
use App\Models\Document;
|
||||
use App\Models\PackingList;
|
||||
use App\Models\Transaction;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -114,7 +115,8 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
$state_rate = 0;
|
||||
$state_select = '';
|
||||
|
||||
$base_price = $this->getConstantByKey($base_price_constant, date('Y-m-d'));
|
||||
$packing_list_drop_date = Carbon::parse(PackingList::where('reference', $packing_list->reference)->where('type', 1)->first()->transports->first()->drop_date)->format('d/m/Y');
|
||||
$base_price = $this->getConstantByKey($base_price_constant, $packing_list_drop_date);
|
||||
|
||||
$warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id;
|
||||
$selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId);
|
||||
|
||||
Reference in New Issue
Block a user