diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index dcf47f43303..aa9658a9d84 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1283,7 +1283,7 @@ if ($action == 'create') } else { - if ($id > 0) + if ($id > 0 || ! empty($ref)) { /* *************************************************************************** */ /* */ @@ -1295,7 +1295,7 @@ else $productstatic = new Product($db); - $object->fetch($id); + $object->fetch($id,$ref); $result=$object->fetch_thirdparty(); if ($result < 0) dol_print_error($db); diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 372177c0c89..9605106aec6 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -47,15 +47,14 @@ if ($id > 0) $object->fetch($id); /******************************************************************************/ /* Actions */ /******************************************************************************/ - -if ($action == 'setnote_public' && $user->rights->propale->creer) +if ($action == 'setnote_public' && $user->rights->societe->creer) { $object->fetch($id); $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); if ($result < 0) setEventMessage($object->error,'errors'); } -else if ($action == 'setnote_private' && $user->rights->propale->creer) +else if ($action == 'setnote_private' && $user->rights->societe->creer) { $object->fetch($id); $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');