Repository: tastyigniter/TastyIgniter (language: php)

Issue:
Delivery Areas don't work when the first area type is Shape (polygon)
**Expected behavior:**
The delivery charge can be calculated as expected. Out-of-area orders should not be accepted.

**Actual behavior:**
When the first delivery area type is Shape, the following delivery area settings won't work. When entering an address out of the first area even out of all delivery areas, it will show an out of area error but still allow the user to place an order, and the delivery charge was calculated as the default delivery area.

**Reproduce steps:**
1. Delete all delivery areas (if there are any);
2. Create a delivery area, set area type to Shape (polygon);
3. Create another one or a few delivery areas;
4. Place an order for addresses out of area 1.

**Version:**
3.0.5, 3.0.6

**Additional Information:**
Delivery areas reordering is also broken.



Discussion / hints:
Do you have "Reject Orders Outside Delivery Area" enabled in System -> Settings -> Setup ?

Can you provide more information on the 'broken' delivery areas reordering - Im not seeing that on the latest version.
> Do you have "Reject Orders Outside Delivery Area" enabled in System -> Settings -> Setup ?

Yes that's on. Everything works fine if the first area type is not Shape.

> Can you provide more information on the 'broken' delivery areas reordering - Im not seeing that on the latest version.

I'll do some more tests on this.



Fix patch:
diff --git a/app/system/ServiceProvider.php b/app/system/ServiceProvider.php
index c261e4d3a7..7cc037a1a2 100644
--- a/app/system/ServiceProvider.php
+++ b/app/system/ServiceProvider.php
@@ -325,7 +325,7 @@ protected function setConfiguration()
             $app['config']->set('geocoder.providers.nominatim.region', $region);
 
             $app['config']->set('geocoder.providers.google.apiKey', setting('maps_api_key'));
-            $app['config']->set('geocoder.precision', setting('geocoder_boundary_precision'));
+            $app['config']->set('geocoder.precision', setting('geocoder_boundary_precision', 8));
         });
 
         Event::listen(CommandStarting::class, function () {


Test patch: