Merge remote-tracking branch 'origin/3.5' into develop
Conflicts: htdocs/fourn/commande/fiche.php htdocs/langs/es_ES/admin.lang htdocs/langs/es_ES/languages.lang htdocs/langs/es_ES/main.lang
This commit is contained in:
commit
9e5e74cb58
@ -2056,7 +2056,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propal->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->propal->dir_output . "/" . $ref ;
|
||||
$file = $dir . "/" . $ref . ".pdf";
|
||||
|
||||
@ -2457,7 +2457,7 @@ class Commande extends CommonOrder
|
||||
|
||||
// On efface le repertoire de pdf provisoire
|
||||
$comref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->commande->dir_output)
|
||||
if ($conf->commande->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->commande->dir_output . "/" . $comref ;
|
||||
$file = $conf->commande->dir_output . "/" . $comref . "/" . $comref . ".pdf";
|
||||
|
||||
@ -1323,7 +1323,7 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
// On efface le repertoire de pdf provisoire
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->facture->dir_output)
|
||||
if ($conf->facture->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->facture->dir_output . "/" . $ref;
|
||||
$file = $conf->facture->dir_output . "/" . $ref . "/" . $ref . ".pdf";
|
||||
|
||||
@ -49,8 +49,12 @@ function tax_prepare_head($object)
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'tax');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir,'files'));
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Documents");
|
||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -168,6 +168,15 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
|
||||
{
|
||||
dol_syslog("functions_ldap::check_user_password_ldap Sync user found id=".$user->id);
|
||||
// On verifie si le login a change et on met a jour les attributs dolibarr
|
||||
|
||||
if ($conf->multicompany->enabled) {
|
||||
global $mc;
|
||||
|
||||
$ret=$mc->checkRight($user->id, $entitytotest);
|
||||
if ($ret < 0) $login=false; // provoque l'echec de l'identification
|
||||
}
|
||||
|
||||
|
||||
if ($user->login != $ldap->login && $ldap->login)
|
||||
{
|
||||
$user->login = $ldap->login;
|
||||
|
||||
@ -701,38 +701,37 @@ elseif ($action == 'update_extras')
|
||||
// Fill array 'array_options' with data from add form
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
|
||||
if($ret < 0)
|
||||
$error++;
|
||||
|
||||
if(!$error) {
|
||||
|
||||
|
||||
if($ret < 0) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
$hookmanager->initHooks(array('supplierorderdao'));
|
||||
$parameters=array('id'=>$object->id);
|
||||
|
||||
|
||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
|
||||
|
||||
$result=$object->insertExtraFields();
|
||||
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = 'edit_extras';
|
||||
$action = 'edit_extras';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1119,12 +1118,12 @@ if ($action=="create")
|
||||
// Other options
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
||||
|
||||
// Bouton "Create Draft"
|
||||
print "</table>\n";
|
||||
|
||||
@ -1141,9 +1140,9 @@ elseif (! empty($object->id))
|
||||
|
||||
$title=$langs->trans("SupplierOrder");
|
||||
dol_fiche_head($head, 'card', $title, 0, 'order');
|
||||
|
||||
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression de la commande
|
||||
*/
|
||||
@ -1408,7 +1407,6 @@ elseif (! empty($object->id))
|
||||
// Other attributes
|
||||
$parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
if ($action == 'edit_extras')
|
||||
@ -1418,7 +1416,7 @@ elseif (! empty($object->id))
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
}
|
||||
|
||||
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
if ($action == 'edit_extras') {
|
||||
@ -1426,7 +1424,7 @@ elseif (! empty($object->id))
|
||||
} else {
|
||||
$value=$object->array_options["options_".$key];
|
||||
}
|
||||
|
||||
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
@ -1441,7 +1439,7 @@ elseif (! empty($object->id))
|
||||
{
|
||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'edit_extras' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print $extrafields->showInputField($key,$value);
|
||||
@ -1450,12 +1448,13 @@ elseif (! empty($object->id))
|
||||
{
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
}
|
||||
|
||||
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(count($extrafields->attribute_label) > 0) {
|
||||
if(count($extrafields->attribute_label) > 0)
|
||||
{
|
||||
if ($action == 'edit_extras' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print '<tr><td></td><td colspan="5">';
|
||||
@ -1463,7 +1462,8 @@ elseif (! empty($object->id))
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
||||
@ -1471,7 +1471,7 @@ elseif (! empty($object->id))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Ligne de 3 colonnes
|
||||
print '<tr><td>'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right"><b>'.price($object->total_ht).'</b></td>';
|
||||
|
||||
@ -1010,7 +1010,6 @@ AddRefInList=Mostrar el código de cliente/proveedor en los listados (lista desp
|
||||
FieldEdition=Edición del campo %s
|
||||
FixTZ=Ajueste TimeZone
|
||||
FillThisOnlyIfRequired=Ejemplo: +2 (Rellene únicamente si se experimentan problemas de offset de zona horaria)
|
||||
|
||||
##### Module password generation
|
||||
PasswordGenerationStandard=Devuelve una contraseña generada por el algoritmo interno Dolibarr: 8 caracteres, números y caracteres en minúsculas mezcladas.
|
||||
PasswordGenerationNone=No ofrece contraseñas. La contraseña se introduce manualmente.
|
||||
|
||||
@ -666,7 +666,6 @@ SaveUploadedFileWithMask=Guardar el archivo con el nombre "<strong>%s</strong>"
|
||||
OriginFileName=Nombre del archivo origen
|
||||
SetDemandReason=Definir origen
|
||||
ViewPrivateNote=Ver notas
|
||||
|
||||
# Week day
|
||||
Monday=Lunes
|
||||
Tuesday=Martes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user