coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
564 stars 128 forks source link

Allow to apply a pricing rule at task level OR at delivery level #4434

Open alexsegura opened 3 months ago

alexsegura commented 3 months ago

We want to be able to setup Km/distance based prices for multi-point deliveries.

Currently this is not possible, because we set the distance to -1 when applying pricing rules at task level.

We need to do this because the property used to determine if a pricing rule applies at task level, or delivery level, lives at the pricing rule set level.

Instead, we should move this property at the pricing rule level, so that we can decide if a given pricing rule applies at delivery level (allowing to have a distance), or at task level.