';
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 628313d5fe9..1d788457abe 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -292,7 +292,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
$membertype->amount = $objp->amount;
print '
';
print $langs->trans("NotificationDisableConfirmMessageFix").' ';
print '';
@@ -241,79 +254,68 @@ print ' ';
print ' ';
// Notification per contacts
-$title = $langs->trans("ListOfNotificationsPerUser");
-if (!empty($conf->societe->enabled)) {
- $title = $langs->trans("ListOfNotificationsPerUserOrContact");
-}
-print load_fiche_titre($title, '', '');
+$title = $langs->trans("TemplatesForNotifications");
+
+print load_fiche_titre($title, '', 'email');
// Load array of available notifications
$notificationtrigger = new InterfaceNotification($db);
$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
+// Editing global variables not related to a specific theme
+$constantes = array();
+foreach ($listofnotifiedevents as $notifiedevent) {
+ $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
+ $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
-if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
- // Editing global variables not related to a specific theme
- $constantes = array();
- foreach ($listofnotifiedevents as $notifiedevent) {
- $label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
- $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
-
- if ($notifiedevent['elementtype'] == 'order_supplier') {
- $elementLabel = $langs->trans('SupplierOrder');
- } elseif ($notifiedevent['elementtype'] == 'propal') {
- $elementLabel = $langs->trans('Proposal');
- } elseif ($notifiedevent['elementtype'] == 'facture') {
- $elementLabel = $langs->trans('Bill');
- } elseif ($notifiedevent['elementtype'] == 'commande') {
- $elementLabel = $langs->trans('Order');
- } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
- $elementLabel = $langs->trans('Intervention');
- } elseif ($notifiedevent['elementtype'] == 'shipping') {
- $elementLabel = $langs->trans('Shipping');
- } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
- $elementLabel = $langs->trans('ExpenseReport');
- }
-
- if ($notifiedevent['elementtype'] == 'propal') {
- $model = 'propal_send';
- } elseif ($notifiedevent['elementtype'] == 'commande') {
- $model = 'order_send';
- } elseif ($notifiedevent['elementtype'] == 'facture') {
- $model = 'facture_send';
- } elseif ($notifiedevent['elementtype'] == 'shipping') {
- $model = 'shipping_send';
- } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
- $model = 'fichinter_send';
- } elseif ($notifiedevent['elementtype'] == 'expensereport') {
- $model = 'expensereport_send';
- } elseif ($notifiedevent['elementtype'] == 'order_supplier') {
- $model = 'order_supplier_send';
- // } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
- } elseif ($notifiedevent['elementtype'] == 'member') {
- $model = 'member';
- }
-
- $constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
+ if ($notifiedevent['elementtype'] == 'order_supplier') {
+ $elementLabel = $langs->trans('SupplierOrder');
+ } elseif ($notifiedevent['elementtype'] == 'propal') {
+ $elementLabel = $langs->trans('Proposal');
+ } elseif ($notifiedevent['elementtype'] == 'facture') {
+ $elementLabel = $langs->trans('Bill');
+ } elseif ($notifiedevent['elementtype'] == 'commande') {
+ $elementLabel = $langs->trans('Order');
+ } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
+ $elementLabel = $langs->trans('Intervention');
+ } elseif ($notifiedevent['elementtype'] == 'shipping') {
+ $elementLabel = $langs->trans('Shipping');
+ } elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
+ $elementLabel = $langs->trans('ExpenseReport');
}
- $helptext = '';
- form_constantes($constantes, 3, $helptext, 'EmailTemplate');
-
- print '';
- print '* '.$langs->trans("GoOntoUserCardToAddMore").' ';
- if (!empty($conf->societe->enabled)) {
- print '** '.$langs->trans("GoOntoContactCardToAddMore").' ';
+ if ($notifiedevent['elementtype'] == 'propal') {
+ $model = 'propal_send';
+ } elseif ($notifiedevent['elementtype'] == 'commande') {
+ $model = 'order_send';
+ } elseif ($notifiedevent['elementtype'] == 'facture') {
+ $model = 'facture_send';
+ } elseif ($notifiedevent['elementtype'] == 'shipping') {
+ $model = 'shipping_send';
+ } elseif ($notifiedevent['elementtype'] == 'ficheinter') {
+ $model = 'fichinter_send';
+ } elseif ($notifiedevent['elementtype'] == 'expensereport') {
+ $model = 'expensereport_send';
+ } elseif ($notifiedevent['elementtype'] == 'order_supplier') {
+ $model = 'order_supplier_send';
+ // } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
+ } elseif ($notifiedevent['elementtype'] == 'member') {
+ $model = 'member';
}
- print '
';
- print $form->buttonsSaveCancel("Save", '');
+ $constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
+}
+
+$helptext = '';
+form_constantes($constantes, 3, $helptext, 'EmailTemplate');
+
+print $form->buttonsSaveCancel("Save", '');
+
+/*
} else {
print '';
print '';
print ''.$langs->trans("Label").' ';
- /*print ''.$langs->trans("Code").' ';
- print ''.$langs->trans("Label").' ';*/
//print ''.$langs->trans("NbOfTargetedContacts").' ';
print " \n";
@@ -359,6 +361,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
}
print '';
}
+*/
print '';
@@ -371,7 +374,15 @@ print ' ';
print ' ';
print ' ';
-print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', '');
+print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', 'email');
+
+print '';
+print $langs->trans("Note").': ';
+print '* '.$langs->trans("GoOntoUserCardToAddMore").' ';
+if (!empty($conf->societe->enabled)) {
+ print '** '.$langs->trans("GoOntoContactCardToAddMore").' ';
+}
+print '
';
print '';
print '';
@@ -488,8 +499,6 @@ foreach ($listofnotifiedevents as $notifiedevent) {
}
print '
';
-print ' ';
-
print $form->buttonsSaveCancel("Save", '');
print '';
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 997ca45f515..746075ab51e 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2001-2007 Rodolphe Quiedeville
* Copyright (C) 2004-2014 Laurent Destailleur
* Copyright (C) 2004 Eric Seigne
* Copyright (C) 2005 Marc Barilley / Ocebo
@@ -817,7 +817,7 @@ if (empty($reshook)) {
}
}
}
- } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {
+ } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '' && $usercancreate) {
// Define vat_rate
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);
$vat_rate = str_replace('*', '', $vat_rate);
@@ -835,7 +835,7 @@ if (empty($reshook)) {
$prod_entry_mode = GETPOST('prod_entry_mode');
if ($prod_entry_mode == 'free') {
$idprod = 0;
- $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
+ $tva_tx = (GETPOST('tva_tx') ? price2num(GETPOST('tva_tx')) : 0);
} else {
$idprod = GETPOST('idprod', 'int');
$tva_tx = '';
@@ -2680,7 +2680,7 @@ if ($action == 'create') {
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
// Show online signature link
- $useonlinesignature = 1; // Replace this with 1 when feature to make online signature is ok
+ $useonlinesignature = 1;
if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) {
print ' ';
diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php
index 488b5051ea5..bf484dc1c45 100644
--- a/htdocs/core/ajax/onlineSign.php
+++ b/htdocs/core/ajax/onlineSign.php
@@ -51,11 +51,27 @@ if (!defined('NOBROWSERNOTIF')) {
include '../../main.inc.php';
$action = GETPOST('action', 'aZ09');
+
$signature = GETPOST('signaturebase64');
$ref = GETPOST('ref', 'aZ09');
$mode = GETPOST('mode', 'aZ09');
+$SECUREKEY = GETPOST("securekey"); // Secure key
+
$error = 0;
$response = "";
+
+// Check securitykey
+$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
+$type = $mode;
+$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
+
+if ($calculatedsecuritykey != $SECUREKEY) {
+ http_response_code(403);
+ print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
+ exit(-1);
+}
+
+
/*
* Actions
*/
@@ -71,62 +87,76 @@ if ($action == "importSignature") {
if (!empty($signature) && $signature[0] == "image/png;base64") {
$signature = $signature[1];
$data = base64_decode($signature);
- $upload_dir = DOL_DATA_ROOT."/".$mode."/".$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 (!mkdir($upload_dir."signatures/")) {
- $response ="error mkdir";
- $error++;
+
+ if ($mode == "propale" || $mode == 'proposal') {
+ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
+ $object = new Propal($db);
+ $object->fetch(0, $ref);
+
+ $upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->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) {
- $response = 'error file_put_content';
- } else {
- if ($mode == "propale") {
- require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
- require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
- $object = new Propal($db);
- $object->fetch(0, $ref);
- $pdf = pdf_getInstance();
- $pdf->Open();
- $pdf->AddPage();
- $pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
+ if (!$error) {
+ $return = file_put_contents($upload_dir.$filename, $data);
+ if ($return == false) {
+ $error++;
+ $response = 'error file_put_content';
+ }
+ }
- $tppl = $pdf->importPage(1);
- $pdf->useTemplate($tppl);
- $pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
- $pdf->Close();
- $pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
+ if (!$error) {
+ $pdf = pdf_getInstance();
+ $pdf->Open();
+ $pdf->AddPage();
+ $pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
- $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
- $sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
- $sql .= " WHERE rowid = ".((int) $object->id);
+ $tppl = $pdf->importPage(1);
+ $pdf->useTemplate($tppl);
+ $pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
+ $pdf->Close();
+ $pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
- dol_syslog(__METHOD__, LOG_DEBUG);
- $resql = $db->query($sql);
- if (!$resql) {
- $error++;
- } else {
- $num = $db->affected_rows($resql);
- }
+ $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
+ $sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
+ $sql .= " WHERE rowid = ".((int) $object->id);
- if (!$error) {
- $db->commit();
- $response = "success";
- setEventMessage("PropalSigned");
- } else {
- $db->rollback();
- $response = "error sql";
- }
+ dol_syslog(__METHOD__, LOG_DEBUG);
+ $resql = $db->query($sql);
+ if (!$resql) {
+ $error++;
+ } else {
+ $num = $db->affected_rows($resql);
+ }
+
+ if (!$error) {
+ $db->commit();
+ $response = "success";
+ setEventMessages("PropalSigned", null, 'warnings');
+ } else {
+ $db->rollback();
+ $error++;
+ $response = "error sql";
}
}
}
} else {
+ $error++;
$response = 'error signature_not_found';
}
}
+
+if ($error) {
+ http_response_code(501);
+}
+
echo $response;
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 7f9e28f5b4a..3539348e35a 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -761,7 +761,7 @@ class FormFile
$arraykeys = array_keys($modellist);
$modelselected = $arraykeys[0];
}
- $morecss = 'maxwidth200';
+ $morecss = 'minwidth75 maxwidth200';
if ($conf->browser->layout == 'phone') {
$morecss = 'maxwidth100';
}
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index a741af3d867..85b622f62ad 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -108,7 +108,9 @@ class Notify
global $conf, $langs;
$langs->load("mails");
+ // Get full list of all notifications subscribed for $action, $socid and $object
$listofnotiftodo = $this->getNotificationsArray($action, $socid, $object, 0);
+
if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_USER)) {
foreach ($listofnotiftodo as $val) {
if ($val['type'] == 'touser') {
@@ -117,6 +119,14 @@ class Notify
}
}
}
+ if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_CONTACT)) {
+ foreach ($listofnotiftodo as $val) {
+ if ($val['type'] == 'tocontact') {
+ unset($listofnotiftodo[$val['email']]);
+ //$listofnotiftodo = array_merge($listofnotiftodo);
+ }
+ }
+ }
if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE_FIX)) {
foreach ($listofnotiftodo as $val) {
if ($val['type'] == 'tofixedemail') {
diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php
index 6bc4a4668a3..5a2fd9dfd8c 100644
--- a/htdocs/core/lib/signature.lib.php
+++ b/htdocs/core/lib/signature.lib.php
@@ -18,7 +18,7 @@
*/
/**
- * Return string with full Url
+ * Return string with full online Url to accept and sign a quote
*
* @param string $type Type of URL ('proposal', ...)
* @param string $ref Ref of object
@@ -58,13 +58,27 @@ function showOnlineSignatureUrl($type, $ref)
*/
function getOnlineSignatureUrl($mode, $type, $ref = '')
{
- global $conf, $db, $langs;
+ global $conf, $db, $langs, $dolibarr_main_url_root;
$ref = str_replace(' ', '', $ref);
$out = '';
+ // Define $urlwithroot
+ $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
+ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
+ //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
+
+ $localorexternal = 1; // external
+
+ $urltouse = DOL_MAIN_URL_ROOT;
+ if ($localorexternal) {
+ $urltouse = $urlwithroot;
+ }
+
+ $securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
+
if ($type == 'proposal') {
- $out = DOL_MAIN_URL_ROOT.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '' : '');
+ $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '' : '');
if ($mode == 1) {
$out .= 'proposal_ref';
}
@@ -72,6 +86,12 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
$out .= urlencode($ref);
}
$out .= ($mode ? ' ' : '');
+ if ($mode == 1) {
+ $out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
+ } else {
+ $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref, '0');
+ }
+ /*
if ($mode == 1) {
$out .= '&hashp=hash_of_file ';
} else {
@@ -94,13 +114,15 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
} else {
$out .= '&hashp='.$hashp;
}
- }
+ }*/
}
// For multicompany
+ /*
if (!empty($out)) {
$out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
}
+ */
return $out;
}
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index b032ba5beb4..3b173cecb26 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -283,6 +283,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__);
+-- Export accounting documents
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Journals
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '', 'Journalization', 1, 'main', '$user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3', 'BankJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
@@ -295,8 +297,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2432__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 12, __ENTITY__);
-- Journals
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2434__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Journals', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
--- Export accounting documents
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Closure
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2437__+MAX_llx_menu__, 'accountancy', 'accountancy_closure', 2400__+MAX_llx_menu__, '/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure', 'MenuAccountancyClosure', 1, 'accountancy', '$user->rights->accounting->fiscalyear->write', '', 0, 17, __ENTITY__);
-- Reports
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index ebeb4ab40f7..dcdbca568c5 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1348,6 +1348,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$db->free($resql);
}
+ // Files
+ if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
+ $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
+ }
+
+
// Accounting
$newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire || $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
@@ -1360,11 +1366,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Account Balance
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
- // Files
- if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
- $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
- }
-
// Closure
$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure');
diff --git a/htdocs/install/default.css b/htdocs/install/default.css
index da5a19a63dc..6a0e84ce20a 100644
--- a/htdocs/install/default.css
+++ b/htdocs/install/default.css
@@ -40,6 +40,10 @@
display: inline-block;
}
+.no-bottom {
+ padding-bottom: 0;
+}
+
.small {
font-size: 0.9em;
}
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 7999d46363e..8bc4b54a090 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -48,7 +48,7 @@ CountriesNotInEEC=Countries not in EEC
CountriesInEECExceptMe=Countries in EEC except %s
CountriesExceptMe=All countries except %s
AccountantFiles=Export source documents
-ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that were used to generate your accountancy.
+ExportAccountingSourceDocHelp=With this tool, you can export the source events (list in CSV and PDFs) that are used to generate your accountancy.
ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s.
VueByAccountAccounting=View by accounting account
VueBySubAccountAccounting=View by accounting subaccount
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index b4ce76ad884..23cb14faae1 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1712,8 +1712,9 @@ MailingDelay=Seconds to wait after sending next message
NotificationSetup=Email Notification module setup
NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module
FixedEmailTarget=Recipient
-NotificationDisableConfirmMessageFix=Disable the information about targets into the confirmation message before sending the notifications to the global emails
-NotificationDisableConfirmMessageUser=Disable the information about targets into the confirmation message before sending the notifications to the user emails
+NotificationDisableConfirmMessageContact=Hide the list of recipients (subscribed as contact) of notifications into the confirmation message
+NotificationDisableConfirmMessageUser=Hide the list of recipients (subscribed as user) of notifications into the confirmation message
+NotificationDisableConfirmMessageFix=Hide the list of recipients (subscribed as global email) of notifications into the confirmation message
##### Sendings #####
SendingsSetup=Shipping module setup
SendingsReceiptModel=Sending receipt model
@@ -1905,6 +1906,7 @@ ExpenseReportsRulesSetup=Setup of module Expense Reports - Rules
ExpenseReportNumberingModules=Expense reports numbering module
NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only.
YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for email notifications by enabling and configuring the module "Notification".
+TemplatesForNotifications=Templates for notifications
ListOfNotificationsPerUser=List of automatic notifications per user*
ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact**
ListOfFixedNotifications=List of automatic fixed notifications
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 06acd399d25..c59da9aabec 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -88,7 +88,7 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C
NbOfEntries=No. of entries
GoToWikiHelpPage=Read online help (Internet access needed)
GoToHelpPage=Read help
-DedicatedPageAvailable=There is a dedicated help page related to your current screen
+DedicatedPageAvailable=Dedicated help page related to your current screen
HomePage=Home Page
RecordSaved=Record saved
RecordDeleted=Record deleted
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index dec6e389156..acd2239e07f 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1932,9 +1932,9 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
// Link to help pages
if ($helpbaseurl && $helppage) {
$text = '';
- $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').'...';
+ $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').', ';
if ($mode == 'wiki') {
- $title .= ' '.$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"');
+ $title .= ' '.img_picto('', 'globe', 'class="pictofixedwidth"').$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"');
if ($helppresent) {
$title .= ' ('.$langs->trans("DedicatedPageAvailable").') ';
} else {
@@ -1949,7 +1949,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
}
$text .= '">';
$text .= ' ';
- $text .= ' ';
+ $text .= ' ';
$text .= '';
$toprightmenu .= $form->textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
}
diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index 14a08c675ce..caec61f4a2a 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -122,6 +122,17 @@ $creditor = $mysoc->name;
$object = new Propal($db);
$object->fetch(0, $ref);
+// Check securitykey
+$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
+$type = $source;
+$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
+
+if ($calculatedsecuritykey != $SECUREKEY) {
+ http_response_code(403);
+ print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
+ exit(-1);
+}
+
/*
* Actions
@@ -144,7 +155,7 @@ if ($action == 'confirm_refusepropal') {
$db->commit();
$message = 'refused';
- setEventMessages("PropalRefused", null, 'warning');
+ setEventMessages("PropalRefused", null, 'warnings');
} else {
$db->rollback();
}
@@ -170,7 +181,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '' : '').'
';
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
if ($action == 'refusepropal') {
- print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.$ref, $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
}
// Check link validity for param 'source'
@@ -195,7 +206,7 @@ print '
';
print "\n";
print ''."\n";
-print '
'."\n";
+print ''."\n";
// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
// Define logo and logosmall
@@ -295,6 +306,13 @@ if ($source == 'proposal') {
print ''.$proposal->thirdparty->name.' ';
print ''."\n";
+ // Amount
+
+ print ''.$langs->trans("Amount");
+ print ' ';
+ print ''.price($proposal->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).' ';
+ print ' '."\n";
+
// Object
$text = ''.$langs->trans("SignatureProposalRef", $proposal->ref).' ';
@@ -308,7 +326,7 @@ if ($source == 'proposal') {
print $langs->trans("DownloadDocument").'';
}
} else {
- /* TODO If proposal signed newer than proposal ref, get link of proposal signed
+ /* TODO If the file of proposal signed is newer than the default proposal file, get link of proposal signed
*/
}
@@ -358,7 +376,7 @@ if ($action == "dosign" && empty($cancel)) {
print '
+
+
+