diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 244b6f72330..3a7be3e073e 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -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 ''; print ''; +print '
'; // Lettering params print ''; @@ -499,6 +514,21 @@ if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { } print ''; +if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { + print ''; + print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_AUTOLETTERING)) { + print ''; + } else { + print ''; + } + print ''; +} + print '
' . $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING") . ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'; print '
'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 4aba6bfeda4..699002395ab 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -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)); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index a5b82e7b2d0..746383fef0b 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -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)); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 0519762baef..f67fd76b3f1 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -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)); diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 0721aeb7ef0..5adde527f34 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -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'; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index abdda592d2f..4d9569a1cc4 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.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, '
'.$outputlangs->transnoentities("RefOrder").' :
'); + $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).'
'); + $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, '
'.$outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :
'); + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :'); } else { - $object->note_public = dol_concatdesc($object->note_public, '
'.$outputlangs->transnoentities("RefSending").' :
'); + $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, '
'); } 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, '
'); } } } elseif (count($objects) == 1) { diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 753e1511197..88b56eb8fa6 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -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; } diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index b699c8e204b..c32ff7c5c65 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -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 diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index 57cb82d9b08..3626693ce89 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -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 = ''."\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 ''."\n"; // Define urllogo @@ -221,7 +223,7 @@ if ($urllogo) { if (!empty($mysoc->url)) { print ''; } - print ''; + print ''; if (!empty($mysoc->url)) { print ''; } @@ -234,7 +236,7 @@ if ($urllogo) { if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) { print '
'; - print ''; + print ''; print '
'; }