Estimates are sent to supplier even if pricing is defined (calculated, of free product)
Estimates are sent to provider even if pricing is defined (calculated, of free product).
1) If all products of the basket have a price, the 'estimate' button should not be visible.
2) If SOME of the products have a pricing, but not all: the 'undefined' prices should be sent to supplier, but other should change have status to available and the order to progress
#3 Updated by Van Hoecke Hélène almost 4 years ago
- Status changed from Affected to Resolved
- Assignee changed from Van Hoecke Hélène to Blatti Yves
- Target version set to 4.3.2
- % Done changed from 0 to 100
I didn't see any problem with the "estimate" button : the behaviour (hide/visible) seems to be coherent with the basket content.
#5 Updated by Blatti Yves over 3 years ago
- File pricing.png added
- Status changed from Resolved to Affected
- Assignee changed from Blatti Yves to Van Hoecke Hélène
- % Done changed from 100 to 90
"estimate" button works now, thanks.
For the products sent to suppliers, there is one case not taken into account:
When an order is a draft, with some 'fee without pricing profile' diffusions, if one of these has been set to 0 (for example on product is internal), both are send to their suppliers.
This problem is not present if only one supplier is present.
Test is done with ordertype + pricing type, but this is not sufficient for the 'fee without profile' that may have a price.
switch ($table->ordertype_id): case Easysdi_shopHelper::ORDERTYPE_ESTIMATE: //Some diffusions may already have an estimation (free or with an automatic profile) if ($diffusion->pricing == Easysdi_shopHelper::PRICING_FEE_WITHOUT_PROFILE): $od['productstate_id'] = Easysdi_shopHelper::PRODUCTSTATE_SENT; else: $od['productstate_id'] = Easysdi_shopHelper::PRODUCTSTATE_AVAILABLE; $count_available++; endif; break; case Easysdi_shopHelper::ORDERTYPE_DRAFT: //Set a state await for a draft $od['productstate_id'] = Easysdi_shopHelper::PRODUCTSTATE_AWAIT; break; case Easysdi_shopHelper::ORDERTYPE_ORDER: // $od['productstate_id'] = ($table->orderstate_id == Easysdi_shopHelper::ORDERSTATE_VALIDATION) ? Easysdi_shopHelper::PRODUCTSTATE_VALIDATION : Easysdi_shopHelper::PRODUCTSTATE_SENT; break; endswitch;