Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
4336b188c7
@ -261,6 +261,20 @@ if ($action == 'setenablelettering') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setenableautolettering') {
|
||||
$setenableautolettering = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_AUTOLETTERING", $setenableautolettering, 'yesno', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@ -479,6 +493,7 @@ if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) {
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
// Lettering params
|
||||
print '<table class="noborder centpercent">';
|
||||
@ -499,6 +514,21 @@ if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING") . '</td>';
|
||||
if (!empty($conf->global->ACCOUNTING_ENABLE_AUTOLETTERING)) {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
@ -793,7 +793,7 @@ if (!$error && $action == 'writebookkeeping') {
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
} else {
|
||||
if ($lettering && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
|
||||
if ($lettering && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLetteringAll(array($bookkeeping->id));
|
||||
|
||||
@ -376,7 +376,7 @@ if ($action == 'writebookkeeping') {
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
} else {
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
|
||||
|
||||
@ -390,7 +390,7 @@ if ($action == 'writebookkeeping') {
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
} else {
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
|
||||
|
||||
@ -29,6 +29,7 @@ require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
@ -2392,10 +2392,10 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
||||
$outputlangs->load('orders');
|
||||
|
||||
if (count($objects) > 1 && count($objects) <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) {
|
||||
$object->note_public = dol_concatdesc($object->note_public, '<br>'.$outputlangs->transnoentities("RefOrder").' : <br>');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' :');
|
||||
foreach ($objects as $elementobject) {
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).(!empty($elementobject->ref_client) ? ' ('.$elementobject->ref_client.')' : '').(!empty($elementobject->ref_supplier) ? ' ('.$elementobject->ref_supplier.')' : '').' ');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '.dol_print_date($elementobject->date, 'day', '', $outputlangs).'<br>');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).(empty($elementobject->ref_client) ?'' : ' ('.$elementobject->ref_client.')').(empty($elementobject->ref_supplier) ? '' : ' ('.$elementobject->ref_supplier.')').' ');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '.dol_print_date($elementobject->date, 'day', '', $outputlangs));
|
||||
}
|
||||
} elseif (count($objects) == 1) {
|
||||
$elementobject = array_shift($objects);
|
||||
@ -2426,9 +2426,9 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
||||
if (count($objects) > 1) {
|
||||
$order = null;
|
||||
if (empty($object->linkedObjects['commande']) && $object->element != 'commande') {
|
||||
$object->note_public = dol_concatdesc($object->note_public, '<br>'.$outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' : <br>');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :');
|
||||
} else {
|
||||
$object->note_public = dol_concatdesc($object->note_public, '<br>'.$outputlangs->transnoentities("RefSending").' : <br>');
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefSending").' :');
|
||||
}
|
||||
// We concat this record info into fields xxx_value. title is overwrote.
|
||||
foreach ($objects as $elementobject) {
|
||||
@ -2446,11 +2446,9 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
||||
|
||||
if (! is_object($order)) {
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref));
|
||||
$object->note_public = dol_concatdesc($object->note_public, '<br>');
|
||||
} else {
|
||||
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : ''));
|
||||
$object->note_public = dol_concatdesc($object->note_public, ' / '.$outputlangs->transnoentities($elementobject->ref));
|
||||
$object->note_public = dol_concatdesc($object->note_public, '<br>');
|
||||
}
|
||||
}
|
||||
} elseif (count($objects) == 1) {
|
||||
|
||||
@ -1948,6 +1948,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE) && !empty($this->atleastonephoto)) {
|
||||
$this->cols['photo']['status'] = true;
|
||||
$this->cols['photo']['border-left'] = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -339,6 +339,7 @@ ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on
|
||||
ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting)
|
||||
ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
|
||||
ACCOUNTING_ENABLE_LETTERING=Enable the lettering function in the accounting
|
||||
ACCOUNTING_ENABLE_AUTOLETTERING=Enable the automatic lettering when transferring to accounting
|
||||
|
||||
## Export
|
||||
NotExportLettering=Do not export the lettering when generating the file
|
||||
|
||||
@ -159,6 +159,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
$head = '';
|
||||
if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) {
|
||||
$head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
|
||||
@ -201,7 +203,7 @@ $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
|
||||
if (!empty($conf->global->$paramlogo)) {
|
||||
$logosmall = $conf->global->$paramlogo;
|
||||
} elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) {
|
||||
$logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_;
|
||||
$logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO;
|
||||
}
|
||||
//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
|
||||
// Define urllogo
|
||||
@ -221,7 +223,7 @@ if ($urllogo) {
|
||||
if (!empty($mysoc->url)) {
|
||||
print '<a href="'.$mysoc->url.'" target="_blank" rel="noopener">';
|
||||
}
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'">';
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogofull.'">';
|
||||
if (!empty($mysoc->url)) {
|
||||
print '</a>';
|
||||
}
|
||||
@ -234,7 +236,7 @@ if ($urllogo) {
|
||||
|
||||
if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) {
|
||||
print '<div class="backimagepublicrecruitment">';
|
||||
print '<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="'.$conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE.'">';
|
||||
print '<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE.'">';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user