Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

This commit is contained in:
Laurent Destailleur 2024-04-11 22:31:36 +02:00
commit 095679845b

View File

@ -185,6 +185,7 @@ if (empty($reshook)) {
}
if ($action == 'save_price') {
$ref_fourn_price_id = GETPOSTINT('ref_fourn_price_id');
$id_fourn = GETPOST("id_fourn");
if (empty($id_fourn)) {
$id_fourn = GETPOST("search_id_fourn");
@ -269,7 +270,7 @@ if (empty($reshook)) {
if (!$error) {
$db->begin();
if (!$error) {
if (empty($ref_fourn_price_id)) {
$ret = $object->add_fournisseur($user, $id_fourn, $ref_fourn_old, $quantity); // This insert record with no value for price. Values are update later with update_buyprice
if ($ret == -3) {
$error++;
@ -290,8 +291,8 @@ if (empty($reshook)) {
if (!$error) {
$supplier = new Fournisseur($db);
$result = $supplier->fetch($id_fourn);
if (GETPOSTISSET('ref_fourn_price_id')) {
$object->fetch_product_fournisseur_price(GETPOST('ref_fourn_price_id', 'int'));
if ($ref_fourn_price_id > 0) {
$object->fetch_product_fournisseur_price($ref_fourn_price_id);
}
$extralabels = $extrafields->fetch_name_optionals_label("product_fournisseur_price");
$extrafield_values = $extrafields->getOptionalsFromPost("product_fournisseur_price");