Merge branch 'dillon/137-project-upgrade-update-1A' into vapor/test

This commit is contained in:
Dillon Ngo
2026-08-06 12:03:14 +08:00
3 changed files with 19 additions and 4 deletions
@@ -2,6 +2,7 @@
namespace App\Classes\Modules\Exports\Services;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\Order;
use App\Models\PackingList;
use Carbon\Carbon;
@@ -38,7 +39,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
'Received Date',
'Recorded On',
'Days to Record',
'Remarks'
'Remarks',
'Delivery Address',
'Post Code',
'State',
];
}
@@ -79,6 +83,8 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
$recorded_on = $packingList->created_at->format('d-m-Y');
$days_to_record = Carbon::parse($arrival_date)->diffInDays(Carbon::parse($recorded_on));
$address = $order->addresses()->where('status', '=', ApprovalStatus::APPROVED)->first();
return [
$packingList->owner->reference,
$marking,
@@ -89,7 +95,10 @@ class ExportsArrivedParcel implements WithHeadings, WithHeadingRow, WithMapping,
$arrival_date,
$recorded_on,
$days_to_record,
''
'',
$address->street_one . ' ' . ($address->street_two ? $address->street_two : '') . ', ' . $address->district->name,
$address->postcode,
$address->state->name,
];
}
}
@@ -135,7 +135,13 @@ class CreateInvoiceTransactionProcessor
$warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id;
$selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId);
$warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0;
$warehouse_rate = 0;
if (is_object($selected_warehouse_rate)) {
$warehouse_rate = $selected_warehouse_rate->amount;
} elseif (is_array($selected_warehouse_rate)) {
$warehouse_rate = $selected_warehouse_rate['amount'] ?? 0;
}
$stateId = $address->state_id;
$state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);
@@ -9,7 +9,7 @@
<validation-wrapper-component class="m-b-15" :validator="v$?.parameters?.rate?.amount">
<label class="text-primary">Extra Charges (MYR)</label>
<div class="controls">
<input type="text" class="form-control fs-12" v-model.trim="parameters.rate.amount" v-money3="money">
<input type="text" class="form-control fs-12" v-model.lazy="parameters.rate.amount" v-money3="money">
</div>
</validation-wrapper-component>
<div class="row m-t-15">