mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
137de338d2
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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>';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user