-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix wrong price on supplier order line #8224
Fix wrong price on supplier order line #8224
Conversation
htdocs/fourn/commande/card.php
Outdated
@@ -1089,7 +1089,7 @@ | |||
$lines[$i]->localtax1_tx, | |||
$lines[$i]->localtax2_tx, | |||
$lines[$i]->fk_product > 0 ? $lines[$i]->fk_product : 0, | |||
$productsupplier->product_fourn_price_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do'nt use the best supplier price here, it means we must also not use the $productsupplier->ref_supplier just after ?
And also, it means the
$result = $productsupplier->find_min_price_product_fournisseur(...
that is before is not required ?
This may be used when we create the supplier order from customer order (to buy what we have sell). In such a case, setting price by default to best price is good.
I think we should add a condition to use "0" only when creating from a supplier proposal
This addline come from 'create order' button on supplier proposal and we got some new price ref Now: |
Are you sure this part of code is not also used from the 'create order' button on customer order ? |
I have looked in commande/card.php and don't find any button to create a "supplier proposal"
If we come from supplier proposal we should skip in the |
Hi @eldy did you read my last comment ? What do you think about it ? |
Fix
If we create a supplier order from supplier proposal and the product had buy prices, the best price is used