Skip to content

Commit

Permalink
fix: enforce max insurance value
Browse files Browse the repository at this point in the history
  • Loading branch information
GravendeelJochem committed Jul 4, 2024
1 parent 8e8d616 commit 675ed6f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
CarrierSettings::EXPORT_INSURANCE => true,
CarrierSettings::EXPORT_INSURANCE_FROM_AMOUNT => 0,
CarrierSettings::EXPORT_INSURANCE_PRICE_PERCENTAGE => 100,
CarrierSettings::EXPORT_INSURANCE_UP_TO => 5000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_UNIQUE => 5000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_EU => 5000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_ROW => 5000,
CarrierSettings::EXPORT_INSURANCE_UP_TO => 500000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_UNIQUE => 500000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_EU => 500000,
CarrierSettings::EXPORT_INSURANCE_UP_TO_ROW => 500000,
], $input['settings'] ?? [])
)
->store();
Expand Down Expand Up @@ -188,15 +188,15 @@
'value € 3100, insured up to € 3000 -> € 3000' => [
[
'orderPrice' => 310000,
'settings' => [CarrierSettings::EXPORT_INSURANCE_UP_TO => 3000],
'settings' => [CarrierSettings::EXPORT_INSURANCE_UP_TO => 300000],
],
'result' => 300000,
],

'value € 5000, insured up to € 3000 -> € 10000' => [
[
'orderPrice' => 5000,
'settings' => [CarrierSettings::EXPORT_INSURANCE_UP_TO => 3000],
'settings' => [CarrierSettings::EXPORT_INSURANCE_UP_TO => 300000],
],
'result' => 10000,
],
Expand Down

0 comments on commit 675ed6f

Please sign in to comment.