Defect #1185

Estimates are sent to supplier even if pricing is defined (calculated, of free product)

Added by Blatti Yves almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:11/12/2015
Priority:UrgentDue date:
Assignee:-% Done:

100%

Category:SHOP
Target version:4.3.2
Affected version:4.3.2

Description

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

pricing.png (72.2 KB) Blatti Yves, 11/18/2015 02:04 PM

History

#1 Updated by Blatti Yves almost 4 years ago

  • Status changed from New to Affected
  • Assignee set to Blatti Yves

#2 Updated by Blatti Yves almost 4 years ago

  • Assignee changed from Blatti Yves to Van Hoecke Hélène

#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.

#4 Updated by Van Hoecke Hélène almost 4 years ago

Following YB informations, I've fixed the behaviour of the "estimate" button in the basket.

#5 Updated by Blatti Yves almost 4 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;

See:

#6 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 Bergstedt Thomas
  • % Done changed from 90 to 100

#7 Updated by Van Hoecke Hélène almost 4 years ago

  • Assignee changed from Bergstedt Thomas to Blatti Yves

#8 Updated by Blatti Yves almost 4 years ago

  • Status changed from Resolved to To merge
  • Assignee changed from Blatti Yves to Van Hoecke Hélène

It works !! Thanks

#9 Updated by Van Hoecke Hélène almost 4 years ago

  • Status changed from To merge to Closed
  • Assignee deleted (Van Hoecke Hélène )

Also available in: Atom PDF