Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
29a01c1a59
@ -53,7 +53,7 @@ $langs->loadLangs(array("admin", "compta"));
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->fiscalyear->write)) { // If we can read accounting records, we should be able to see fiscal year.
|
||||
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) { // If we can read accounting records, we should be able to see fiscal year.
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "compta"));
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->fiscalyear->write)) {
|
||||
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ $langs->loadLangs(array("admin", "compta"));
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->fiscalyear->write)) {
|
||||
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ $langs->loadLangs(array("companies", "compta", "accountancy", "products"));
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->bind->write)) {
|
||||
if (!$user->hasRight('accounting', 'bind', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ $hookmanager->initHooks(array('bookkeepinglist'));
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export) {
|
||||
if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) {
|
||||
$query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
||||
$query .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1";
|
||||
@ -221,7 +221,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -434,7 +434,7 @@ if (empty($reshook)) {
|
||||
$param .= '&search_import_key='.urlencode($search_import_key);
|
||||
}
|
||||
|
||||
//if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) {
|
||||
//if ($action == 'delbookkeepingyearconfirm' && !$user->hasRight('accounting', 'mouvements', 'supprimer_tous')) {
|
||||
// $delmonth = GETPOST('delmonth', 'int');
|
||||
// $delyear = GETPOST('delyear', 'int');
|
||||
// if ($delyear == -1) {
|
||||
@ -486,7 +486,7 @@ if (empty($reshook)) {
|
||||
$uploaddir = $conf->societe->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->rights->accounting->mouvements->supprimer) {
|
||||
if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) {
|
||||
$nbok = 0;
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $object->fetch($toselectid);
|
||||
@ -522,7 +522,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// others mass actions
|
||||
if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) {
|
||||
if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) {
|
||||
if ($massaction == 'lettering') {
|
||||
$lettering = new Lettering($db);
|
||||
$nb_lettering = $lettering->bookkeepingLetteringAll($toselect);
|
||||
@ -652,7 +652,7 @@ if (!empty($sortfield)) {
|
||||
|
||||
// Export into a file with format defined into setup (FEC, CSV, ...)
|
||||
// Must be after definition of $sql
|
||||
if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) {
|
||||
if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
// TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumes too much memory on large export.
|
||||
// Replace this with the query($sql) and loop on each line to export them.
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1));
|
||||
@ -852,7 +852,7 @@ if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting-
|
||||
$arrayofmassactions['preunlettering'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('Unlettering');
|
||||
}
|
||||
*/
|
||||
if ($user->rights->accounting->mouvements->supprimer) {
|
||||
if ($user->hasRight('accounting', 'mouvements', 'supprimer')) {
|
||||
$arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunlettering', 'predeletebookkeepingwriting'))) {
|
||||
@ -888,8 +888,8 @@ if (empty($reshook)) {
|
||||
}
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>';
|
||||
|
||||
if (!empty($user->rights->accounting->mouvements->export)) {
|
||||
$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file&token='.newToken().($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export);
|
||||
if ($user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file&token='.newToken().($param ? '&'.$param : ''), $user->hasRight('accounting', 'mouvements', 'export'));
|
||||
}
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
||||
@ -900,7 +900,7 @@ if (empty($reshook)) {
|
||||
if (!empty($socid)) {
|
||||
$url .= '&socid='.$socid;
|
||||
}
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer);
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->hasRight('accounting', 'mouvements', 'creer'));
|
||||
}
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
@ -194,7 +194,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ if (empty($reshook)) {
|
||||
$uploaddir = $conf->societe->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->rights->accounting->mouvements->supprimer) {
|
||||
if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) {
|
||||
$nbok = 0;
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $object->fetch($toselectid);
|
||||
@ -437,7 +437,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// others mass actions
|
||||
if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) {
|
||||
if (!$error && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) {
|
||||
if ($massaction == 'lettering') {
|
||||
$lettering = new Lettering($db);
|
||||
$nb_lettering = $lettering->bookkeepingLetteringAll($toselect);
|
||||
@ -579,11 +579,11 @@ print $formconfirm;
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array();
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) {
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) {
|
||||
$arrayofmassactions['lettering'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('Lettering');
|
||||
$arrayofmassactions['preunlettering'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('Unlettering');
|
||||
}
|
||||
if ($user->rights->accounting->mouvements->supprimer) {
|
||||
if ($user->hasRight('accounting', 'mouvements', 'supprimer')) {
|
||||
$arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('preunlettering', 'predeletebookkeepingwriting'))) {
|
||||
|
||||
@ -64,7 +64,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->fiscalyear->write)) {
|
||||
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
if (!$cancel) {
|
||||
if ($codeventil < 0) {
|
||||
$codeventil = 0;
|
||||
|
||||
@ -47,7 +47,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->bind->write)) {
|
||||
if (!$user->hasRight('accounting', 'bind', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accounting->bind->write) {
|
||||
if (($action == 'clean' || $action == 'validatehistory') && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
// Clean database by removing binding done on non existing or no more existing accounts
|
||||
$db->begin();
|
||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
|
||||
@ -91,7 +91,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_tvaintra = '';
|
||||
}
|
||||
|
||||
if (is_array($changeaccount) && count($changeaccount) > 0 && $user->rights->accounting->bind->write) {
|
||||
if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
$error = 0;
|
||||
|
||||
if (!(GETPOST('account_parent', 'int') >= 0)) {
|
||||
|
||||
@ -110,7 +110,7 @@ if (!isModEnabled('accounting')) {
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
@ -152,9 +152,18 @@ if ($action == 'updateMask') {
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == "allowonlinesign") {
|
||||
if (!dolibarr_set_const($db, "CONTRACT_ALLOW_ONLINESIGN", $value, 0, 'int', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
} elseif ($action == "allowexternaldownload") {
|
||||
if (!dolibarr_set_const($db, "CONTRACT_ALLOW_EXTERNAL_DOWNLOAD", $value, 0, 'int', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -469,6 +478,37 @@ print $form->selectyesno("activate_hideClosedServiceByDefault", (!empty($conf->g
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Allow online signing
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("AllowOnlineSign").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->CONTRACT_ALLOW_ONLINESIGN) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowonlinesign&token='.newToken().'&value=0">';
|
||||
print img_picto($langs->trans("Activited"), 'switch_on');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowonlinesign&token='.newToken().'&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Allow external download
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowexternaldownload&token='.newToken().'&value=0">';
|
||||
print img_picto($langs->trans("Activited"), 'switch_on');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowexternaldownload&token='.newToken().'&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
@ -85,7 +85,11 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
if (GETPOSTISSET($constvalue.'_SCOPE')) {
|
||||
$scopestring = implode(',', GETPOST($constvalue.'_SCOPE'));
|
||||
if (is_array(GETPOST($constvalue.'_SCOPE'))) {
|
||||
$scopestring = implode(',', GETPOST($constvalue.'_SCOPE'));
|
||||
} else {
|
||||
$scopestring = GETPOST($constvalue.'_SCOPE');
|
||||
}
|
||||
if (!dolibarr_set_const($db, $constvalue.'_SCOPE', $scopestring, 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
@ -97,6 +101,7 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null);
|
||||
} else {
|
||||
@ -104,6 +109,48 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete') {
|
||||
$provider = GETPOST('provider', 'aZ09');
|
||||
$label = GETPOST('label');
|
||||
|
||||
$globalkey = empty($provider) ? $label : $label.'-'.$provider;
|
||||
|
||||
if (getDolGlobalString($globalkey.'_ID') && getDolGlobalString($globalkey.'_SECRET')) { // If ID and secret exist, we delete first the token
|
||||
$backtourl = DOL_URL_ROOT.'/admin/oauth.php?action=delete_entry&provider='.$provider.'&label='.$label.'&token='.newToken();
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||
$callbacktodel = $urlwithroot;
|
||||
if ($label == 'OAUTH_GOOGLE') {
|
||||
$callbacktodel .= '/core/modules/oauth/google_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_GITHUB') {
|
||||
$callbacktodel .= '/core/modules/oauth/github_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_STRIPE_LIVE') {
|
||||
$callbacktodel .= '/core/modules/oauth/stripelive_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_STRIPE_TEST') {
|
||||
$callbacktodel .= '/core/modules/oauth/stripetest_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
} elseif ($label == 'OAUTH_OTHER') {
|
||||
$callbacktodel .= '/core/modules/oauth/generic_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
|
||||
}
|
||||
header("Location: ".$callbacktodel);
|
||||
exit;
|
||||
} else {
|
||||
$action = 'delete_entry';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'delete_entry') {
|
||||
$provider = GETPOST('provider', 'aZ09');
|
||||
$label = GETPOST('label');
|
||||
|
||||
$globalkey = empty($provider) ? $label : $label.'-'.$provider;
|
||||
|
||||
if (!dolibarr_del_const($db, $globalkey.'_NAME', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_ID', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_SECRET', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_URLAUTHORIZE', $conf->entity) || !dolibarr_del_const($db, $globalkey.'_SCOPE', $conf->entity)) {
|
||||
setEventMessages($langs->trans("ErrorInEntryDeletion"), null, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
setEventMessages($langs->trans("EntryDeleted"), null);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -112,6 +159,13 @@ if ($action == 'update') {
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
// Confirmation of action process
|
||||
if ($action == 'delete') {
|
||||
$formquestion = array();
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?provider='.GETPOST('provider').'&label='.GETPOST('label'), $langs->trans('OAuthServiceConfirmDeleteTitle'), $langs->trans('OAuthServiceConfirmDeleteMessage'), 'confirm_delete', $formquestion, 0, 1, 220);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup');
|
||||
@ -227,6 +281,18 @@ if (count($listinsetup) > 0) {
|
||||
print $langs->trans("OAUTH_URL_FOR_CREDENTIAL", $supportedoauth2array[$keyforsupportedoauth2array]['urlforcredentials']);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
|
||||
$label = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array);
|
||||
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&provider='.$keyforprovider.'&label='.$label.'">';
|
||||
print img_picto('', 'delete');
|
||||
print '</a>';
|
||||
|
||||
print '</form>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
if ($supported) {
|
||||
|
||||
@ -291,6 +291,14 @@ if ($mode == 'setup' && $user->admin) {
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Scopes
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("Scopes").'</td>';
|
||||
print '<td colspan="2">';
|
||||
$currentscopes = getDolGlobalString($key[4]);
|
||||
print $currentscopes;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td'.(empty($key['required']) ? '' : ' class="required"').'>';
|
||||
//var_dump($key);
|
||||
|
||||
@ -445,7 +445,7 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)
|
||||
|| !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)
|
||||
|| !empty($conf->mrp->enabled)) {
|
||||
|| isModEnabled('mrp')) {
|
||||
$virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs.
|
||||
}
|
||||
|
||||
|
||||
@ -227,13 +227,13 @@ if (empty($reshook)) {
|
||||
$substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'&email='.urlencode($obj->email).'&mtid='.$obj->rowid;
|
||||
|
||||
$onlinepaymentenabled = 0;
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
if (isModEnabled('paypal')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
if (isModEnabled('paybox')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
@ -263,7 +263,7 @@ if (empty($reshook)) {
|
||||
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = '<a target="_blank" rel="noopener noreferrer" href="'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.((isModEnabled('multicompany')) ? '?entity='.$conf->entity : '').'">'.$langs->trans('BlankSubscriptionForm'). '</a>';
|
||||
}
|
||||
/* For backward compatibility, deprecated */
|
||||
if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) {
|
||||
if (isModEnabled('paypal') && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) {
|
||||
$substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||
|
||||
if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) {
|
||||
|
||||
@ -61,10 +61,10 @@ if (isModEnabled('variants')) {
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other'));
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$langs->load('incoterm');
|
||||
}
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$langs->load('margins');
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ if (empty($reshook)) {
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) {
|
||||
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm') && $usercancreate) {
|
||||
// Set incoterm
|
||||
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||
} elseif ($action == 'add' && $usercancreate) {
|
||||
@ -1870,7 +1870,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr class="field_incoterm_id">';
|
||||
print '<td class="titlefieldcreate"><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1).'</label></td>';
|
||||
print '<td class="valuefieldcreate maxwidthonsmartphone">';
|
||||
@ -2655,7 +2655,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
@ -2737,7 +2737,7 @@ if ($action == 'create') {
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}
|
||||
|
||||
|
||||
@ -312,7 +312,7 @@ if (isModEnabled("propal") && $user->rights->propale->lire) {
|
||||
*/
|
||||
|
||||
/*
|
||||
if (!empty($conf->propal->enabled))
|
||||
if (isModEnabled('propal'))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
@ -387,7 +387,7 @@ if (!empty($conf->propal->enabled))
|
||||
*/
|
||||
|
||||
/*
|
||||
if (!empty($conf->propal->enabled))
|
||||
if (isModEnabled('propal'))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
|
||||
@ -536,7 +536,7 @@ $formother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formpropal = new FormPropal($db);
|
||||
$formmargin = null;
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$formmargin = new FormMargin($db);
|
||||
}
|
||||
$companystatic = new Societe($db);
|
||||
@ -1573,7 +1573,7 @@ if ($resql) {
|
||||
$typenArray = null;
|
||||
|
||||
$with_margin_info = false;
|
||||
if (!empty($conf->margin->enabled) && (
|
||||
if (isModEnabled('margin') && (
|
||||
!empty($arrayfields['total_pa']['checked'])
|
||||
|| !empty($arrayfields['total_margin']['checked'])
|
||||
|| !empty($arrayfields['total_margin_rate']['checked'])
|
||||
|
||||
@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
@ -201,10 +201,10 @@ $arrayfields = array(
|
||||
'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>110),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115),
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
|
||||
@ -781,7 +781,7 @@ $form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formmargin = null;
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
$formmargin = new FormMargin($db);
|
||||
}
|
||||
$companystatic = new Societe($db);
|
||||
@ -1872,7 +1872,7 @@ if ($resql) {
|
||||
$i = 0;
|
||||
|
||||
$with_margin_info = false;
|
||||
if (!empty($conf->margin->enabled) && (
|
||||
if (isModEnabled('margin') && (
|
||||
!empty($arrayfields['total_pa']['checked'])
|
||||
|| !empty($arrayfields['total_margin']['checked'])
|
||||
|| !empty($arrayfields['total_margin_rate']['checked'])
|
||||
|
||||
@ -5802,7 +5802,7 @@ if ($action == 'create') {
|
||||
|
||||
|
||||
// Show online payment link
|
||||
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
|
||||
$useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
|
||||
|
||||
if ($object->statut != Facture::STATUS_DRAFT && $useonlinepayment) {
|
||||
print '<br><!-- Link to pay -->'."\n";
|
||||
|
||||
@ -245,10 +245,10 @@ $arrayfields = array(
|
||||
'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>292),
|
||||
'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>295),
|
||||
'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>296), // Not enabled by default because slow
|
||||
'total_pa' => array('label' => ((isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (empty($conf->margin->enabled) || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'total_pa' => array('label' => ((isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))),
|
||||
|
||||
@ -1476,7 +1476,7 @@ if ($action == 'create') {
|
||||
$productstatic = new Product($db);
|
||||
|
||||
$usemargins = 0;
|
||||
if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) {
|
||||
if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) {
|
||||
$usemargins = 1;
|
||||
}
|
||||
|
||||
@ -1522,7 +1522,7 @@ if ($action == 'create') {
|
||||
print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
|
||||
}
|
||||
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
|
||||
if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
print '<td width="50" class="right">'.$langs->trans("BuyingPrice").'</td>';
|
||||
}
|
||||
print '<td width="30"> </td>';
|
||||
@ -1592,7 +1592,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Margin
|
||||
if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
print '<td class="right nowraponall">'.price($objp->pa_ht).'</td>';
|
||||
}
|
||||
|
||||
@ -1749,7 +1749,7 @@ if ($action == 'create') {
|
||||
print '</tr>';
|
||||
|
||||
$colspan = 6;
|
||||
if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
$colspan++;
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
@ -2206,12 +2206,21 @@ if ($action == 'create') {
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat'));
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
// Show online signature link
|
||||
if ($object->statut != Contrat::STATUS_DRAFT && $conf->global->CONTRACT_ALLOW_ONLINESIGN) {
|
||||
print '<br><!-- Link to sign -->';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
|
||||
|
||||
print showOnlineSignatureUrl('contract', $object->ref).'<br>';
|
||||
}
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
$MAXEVENT = 10;
|
||||
|
||||
$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id);
|
||||
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
@ -2237,7 +2246,7 @@ $db->close();
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (!empty($conf->margin->enabled) && $action == 'editline') {
|
||||
if (isModEnabled('margin') && $action == 'editline') {
|
||||
// TODO Why this ? To manage margin on contracts ?
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -663,7 +663,7 @@ class Contrat extends CommonObject
|
||||
$sql .= " fk_user_author,";
|
||||
$sql .= " fk_projet as fk_project,";
|
||||
$sql .= " fk_commercial_signature, fk_commercial_suivi,";
|
||||
$sql .= " note_private, note_public, model_pdf, extraparams";
|
||||
$sql .= " note_private, note_public, model_pdf, last_main_doc, extraparams";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."contrat";
|
||||
if (!$id) {
|
||||
$sql .= " WHERE entity IN (".getEntity('contract').")";
|
||||
@ -717,7 +717,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->fk_soc = $obj->fk_soc;
|
||||
|
||||
$this->last_main_doc = $obj->last_main_doc;
|
||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -224,6 +224,95 @@ if ($action == "importSignature") {
|
||||
$response = "error sql";
|
||||
}
|
||||
}
|
||||
} elseif ($mode == 'contract') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
$object = new Contrat($db);
|
||||
$object->fetch(0, $ref);
|
||||
|
||||
$upload_dir = !empty($conf->contrat->multidir_output[$object->entity])?$conf->contrat->multidir_output[$object->entity]:$conf->contrat->dir_output;
|
||||
$upload_dir .= '/'.dol_sanitizeFileName($object->ref).'/';
|
||||
|
||||
$date = dol_print_date(dol_now(), "%Y%m%d%H%M%S");
|
||||
$filename = "signatures/".$date."_signature.png";
|
||||
if (!is_dir($upload_dir."signatures/")) {
|
||||
if (!dol_mkdir($upload_dir."signatures/")) {
|
||||
$response ="Error mkdir. Failed to create dir ".$upload_dir."signatures/";
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$return = file_put_contents($upload_dir.$filename, $data);
|
||||
if ($return == false) {
|
||||
$error++;
|
||||
$response = 'Error file_put_content: failed to create signature file.';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// Defined modele of doc
|
||||
$last_main_doc_file = $object->last_main_doc;
|
||||
$directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc
|
||||
if (preg_match('/\.pdf/i', $last_main_doc_file)) {
|
||||
// TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile
|
||||
$newpdffilename = $upload_dir.$ref."_signed-".$date.".pdf";
|
||||
$sourcefile = $upload_dir.$ref.".pdf";
|
||||
|
||||
if (dol_is_file($sourcefile)) {
|
||||
// We build the new PDF
|
||||
$pdf = pdf_getInstance();
|
||||
if (class_exists('TCPDF')) {
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
}
|
||||
$pdf->SetFont(pdf_getPDFFont($langs));
|
||||
|
||||
if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) {
|
||||
$pdf->SetCompression(false);
|
||||
}
|
||||
|
||||
|
||||
//$pdf->Open();
|
||||
$pagecount = $pdf->setSourceFile($sourcefile); // original PDF
|
||||
$s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297);
|
||||
for ($i=1; $i<($pagecount+1); $i++) {
|
||||
try {
|
||||
$tppl = $pdf->importPage($i);
|
||||
$s = $pdf->getTemplatesize($tppl);
|
||||
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
|
||||
$pdf->useTemplate($tppl);
|
||||
} catch (Exception $e) {
|
||||
dol_syslog("Error when manipulating some PDF by onlineSign: ".$e->getMessage(), LOG_ERR);
|
||||
$response = $e->getMessage();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF
|
||||
// TODO Get position of box from PDF template
|
||||
$xforimgstart = 5;
|
||||
$yforimgstart = (empty($s['h']) ? 240 : $s['h'] - 65);
|
||||
$wforimg = $s['w']/2 - $xforimgstart;
|
||||
|
||||
$pdf->Image($upload_dir.$filename, $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4));
|
||||
//$pdf->Close();
|
||||
$pdf->Output($newpdffilename, "F");
|
||||
|
||||
// Index the new file and update the last_main_doc property of object.
|
||||
$object->indexFile($newpdffilename, 1);
|
||||
}
|
||||
if (!$error) {
|
||||
$response = "success";
|
||||
}
|
||||
} elseif (preg_match('/\.odt/i', $last_main_doc_file)) {
|
||||
// Adding signature on .ODT not yet supported
|
||||
// TODO
|
||||
} else {
|
||||
// Document format not supported to insert online signature.
|
||||
// We should just create an image file with the signature.
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
|
||||
@ -110,10 +110,10 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
if (!isModEnabled('facture') || empty($user->rights->facture->lire)) {
|
||||
$showinvoicenb = 0;
|
||||
}
|
||||
if (empty($conf->propal->enabled) || empty($user->rights->propale->lire)) {
|
||||
if (isModEnabled('propal') || empty($user->rights->propale->lire)) {
|
||||
$showpropalnb = 0;
|
||||
}
|
||||
if (empty($conf->commande->enabled) || empty($user->rights->commande->lire)) {
|
||||
if (!isModEnabled('commande') || empty($user->rights->commande->lire)) {
|
||||
$showordernb = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1276,7 +1276,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
dol_syslog("The payment has been created for invoice id " . $this->id);
|
||||
}
|
||||
|
||||
if (!$errorforinvoice && !empty($conf->banque->enabled)) {
|
||||
if (!$errorforinvoice && isModEnabled('banque')) {
|
||||
dol_syslog('* Add payment to bank');
|
||||
|
||||
$bankaccountid = 0;
|
||||
|
||||
@ -3550,7 +3550,7 @@ abstract class CommonObject
|
||||
if (!empty($conf->global->$MODULE)) {
|
||||
$modsactivated = explode(',', $conf->global->$MODULE);
|
||||
foreach ($modsactivated as $mod) {
|
||||
if ($conf->$mod->enabled) {
|
||||
if (isModEnabled($mod)) {
|
||||
return 1; // update was disabled by specific setup
|
||||
}
|
||||
}
|
||||
@ -4105,7 +4105,7 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
// Here $module, $classfile and $classname are set, we can use them.
|
||||
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype)) {
|
||||
if (isModEnabled($module) && (($element != $this->element) || $alsosametype)) {
|
||||
if ($loadalsoobjects && (is_numeric($loadalsoobjects) || ($loadalsoobjects === $objecttype))) {
|
||||
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
||||
//print '/'.$classpath.'/'.$classfile.'.class.php '.class_exists($classname);
|
||||
@ -4883,7 +4883,7 @@ abstract class CommonObject
|
||||
|
||||
// Define usemargins
|
||||
$usemargins = 0;
|
||||
if (!empty($conf->margin->enabled) && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
if (isModEnabled('margin') && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
$usemargins = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -9452,7 +9452,7 @@ class Form
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->gravatar->enabled) && $email && empty($noexternsourceoverwrite)) {
|
||||
if (isModEnabled('gravatar') && $email && empty($noexternsourceoverwrite)) {
|
||||
// see https://gravatar.com/site/implement/images/php/
|
||||
$ret .= '<!-- Put link to gravatar -->';
|
||||
$ret .= '<img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="" title="'.$email.' Gravatar avatar" '.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').' src="https://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash
|
||||
|
||||
@ -1620,13 +1620,13 @@ class FormMail extends Form
|
||||
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet in mass emailing
|
||||
|
||||
$onlinepaymentenabled = 0;
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
if (isModEnabled('paypal')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
if (isModEnabled('paybox')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
|
||||
@ -164,7 +164,7 @@ class Utils
|
||||
}
|
||||
|
||||
// Update cachenbofdoc
|
||||
if (!empty($conf->ecm->enabled) && $choice == 'allfiles') {
|
||||
if (isModEnabled('ecm') && $choice == 'allfiles') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php';
|
||||
$ecmdirstatic = new EcmDirectory($this->db);
|
||||
$result = $ecmdirstatic->refreshcachenboffile(1);
|
||||
|
||||
@ -962,7 +962,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
$sortfield = "t.lastname";
|
||||
}
|
||||
|
||||
if (!empty($conf->clicktodial->enabled)) {
|
||||
if (isModEnabled('clicktodial')) {
|
||||
$user->fetch_clicktodial(); // lecture des infos de clicktodial du user
|
||||
}
|
||||
|
||||
|
||||
@ -3385,11 +3385,11 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
||||
}
|
||||
}
|
||||
if (!empty($addlink)) { // Link on phone number (+ link to add action if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
if ($conf->browser->layout == 'phone' || (!empty($conf->clicktodial->enabled) && !empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) { // If phone or option for, we use link of phone
|
||||
if ($conf->browser->layout == 'phone' || (isModEnabled('clicktodial') && !empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) { // If phone or option for, we use link of phone
|
||||
$newphoneform = $newphone;
|
||||
$newphone = '<a href="tel:'.$phone.'"';
|
||||
$newphone .= '>'.$newphoneform.'</a>';
|
||||
} elseif (!empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') { // If click to dial, we use click to dial url
|
||||
} elseif (isModEnabled('clicktodial') && $addlink == 'AC_TEL') { // If click to dial, we use click to dial url
|
||||
if (empty($user->clicktodial_loaded)) {
|
||||
$user->fetch_clicktodial();
|
||||
}
|
||||
|
||||
@ -2236,7 +2236,7 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '')
|
||||
$module='facture';
|
||||
}
|
||||
|
||||
if (!empty($conf->$module->enabled)) {
|
||||
if (isModEnabled($module)) {
|
||||
$res = dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
||||
if ($res) {
|
||||
if (class_exists($classname)) {
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
$supportedoauth2array = array(
|
||||
'OAUTH_GOOGLE_NAME'=>array('callbackfile' => 'google', 'picto' => 'google', 'urlforapp' => 'OAUTH_GOOGLE_DESC', 'name'=>'Google', 'urlforcredentials'=>'https://console.developers.google.com/', 'availablescopes'=> 'userinfo_email,userinfo_profile,openid,email,profile,cloud_print,admin_directory_user,gmail_full'),
|
||||
);
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array('callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeTest', 'urlforcredentials'=>'', 'availablescopes'=>'read_write');
|
||||
$supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array('callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeLive', 'urlforcredentials'=>'', 'availablescopes'=>'read_write');
|
||||
}
|
||||
|
||||
@ -150,15 +150,15 @@ function getValidOnlinePaymentMethods($paymentmethod = '')
|
||||
|
||||
$validpaymentmethod = array();
|
||||
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) {
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) {
|
||||
$langs->load("paypal");
|
||||
$validpaymentmethod['paypal'] = 'valid';
|
||||
}
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) {
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) {
|
||||
$langs->load("paybox");
|
||||
$validpaymentmethod['paybox'] = 'valid';
|
||||
}
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) {
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe')) {
|
||||
$langs->load("stripe");
|
||||
$validpaymentmethod['stripe'] = 'valid';
|
||||
}
|
||||
|
||||
@ -1281,9 +1281,9 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
||||
}
|
||||
// Show page nb only on iso languages (so default Helvetica font)
|
||||
if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') {
|
||||
$pdf->SetXY($dims['wk'] - $dims['rm'] - 15, -$posy);
|
||||
$pdf->SetXY($dims['wk'] - $dims['rm'] - 18, -$posy);
|
||||
//print 'xxx'.$pdf->PageNo().'-'.$pdf->getAliasNbPages().'-'.$pdf->getAliasNumPage();exit;
|
||||
$pdf->MultiCell(15, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0);
|
||||
$pdf->MultiCell(18, 2, $pdf->getPageNumGroupAlias().' / '.$pdf->getPageGroupAlias(), 0, 'R', 0);
|
||||
}
|
||||
|
||||
// Show Draft Watermark
|
||||
|
||||
@ -60,9 +60,9 @@ function product_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase
|
||||
if (!empty($object->status_buy) || (isModEnabled('margin') && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase
|
||||
if ((((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $user->rights->fournisseur->lire)
|
||||
|| (!empty($conf->margin->enabled) && $user->hasRight("margin", "liretous"))
|
||||
|| (isModEnabled('margin') && $user->hasRight("margin", "liretous"))
|
||||
) {
|
||||
if ($usercancreadprice) {
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id;
|
||||
@ -570,7 +570,7 @@ function show_stats_for_company($product, $socid)
|
||||
}
|
||||
|
||||
// MO
|
||||
if (!empty($conf->mrp->enabled) && !empty($user->rights->mrp->read)) {
|
||||
if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) {
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_mo($socid);
|
||||
if ($ret < 0) {
|
||||
|
||||
@ -168,7 +168,7 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
if (isModEnabled("expedition")) {
|
||||
$nbElements += $project->getElementCount('shipping', 'expedition');
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$nbElements += $project->getElementCount('mrp', 'mrp_mo', 'fk_project');
|
||||
}
|
||||
if (isModEnabled('deplacement')) {
|
||||
|
||||
@ -181,7 +181,7 @@ function getCustomerProposalPieChart($socid = 0)
|
||||
|
||||
$result= '';
|
||||
|
||||
if (empty($conf->propal->enabled) || empty($user->rights->propal->lire)) {
|
||||
if (!isModEnabled('propal') || empty($user->rights->propal->lire)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@ -116,6 +116,21 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
||||
$out .= '&hashp='.$hashp;
|
||||
}
|
||||
}*/
|
||||
} elseif ($type == 'contract') {
|
||||
$securekeyseed = isset($conf->global->CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN) ? $conf->global->CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN : '';
|
||||
$out = $urltouse.'/public/onlinesign/newonlinesign.php?source=contract&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= 'contract_ref';
|
||||
}
|
||||
if ($mode == 0) {
|
||||
$out .= urlencode($ref);
|
||||
}
|
||||
$out .= ($mode ? '</span>' : '');
|
||||
if ($mode == 1) {
|
||||
$out .= "hash('".$securekeyseed."' + '".$type."' + contract_ref)";
|
||||
} else {
|
||||
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(!isModEnabled('multicompany') ? '' : $object->entity), '0');
|
||||
}
|
||||
}
|
||||
|
||||
// For multicompany
|
||||
|
||||
@ -99,7 +99,7 @@ function user_prepare_head(User $object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->clicktodial->enabled)) {
|
||||
if (isModEnabled('clicktodial')) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ClickToDial");
|
||||
$head[$h][2] = 'clicktodial';
|
||||
|
||||
@ -1170,8 +1170,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
@ -654,9 +654,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
|
||||
// Line of free text
|
||||
$substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||
|
||||
@ -363,7 +363,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1535,8 +1535,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1720,8 +1720,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
|
||||
|
||||
@ -783,8 +783,7 @@ class pdf_strato extends ModelePDFContract
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'CONTRACT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -921,8 +921,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
@ -328,7 +328,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -920,8 +920,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1197,8 +1197,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1142,8 +1142,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1129,8 +1129,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'EXPENSEREPORT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,7 +491,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1180,13 +1180,13 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') {
|
||||
$useonlinepayment = 0;
|
||||
if (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) {
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
if (isModEnabled('paypal')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
if (isModEnabled('paybox')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
}
|
||||
@ -2062,8 +2062,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$this->tab_top -= 2;
|
||||
@ -1290,13 +1290,13 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') {
|
||||
$useonlinepayment = 0;
|
||||
if (!empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT)) {
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
if (isModEnabled('paypal')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
if (isModEnabled('paybox')) {
|
||||
$useonlinepayment++;
|
||||
}
|
||||
}
|
||||
@ -2328,8 +2328,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
|
||||
|
||||
@ -741,8 +741,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ class modProduct extends DolibarrModules
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
$this->export_fields_array[$r]['p.recuperableonly'] = 'NPR';
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice'));
|
||||
}
|
||||
if (isModEnabled('stock')) {
|
||||
@ -625,7 +625,7 @@ class modProduct extends DolibarrModules
|
||||
));
|
||||
}
|
||||
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice'));
|
||||
}
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
@ -718,7 +718,7 @@ class modProduct extends DolibarrModules
|
||||
'p.desiredstock' => ''
|
||||
));
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$import_sample = array_merge($import_sample, array('p.cost_price'=>'90'));
|
||||
}
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
|
||||
@ -176,7 +176,7 @@ class modService extends DolibarrModules
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
$this->export_fields_array[$r]['p.recuperableonly'] = 'NPR';
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice'));
|
||||
}
|
||||
if (isModEnabled('stock')) {
|
||||
@ -572,7 +572,7 @@ class modService extends DolibarrModules
|
||||
));
|
||||
}
|
||||
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice'));
|
||||
}
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
@ -663,7 +663,7 @@ class modService extends DolibarrModules
|
||||
'p.desiredstock' => ''
|
||||
));
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || !empty($conf->margin->enabled)) {
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice") || isModEnabled('margin')) {
|
||||
$import_sample = array_merge($import_sample, array('p.cost_price'=>'90'));
|
||||
}
|
||||
if (is_object($mysoc) && $usenpr) {
|
||||
|
||||
@ -1160,8 +1160,7 @@ class pdf_standard extends ModelePDFMovement
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1353,8 +1353,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
@ -816,8 +816,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -695,8 +695,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -895,8 +895,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -691,8 +691,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1731,8 +1731,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
|
||||
|
||||
@ -399,7 +399,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1819,8 +1819,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ class pdf_squille extends ModelePdfReception
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1078,8 +1078,7 @@ class pdf_squille extends ModelePdfReception
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'RECEPTION_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -891,8 +891,7 @@ class pdf_standard extends ModelePDFStock
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'PRODUCT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1169,8 +1169,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1434,8 +1434,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
@ -345,7 +345,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1295,8 +1295,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
// Incoterm
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1484,8 +1484,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms) {
|
||||
$tab_top -= 2;
|
||||
@ -1392,8 +1392,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -824,8 +824,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1443,8 +1443,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ if (empty($object) || !is_object($object)) {
|
||||
|
||||
|
||||
$usemargins = 0;
|
||||
if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
$usemargins = 1;
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ jQuery(document).ready(function()
|
||||
<?php
|
||||
}
|
||||
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if (isModEnabled('margin')) {
|
||||
?>
|
||||
/* Add rule to clear margin when we change some data, so when we change sell or buy price, margin will be recalculated after submitting form */
|
||||
jQuery("#tva_tx").click(function() { /* somtimes field is a text, sometimes a combo */
|
||||
|
||||
@ -131,7 +131,7 @@ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
}
|
||||
|
||||
// Purchase price
|
||||
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) {
|
||||
if ($usemargins && isModEnabled('margin') && empty($user->socid)) {
|
||||
if (!empty($user->rights->margins->creer)) {
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
|
||||
|
||||
@ -49,7 +49,7 @@ global $mysoc;
|
||||
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
|
||||
|
||||
$usemargins = 0;
|
||||
if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
$usemargins = 1;
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
print '<td align="right" class="linecolcycleref2 nowrap">'.price($sign * $tmp[0]).'</td>';
|
||||
}
|
||||
|
||||
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) {
|
||||
if ($usemargins && isModEnabled('margin') && empty($user->socid)) {
|
||||
if (!empty($user->rights->margins->creer)) { ?>
|
||||
<td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php print price($line->pa_ht); ?></td>
|
||||
<?php }
|
||||
|
||||
@ -157,7 +157,7 @@ if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
|
||||
// Private dir
|
||||
$nodes[] = new \Sabre\DAV\FS\Directory($privateDir);
|
||||
// ECM dir
|
||||
if (!empty($conf->ecm->enabled) && !empty($conf->global->DAV_ALLOW_ECM_DIR)) {
|
||||
if (isModEnabled('ecm') && !empty($conf->global->DAV_ALLOW_ECM_DIR)) {
|
||||
$nodes[] = new \Sabre\DAV\FS\Directory($ecmDir);
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ if (isModEnabled('project')) {
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('bills', 'deliveries', 'orders', 'sendings'));
|
||||
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$langs->load('incoterm');
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ if ($action == 'setdate_delivery' && $user->rights->expedition->delivery->creer)
|
||||
if ($result < 0) {
|
||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||
}
|
||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
||||
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||
// Set incoterm
|
||||
$result = $object->setIncoterms((int) GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||
}
|
||||
@ -451,7 +451,7 @@ if ($action == 'create') {
|
||||
print '</tr>';
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
|
||||
@ -919,7 +919,7 @@ if (!empty($id) && $action != 'edit') {
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
// Show online payment link
|
||||
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
|
||||
$useonlinepayment = (isModEnabled('paypal') || isModEnabled('stripe') || isModEnabled('paybox'));
|
||||
|
||||
if ($useonlinepayment) { //$object->statut != Facture::STATUS_DRAFT &&
|
||||
print '<br><!-- Link to pay -->'."\n";
|
||||
|
||||
@ -159,7 +159,7 @@ if (isModEnabled('holiday')) {
|
||||
if (isModEnabled("banque")) {
|
||||
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>isModEnabled('banque'), 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>isModEnabled('mrp'), 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
}
|
||||
if (isModEnabled('recruitment')) {
|
||||
|
||||
@ -65,7 +65,7 @@ if (isModEnabled('project')) {
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal'));
|
||||
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$langs->load('incoterm');
|
||||
}
|
||||
if (isModEnabled('productbatch')) {
|
||||
@ -164,7 +164,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Set incoterm
|
||||
if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
||||
if ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||
}
|
||||
|
||||
@ -1009,7 +1009,7 @@ if ($action == 'create') {
|
||||
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr>';
|
||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
@ -1982,7 +1982,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
|
||||
@ -161,7 +161,7 @@ if (empty($reshook)) {
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
||||
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||
// Set incoterm
|
||||
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||
if ($result < 0) {
|
||||
@ -523,7 +523,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
|
||||
@ -65,7 +65,7 @@ if (isModEnabled('variants')) {
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('admin', 'orders', 'sendings', 'companies', 'bills', 'propal', 'receptions', 'supplier_proposal', 'deliveries', 'products', 'stocks', 'productbatch'));
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$langs->load('incoterm');
|
||||
}
|
||||
|
||||
@ -1777,7 +1777,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$fkincoterms = (!empty($object->fk_incoterms) ? $object->fk_incoterms : ($socid > 0 ? $societe->fk_incoterms : ''));
|
||||
$locincoterms = (!empty($object->location_incoterms) ? $object->location_incoterms : ($socid > 0 ? $societe->location_incoterms : ''));
|
||||
print '<tr>';
|
||||
@ -2290,7 +2290,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
@ -2373,7 +2373,7 @@ if ($action == 'create') {
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
/*if (!empty($conf->margin->enabled)) {
|
||||
/*if (isModEnabled('margin')) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}*/
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ if (isModEnabled('accounting')) {
|
||||
|
||||
|
||||
$langs->loadLangs(array('bills', 'compta', 'suppliers', 'companies', 'products', 'banks', 'admin'));
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$langs->load('incoterm');
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ if (empty($reshook)) {
|
||||
} else {
|
||||
$db->commit();
|
||||
}
|
||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
||||
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||
// Set incoterm
|
||||
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||
} elseif ($action == 'setmode' && $usercancreate) {
|
||||
@ -2429,7 +2429,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr>';
|
||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->label_incoterms) ? $objectsrc->label_incoterms : '', 1).'</label></td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
@ -3127,7 +3127,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
@ -3265,7 +3265,7 @@ if ($action == 'create') {
|
||||
if (isModEnabled("banque")) {
|
||||
$nbrows++; $nbcols++;
|
||||
}
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
$nbrows++;
|
||||
}
|
||||
if (isModEnabled("multicurrency")) {
|
||||
|
||||
@ -1081,6 +1081,10 @@ DictionaryAssetDisposalType=Type of disposal of assets
|
||||
TypeOfUnit=Type of unit
|
||||
SetupSaved=Setup saved
|
||||
SetupNotSaved=Setup not saved
|
||||
OAuthServiceConfirmDeleteTitle=Delete OAuth entry
|
||||
OAuthServiceConfirmDeleteMessage=Are you sure you want to delete this OAuth entry ? All existing tokens for it will also be deleted.
|
||||
ErrorInEntryDeletion=Error in entry deletion
|
||||
EntryDeleted=Entry deleted
|
||||
BackToModuleList=Back to Module list
|
||||
BackToDictionaryList=Back to Dictionaries list
|
||||
TypeOfRevenueStamp=Type of tax stamp
|
||||
@ -2310,7 +2314,7 @@ Images=Images
|
||||
Posts=Posts
|
||||
MaxNumberOfImagesInGetPost=Max number of images allowed in a HTML field submitted in a form
|
||||
MaxNumberOfPostOnPublicPagesByIP=Max number of posts on public pages with an IP Address
|
||||
CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is:
|
||||
CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is:
|
||||
ScriptIsEmpty=The script is empty
|
||||
ShowHideTheNRequests=Show/hide the %s SQL request(s)
|
||||
DefinedAPathForAntivirusCommandIntoSetup=Define a path for an antivirus program into <b>%s</b>
|
||||
@ -2323,5 +2327,5 @@ CssOnList=Css on list pages
|
||||
HelpCssOnEditDesc=The Css used when editing the field.<br>Example: "minwiwdth100 maxwidth500 widthcentpercentminusx"
|
||||
HelpCssOnViewDesc=The Css used when viewing the field.
|
||||
HelpCssOnListDesc=The Css used when field is inside a list table.<br>Example: "tdoverflowmax200"
|
||||
RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions
|
||||
RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions
|
||||
MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions
|
||||
|
||||
@ -74,8 +74,12 @@ StatusProsp=Prospect status
|
||||
DraftPropals=Draft commercial proposals
|
||||
NoLimit=No limit
|
||||
ToOfferALinkForOnlineSignature=Link for online signature
|
||||
WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s
|
||||
ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal
|
||||
ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse
|
||||
WelcomeOnOnlineSignaturePageProposal=Welcome to the page to accept commercial proposals from %s
|
||||
WelcomeOnOnlineSignaturePageContract=Welcome to %s Contract PDF Signing Page
|
||||
ThisScreenAllowsYouToSignDocFromProposal=This screen allow you to accept and sign, or refuse, a quote/commercial proposal
|
||||
ThisScreenAllowsYouToSignDocFromContract=This screen allow you to sign contract on PDF format online.
|
||||
ThisIsInformationOnDocumentToSignProposal=This is information on document to accept or refuse
|
||||
ThisIsInformationOnDocumentToSignContract=This is information on contract to sign
|
||||
SignatureProposalRef=Signature of quote/commercial proposal %s
|
||||
SignatureContractRef=Signature of contract %s
|
||||
FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled
|
||||
|
||||
@ -101,6 +101,8 @@ TypeContact_contrat_external_BILLING=Billing customer contact
|
||||
TypeContact_contrat_external_CUSTOMER=Follow-up customer contact
|
||||
TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact
|
||||
HideClosedServiceByDefault=Hide closed services by default
|
||||
AllowOnlineSign=Allow online signing
|
||||
AllowExternalDownload=Allow external download
|
||||
ShowClosedServices=Show Closed Services
|
||||
HideClosedServices=Hide Closed Services
|
||||
UserStartingService=User starting service
|
||||
|
||||
@ -927,6 +927,7 @@ DirectDownloadInternalLink=Private download link
|
||||
PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file
|
||||
Download=Download
|
||||
DownloadDocument=Download document
|
||||
DownloadSignedDocument=Download signed document
|
||||
ActualizeCurrency=Update currency rate
|
||||
Fiscalyear=Fiscal year
|
||||
ModuleBuilder=Module and Application Builder
|
||||
|
||||
@ -103,11 +103,13 @@ IdProposal=Proposal ID
|
||||
IdProduct=Product ID
|
||||
LineBuyPriceHT=Buy Price Amount net of tax for line
|
||||
SignPropal=Accept proposal
|
||||
SignContract=Sign contract
|
||||
RefusePropal=Refuse proposal
|
||||
Sign=Sign
|
||||
NoSign=Refuse
|
||||
PropalAlreadySigned=Proposal already accepted
|
||||
PropalAlreadyRefused=Proposal already refused
|
||||
PropalSigned=Proposal accepted
|
||||
ContractSigned=Contract signed
|
||||
PropalRefused=Proposal refused
|
||||
ConfirmRefusePropal=Are you sure you want to refuse this commercial proposal?
|
||||
|
||||
@ -1081,6 +1081,10 @@ DictionaryAssetDisposalType=Type de cession d'actifs
|
||||
TypeOfUnit=Type d'unité
|
||||
SetupSaved=Configuration sauvegardée
|
||||
SetupNotSaved=Configuration non enregistrée
|
||||
OAuthServiceConfirmDeleteTitle=Suprresion d'entrée OAuth
|
||||
OAuthServiceConfirmDeleteMessage=Êtes vous sur de vouloir supprimer cette entrée OAuth? Tous les jetons existants associés seront supprimés.
|
||||
ErrorInEntryDeletion=Erreur dans la suppression
|
||||
EntryDeleted=Entrée supprimée
|
||||
BackToModuleList=Retour liste des modules
|
||||
BackToDictionaryList=Retour liste des dictionnaires
|
||||
TypeOfRevenueStamp=Type de timbre fiscal
|
||||
|
||||
@ -74,8 +74,12 @@ StatusProsp=Status prospection
|
||||
DraftPropals=Propositions brouillons
|
||||
NoLimit=Pas de limite
|
||||
ToOfferALinkForOnlineSignature=Lien pour signature en ligne
|
||||
WelcomeOnOnlineSignaturePage=Bienvenue sur la page pour accepter les propositions commerciales de %s
|
||||
ThisScreenAllowsYouToSignDocFrom=Cet écran vous permet d'accepter et signer en ligne, ou de refuser, le devis ou la proposition commerciale
|
||||
ThisIsInformationOnDocumentToSign=Voici les informations sur le document à accepter ou refuser
|
||||
WelcomeOnOnlineSignaturePageProposal=Bienvenue sur la page pour accepter les propositions commerciales de %s
|
||||
WelcomeOnOnlineSignaturePageContract=Bienvenue sur la page de signature en ligne de contrats au format PDF de %s
|
||||
ThisScreenAllowsYouToSignDocFromProposal=Cet écran vous permet d'accepter et signer en ligne, ou de refuser, le devis ou la proposition commerciale
|
||||
ThisScreenAllowsYouToSignDocFromContract=Cet écran vous permet de signer en ligne des contrats au format PDF.
|
||||
ThisIsInformationOnDocumentToSignProposal=Voici les informations sur le document à accepter ou refuser
|
||||
ThisIsInformationOnDocumentToSignContract=Voici les informations sur le contrat a signer
|
||||
SignatureProposalRef=Signature du devis ou proposition commerciale %s
|
||||
SignatureContractRef=Signature du contrat %s
|
||||
FeatureOnlineSignDisabled=Fonctionnalité pour la signature en ligne désactivée ou document généré avant l'activation de la fonctionnalité
|
||||
|
||||
@ -100,5 +100,7 @@ TypeContact_contrat_external_BILLING=Contact client facturation contrat
|
||||
TypeContact_contrat_external_CUSTOMER=Contact client suivi contrat
|
||||
TypeContact_contrat_external_SALESREPSIGN=Contact client signataire contrat
|
||||
HideClosedServiceByDefault=Masquer les services fermés par défaut
|
||||
AllowOnlineSign=Autoriser la signature en ligne
|
||||
AllowExternalDownload=Autoriser le téléchargement externe
|
||||
ShowClosedServices=Afficher les services fermés
|
||||
HideClosedServices=Masquer les services fermés
|
||||
|
||||
@ -565,7 +565,7 @@ None=Aucun
|
||||
NoneF=Aucune
|
||||
NoneOrSeveral=Aucun ou plusieurs
|
||||
Late=Retard
|
||||
LateDesc=Le délai qui définit si un enregistrement est en retard ou non dépend de votre configuration. Demandez à votre administrateur pour changer ce délai depuis Accueil - Configuration - Alertes
|
||||
LateDesc=Le délai qui définit si un enregistrement est en retard ou non dépend de votre configuration. Demandez à votre administrateur pour changer ce délai depuis Accueil - Configuration - Alertes
|
||||
NoItemLate=Aucun élément en retard
|
||||
Photo=Photo
|
||||
Photos=Photos
|
||||
@ -927,6 +927,7 @@ DirectDownloadInternalLink=Lien de téléchargement privé
|
||||
PrivateDownloadLinkDesc=Vous devez être connecté et vous avez besoin d’autorisations pour afficher ou télécharger le fichier
|
||||
Download=Téléchargement
|
||||
DownloadDocument=Télécharger le document
|
||||
DownloadSignedDocument=Télécharger le document signé
|
||||
ActualizeCurrency=Mettre à jour le taux de devise
|
||||
Fiscalyear=Exercice fiscal
|
||||
ModuleBuilder=Générateur de Module et Application
|
||||
|
||||
@ -47,7 +47,7 @@ SendPropalByMail=Envoyer proposition commerciale par email
|
||||
DatePropal=Date de proposition
|
||||
DateEndPropal=Date de fin de validité
|
||||
ValidityDuration=Durée de validité
|
||||
SetAcceptedRefused=Accepter/Refuser
|
||||
SetAcceptedRefused=Accepter/Refuser
|
||||
ErrorPropalNotFound=Propale %s inexistante
|
||||
AddToDraftProposals=Ajouter à proposition brouillon
|
||||
NoDraftProposals=Pas de propositions brouillons
|
||||
@ -103,11 +103,13 @@ IdProposal=ID de la proposition commerciale
|
||||
IdProduct=ID produit
|
||||
LineBuyPriceHT=Prix d'achat HT de la ligne
|
||||
SignPropal=Accepter la proposition
|
||||
SignContract=Signer le contrat
|
||||
RefusePropal=Refuser la proposition
|
||||
Sign=Signer
|
||||
NoSign=Mettre à Non signé
|
||||
PropalAlreadySigned=Proposition déjà acceptée
|
||||
PropalAlreadyRefused=Proposition déjà refusée
|
||||
PropalSigned=Proposition acceptée
|
||||
ContractSigned=Contrat signé
|
||||
PropalRefused=Proposition refusée
|
||||
ConfirmRefusePropal=Êtes-vous sûr de vouloir refuser cette proposition ?
|
||||
|
||||
@ -189,13 +189,13 @@ if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) {
|
||||
$listofval = array();
|
||||
$listofval['-1'] = $langs->trans('No');
|
||||
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
if (isModEnabled('paybox')) {
|
||||
$listofval['paybox'] = 'Paybox';
|
||||
}
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
if (isModEnabled('paypal')) {
|
||||
$listofval['paypal'] = 'PayPal';
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
if (isModEnabled('stripe')) {
|
||||
$listofval['stripe'] = 'Stripe';
|
||||
}
|
||||
print $form->selectarray("PARTNERSHIP_NEWFORM_PAYONLINE", $listofval, (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) ? $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE : ''), 0);
|
||||
|
||||
@ -5535,7 +5535,7 @@ class Product extends CommonObject
|
||||
}
|
||||
$stock_reception_fournisseur = $this->stats_reception['qty'];
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if (isModEnabled('mrp')) {
|
||||
$result = $this->load_stats_inproduction(0, '1,2', 1, $dateofvirtualstock);
|
||||
if ($result < 0) {
|
||||
dol_print_error($this->db, $this->error);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user