Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/comm/action/index.php
	htdocs/core/class/html.form.class.php
	htdocs/core/lib/payments.lib.php
	htdocs/core/modules/commande/doc/pdf_einstein.modules.php
	htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
	htdocs/core/modules/facture/doc/pdf_crabe.modules.php
	htdocs/core/modules/facture/doc/pdf_sponge.modules.php
	htdocs/core/modules/propale/doc/pdf_azur.modules.php
	htdocs/core/modules/propale/doc/pdf_cyan.modules.php
	htdocs/projet/card.php
	htdocs/public/payment/newpayment.php
	htdocs/societe/list.php
	htdocs/ticket/document.php
This commit is contained in:
Laurent Destailleur
2021-04-13 20:19:05 +02:00
50 changed files with 115 additions and 53 deletions

View File

@@ -97,7 +97,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL < 2) {
$accounting = new AccountingAccount($db);
/*
* Actions
*/

View File

@@ -183,7 +183,7 @@ if ($id > 0) {
$permission = $user->rights->adherent->creer;
$permtoedit = $user->rights->adherent->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
print "<br><br>";
} else {
dol_print_error($db);

View File

@@ -129,7 +129,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->asset->write;
$permtoedit = $user->rights->asset->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -151,7 +151,7 @@ if ($object->id) {
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'bom/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -49,6 +49,8 @@ if (is_numeric($type)) {
$type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
}
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('categoryindex'));
/*
* View

View File

@@ -287,7 +287,7 @@ if ($object->id > 0) {
$modulepart = 'actions';
$permission = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -189,7 +189,7 @@ if ($object->id > 0) {
$permission = $user->rights->propal->creer;
$permtoedit = $user->rights->propal->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -184,7 +184,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->commande->creer;
$permtoedit = $user->rights->commande->creer;
$param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity);
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -188,7 +188,7 @@ if ($id > 0 || !empty($ref)) {
$param = '&id='.$object->id.'&num='.urlencode($numref);
$moreparam = '&num='.urlencode($numref);
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/";
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -139,7 +139,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -152,7 +152,7 @@ if ($object->id) {
$modulepart = 'banque';
$permission = $user->rights->banque->modifier;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -128,7 +128,7 @@ if ($object->id) {
$modulepart = 'deplacement';
$permission = $user->rights->deplacement->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -182,7 +182,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->facture->creer;
$permtoedit = $user->rights->facture->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -165,9 +165,9 @@ if ($object->id) {
$modulepart = 'tax';
$permission = $user->rights->tax->charges->creer;
$permtoedit = $user->rights->fournisseur->facture->creer;
$permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -151,9 +151,9 @@ if ($object->id) {
print dol_get_fiche_end();
$permission = $user->rights->tax->charges->creer;
$permtoedit = $user->rights->fournisseur->facture->creer;
$permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -88,6 +88,8 @@ if ($id > 0) {
$upload_dir = $conf->societe->multidir_output[$object->entity].'/contact/'.dol_sanitizeFileName($object->ref);
$modulepart = 'contact';
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contactdocument'));
/*
* Actions

View File

@@ -48,6 +48,8 @@ if ($id > 0) {
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contactcard'));
/*
* Actions

View File

@@ -195,7 +195,7 @@ if ($object->id) {
$permission = $user->rights->contrat->creer;
$permtoedit = $user->rights->contrat->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -4718,11 +4718,20 @@ class Form
if (empty($morecss)) {
$morecss = 'minwidth100';
}
$show_empty = isset($input['select_show_empty']) ? $input['select_show_empty'] : 1;
$key_in_label = isset($input['select_key_in_label']) ? $input['select_key_in_label'] : 0;
$value_as_key = isset($input['select_value_as_key']) ? $input['select_value_as_key'] : 0;
$translate = isset($input['select_translate']) ? $input['select_translate'] : 0;
$maxlen = isset($input['select_maxlen']) ? $input['select_maxlen'] : 0;
$disabled = isset($input['select_disabled']) ? $input['select_disabled'] : 0;
$sort = isset($input['select_sort']) ? $input['select_sort'] : '';
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">';
if (!empty($input['label'])) {
$more .= $input['label'].'</div><div class="tagtd left">';
}
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], $show_empty, $key_in_label, $value_as_key, $moreattr, $translate, $maxlen, $disabled, $sort, $morecss);
$more .= '</div></div>'."\n";
} elseif ($input['type'] == 'checkbox') {
$more .= '<div class="tagtr">';

View File

@@ -28,7 +28,6 @@
*/
function payment_prepare_head(Paiement $object)
{
global $langs, $conf;
$h = 0;
@@ -287,6 +286,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
}
}
} elseif ($type == 'member' || $type == 'membersubscription') {
$newtype = 'member';
$out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '<font color="#666666">' : '');
if ($mode == 1) {
$out .= 'member_ref';
@@ -301,10 +301,10 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
} else {
$out .= '&securekey='.($mode ? '<font color="#666666">' : '');
if ($mode == 1) {
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)";
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)";
}
if ($mode == 0) {
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2);
}
$out .= ($mode ? '</font>' : '');
}

