update
This commit is contained in:
@@ -38,7 +38,7 @@ $pointId = trim((string) ($receiver['parcel_external_id'] ?? ''));
|
||||
$pointName = trim((string) ($receiver['parcel_name'] ?? ''));
|
||||
$totalWithTax = (float) ($orderRow['total_with_tax'] ?? 0);
|
||||
$currency = strtoupper(trim((string) ($orderRow['currency'] ?? 'PLN')));
|
||||
$isCod = strtoupper(trim((string) ($orderRow['external_payment_type_id'] ?? ''))) === 'CASH_ON_DELIVERY';
|
||||
$isCod = \App\Core\Support\StringHelper::isCodPayment((string) ($orderRow['external_payment_type_id'] ?? ''));
|
||||
$defaultCodAmount = $isCod ? number_format($totalWithTax, 2, '.', '') : '0';
|
||||
?>
|
||||
|
||||
@@ -83,7 +83,7 @@ $defaultCodAmount = $isCod ? number_format($totalWithTax, 2, '.', '') : '0';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" action="/orders/<?= $e((string) ($orderId ?? 0)) ?>/shipment/create" novalidate>
|
||||
<form id="shipment-form" method="post" action="/orders/<?= $e((string) ($orderId ?? 0)) ?>/shipment/create" novalidate>
|
||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||
|
||||
<div class="shipment-grid mt-16">
|
||||
@@ -989,6 +989,12 @@ $defaultCodAmount = $isCod ? number_format($totalWithTax, 2, '.', '') : '0';
|
||||
|
||||
// Select delivery service in the correct panel
|
||||
selectDeliveryService(preset);
|
||||
|
||||
// Auto-submit after autofill completes
|
||||
setTimeout(function () {
|
||||
var form = document.getElementById('shipment-form');
|
||||
if (form) form.submit();
|
||||
}, 300);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user