Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0

This commit is contained in:
Laurent Destailleur 2024-04-11 22:28:27 +02:00
commit 137de338d2
3 changed files with 7 additions and 6 deletions

View File

@ -97,14 +97,14 @@ class Utils
if ($choice == 'allfiles') {
// Delete all files (except install.lock, do not follow symbolic links)
if ($dolibarr_main_data_root) {
$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1);
}
}
if ($choice == 'logfile' || $choice == 'logfiles') {
// Define files log
if ($dolibarr_main_data_root) {
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1);
}
if (!empty($conf->syslog->enabled)) {

View File

@ -180,6 +180,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");
@ -264,7 +265,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++;
@ -285,8 +286,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");

View File

@ -1684,7 +1684,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1);
// Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record.
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir) ? array($user->id) : array())));
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : array($user->id)));
print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $selected, null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
print '</td></tr>';