View File

@@ -300,7 +300,11 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -342,7 +342,11 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -342,7 +342,11 @@ class pdf_crabe extends ModelePDFFactures
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -351,7 +351,11 @@ class pdf_sponge extends ModelePDFFactures
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -30,6 +30,7 @@
* \ingroup propale
* \brief File of Class to generate PDF proposal with Azur template
*/
require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@@ -332,7 +333,11 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -337,7 +337,11 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}

View File

@@ -188,10 +188,10 @@ if ($object->id) {
print dol_get_fiche_end();
$modulepart = 'don';
$permission = $user->rights->don->lire;
$permission = $user->rights->don->creer;
$permtoedit = $user->rights->don->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -180,7 +180,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->expedition->creer;
$permtoedit = $user->rights->expedition->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@@ -156,7 +156,7 @@ if ($object->id) {
$permission = $user->rights->expensereport->creer;
$permtoedit = $user->rights->expensereport->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -173,7 +173,7 @@ if ($object->id) {
$permission = $user->rights->ficheinter->creer;
$permtoedit = $user->rights->ficheinter->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -179,7 +179,7 @@ if ($object->id > 0) {
$permission = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
$permtoedit = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
header('Location: index.php');
exit;

View File

@@ -352,7 +352,7 @@ if ($object->id) {
$permission = $user->rights->holiday->write;
$permtoedit = $user->rights->holiday->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -163,7 +163,7 @@ if ($object->id) {
$permission = $user->rights->loan->write;
$permtoedit = $user->rights->loan->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -240,7 +240,7 @@ if ($object->id) {
//$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -186,7 +186,7 @@ if ($object->id) {
//$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -248,7 +248,7 @@ if ($object->id) {
print dol_get_fiche_end();
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
// Merge propal PDF document PDF files

View File

@@ -193,7 +193,7 @@ if ($object->id) {
$permission = ($user->rights->produit->creer);
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -605,7 +605,18 @@ if ($action == 'create' && $user->rights->projet->creer) {
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) {
$array[1] = $langs->trans("SharedProject");
}
print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
if (count($array) > 0) {
print $form->selectarray('public', $array, GETPOSTISSET('public') ? GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
} else {
print '<input type="hidden" name="public" id="public" value="'.(GETPOSTISSET('public') ? GETPOST('public') : $object->public).'">';
if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) {
print $langs->trans("PrivateProject");
} else {
print $langs->trans("SharedProject");
}
}
print '</td></tr>';
// Date start
@@ -878,7 +889,18 @@ if ($action == 'create' && $user->rights->projet->creer) {
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) {
$array[1] = $langs->trans("SharedProject");
}
print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
if (count($array) > 0) {
print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
} else {
print '<input type="hidden" id="public" name="public" value="'.$object->public.'">';
if ($object->public == 0) {
print $langs->trans("PrivateProject");
} else {
print $langs->trans("SharedProject");
}
}
print '</td></tr>';
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {

View File

@@ -166,7 +166,7 @@ if ($object->id > 0) {
$modulepart = 'project';
$permission = ($userWrite > 0);
$permtoedit = ($userWrite > 0);
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error('', 'NoRecordFound');
}

View File

@@ -327,7 +327,7 @@ if ($object->id > 0) {
$permission = $user->rights->projet->creer;
$permtoedit = $user->rights->projet->creer;
$relativepathwithnofile = dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
header('Location: index.php');
exit;

View File

@@ -1351,7 +1351,7 @@ if ($source == 'contractline') {
}
// Payment on member subscription
if ($source == 'membersubscription') {
if ($source == 'member' || $source == 'membersubscription') {
$found = true;
$langs->load("members");

View File

@@ -218,7 +218,7 @@ if ($object->id) {
$relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -218,7 +218,7 @@ if ($object->id) {
//$relativepathwithnofile='recruitmentjobposition/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'recruitmentjobposition/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -141,7 +141,7 @@ if ($object->id > 0) {
$modulepart = 'dolresource';
$permission = $user->rights->resource->write;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -134,7 +134,7 @@ if ($object->id) {
$modulepart = 'salaries';
$permission = $user->rights->salaries->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -178,7 +178,7 @@ if ($object->id) {
$permission = $user->rights->societe->creer;
$permtoedit = $user->rights->societe->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 0);
}

View File

@@ -947,8 +947,9 @@ if (empty($type) || $type == 'c' || $type == 'p') {
$moreforfilter .= '</div>';
}
}
if (empty($type) || $type == 'f') {
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
if (!empty($conf->fournisseur->enabled) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('Categories');

View File

@@ -165,7 +165,7 @@ if ($object->id > 0) {
$permission = $user->rights->supplier_proposal->creer;
$permtoedit = $user->rights->supplier_proposal->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@@ -196,7 +196,7 @@ if ($object->id) {
$permtoedit = $user->rights->ticket->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@@ -179,7 +179,7 @@ if ($object->id) {
$permission = $user->rights->user->user->creer;
$permtoedit = $user->rights->user->user->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}