Fix: Adding Comments to Fulfillment Services
This commit is contained in:
1 parent
cbb76070d9
commit
162827dff7
6 files changed
+30
-1
No files matched your search
@@ -63,6 +63,11 @@ class EltaFulfillmentService implements CarrierFulfillmentInterface, IssuesVouch
|
||||
$weight = $request->weight ?? 0.5;
|
||||
$surcharges = $this->surchargeCodes($request);
|
||||
|
||||
// The customer's delivery instructions, as ELTA's remarks
|
||||
// (ΠΑΡΑΤΗΡΗΣΕΙΣ): one line, at most 90 characters — the ELTA
|
||||
// client's own field limit.
|
||||
$remarks = mb_substr(trim(preg_replace('/\s+/u', ' ', (string) $address->delivery_instructions)), 0, 90);
|
||||
|
||||
$params = [
|
||||
'pel_apost_code' => config('elta.apost_code'),
|
||||
'pel_paral_name' => trim("{$address->first_name} {$address->last_name}"),
|
||||
@@ -78,7 +83,7 @@ class EltaFulfillmentService implements CarrierFulfillmentInterface, IssuesVouch
|
||||
'pel_y' => '',
|
||||
'pel_z' => '',
|
||||
'pel_temaxia' => (string) $request->packageCount,
|
||||
'pel_paral_sxolia' => '',
|
||||
'pel_paral_sxolia' => $remarks,
|
||||
'pel_sur_1' => $surcharges[0] ?? '',
|
||||
'pel_sur_2' => $surcharges[1] ?? '',
|
||||
'pel_sur_3' => $surcharges[2] ?? '',
|
||||
@@ -129,6 +134,7 @@ class EltaFulfillmentService implements CarrierFulfillmentInterface, IssuesVouch
|
||||
'meta' => [
|
||||
'carrier_id' => $this->findPendingVoucherId((string) $order->reference),
|
||||
'reference' => (string) $order->reference,
|
||||
'delivery_instructions' => $remarks ?: null,
|
||||
'weight' => $weight,
|
||||
'package_count' => $pieces,
|
||||
'cod_amount' => $codAmount,
|
||||
|
||||
Reference in new issue
Block a user