|
@@ -1832,7 +1832,7 @@ class CommandeFournisseur extends CommonOrder
|
|
|
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
|
|
$result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', (isset($this->fk_soc) ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc
|
|
|
|
|
|
- // If supplier order created from customer order, we take best supplier price
|
|
|
+ // If supplier order created from sales order, we take best supplier price
|
|
|
// If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price
|
|
|
if ($result > 0 && ($origin == 'commande' || $pu === '')) {
|
|
|
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
|
@@ -2608,11 +2608,11 @@ class CommandeFournisseur extends CommonOrder
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Update a supplier order from a customer order
|
|
|
+ * Update a supplier order from a sales order
|
|
|
*
|
|
|
* @param User $user User that create
|
|
|
- * @param int $idc Id of supplier order to update
|
|
|
- * @param int $comclientid Id of customer order to use as template
|
|
|
+ * @param int $idc Id of purchase order to update
|
|
|
+ * @param int $comclientid Id of sale order to use as template
|
|
|
* @return int <0 if KO, >0 if OK
|
|
|
*/
|
|
|
public function updateFromCommandeClient($user, $idc, $comclientid)
|