Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts: htdocs/compta/prelevement/class/bonprelevement.class.php htdocs/compta/stats/byratecountry.php htdocs/core/class/html.form.class.php
This commit is contained in:
commit
e0095871aa
@ -653,7 +653,7 @@ if (empty($reshook))
|
||||
|
||||
if (empty($labeltouse) || (int) $labeltouse === -1) {
|
||||
//fallback on the old configuration.
|
||||
setEventMessages('WarningMandatorySetupNotComplete', [], 'errors');
|
||||
setEventMessages('WarningMandatorySetupNotComplete', null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -1423,8 +1423,8 @@ else
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
||||
$list = array();
|
||||
$models = ModelePDFFactures::liste_modeles($db);
|
||||
foreach ($models as $model) {
|
||||
$list[] = $model . ':' . $model;
|
||||
foreach ($models as $k => $model) {
|
||||
$list[] = str_replace(':', '|', $k) . ':' . $model;
|
||||
}
|
||||
$select = 'select;'.implode(',', $list);
|
||||
print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->modelpdf, $object, $user->rights->facture->creer, $select);
|
||||
|
||||
@ -1393,7 +1393,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " f.ref as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
||||
$sql.= " f.ref as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum";
|
||||
$sql.= " FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
|
||||
@ -1419,7 +1419,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum, $obj->rum);
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@ -1624,15 +1624,16 @@ class BonPrelevement extends CommonObject
|
||||
* @param string $row_cg pl.code_guichet AS cg, Not used for SEPA
|
||||
* @param string $row_cc pl.number AS cc, Not used for SEPA
|
||||
* @param string $row_somme pl.amount AS somme,
|
||||
* @param string $row_ref f.ref
|
||||
* @param string $row_ref f.ref
|
||||
* @param string $row_idfac pf.fk_facture AS idfac,
|
||||
* @param string $row_iban rib.iban_prefix AS iban,
|
||||
* @param string $row_bic rib.bic AS bic,
|
||||
* @param string $row_datec rib.datec,
|
||||
* @param string $row_drum rib.rowid used to generate rum
|
||||
* @param string $row_rum rib.rum Rum defined on company bank account
|
||||
* @return string Return string with SEPA part DrctDbtTxInf
|
||||
*/
|
||||
public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
|
||||
public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@ -1644,7 +1645,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
// Define value for RUM
|
||||
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId)
|
||||
$Rum = $this->buildRumNumber($row_code_client, $row_datec, $row_drum);
|
||||
$Rum = empty($row_rum) ? $this->buildRumNumber($row_code_client, $row_datec, $row_drum) : $row_rum;
|
||||
|
||||
// Define date of RUM signature
|
||||
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');
|
||||
|
||||
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin","accountancy"));
|
||||
|
||||
$modecompta = GETPOST('modecompta', 'alpha');
|
||||
$modecompta = (GETPOST('modecompta', 'alpha') ? GETPOST('modecompta', 'alpha') : $conf->global->ACCOUNTING_MODE);
|
||||
|
||||
// Date range
|
||||
$year=GETPOST("year", 'int');
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016 Bahfir abbes <dolipar@dolipar.org>
|
||||
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
@ -2749,7 +2749,7 @@ abstract class CommonObject
|
||||
$MODULE = "";
|
||||
if ($this->element == 'propal')
|
||||
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_PROPOSAL";
|
||||
elseif ($this->element == 'order')
|
||||
elseif ($this->element == 'commande' || $this->element == 'order')
|
||||
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_ORDER";
|
||||
elseif ($this->element == 'facture')
|
||||
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_INVOICE";
|
||||
|
||||
@ -154,7 +154,7 @@ class Form
|
||||
* @param string $value Value to show/edit
|
||||
* @param object $object Object
|
||||
* @param boolean $perm Permission to allow button to edit parameter
|
||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols%', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datepickerhour', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...)
|
||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols%', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datepickerhour', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select;xkey:xval,ykey:yval,...')
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value
|
||||
* @param object $extObject External object
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
@ -174,7 +174,7 @@ class Form
|
||||
if (empty($typeofdata)) return 'ErrorBadParameter';
|
||||
|
||||
// When option to edit inline is activated
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/', $typeofdata)) // TODO add jquery timepicker
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/', $typeofdata)) // TODO add jquery timepicker and support select
|
||||
{
|
||||
$ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg);
|
||||
}
|
||||
@ -231,7 +231,8 @@ class Form
|
||||
foreach($arraydata as $val)
|
||||
{
|
||||
$tmp=explode(':', $val);
|
||||
$arraylist[$tmp[0]]=$tmp[1];
|
||||
$tmpkey=str_replace('|', ':', $tmp[0]);
|
||||
$arraylist[$tmpkey]=$tmp[1];
|
||||
}
|
||||
$ret.=$this->selectarray($htmlname, $arraylist, $value);
|
||||
}
|
||||
@ -300,7 +301,7 @@ class Form
|
||||
* @param string $value Value to show/edit
|
||||
* @param string $htmlname DIV ID (field name)
|
||||
* @param int $condition Condition to edit
|
||||
* @param string $inputType Type of input ('string', 'numeric', 'datepicker' ('day' do not work, don't know why), 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:xxx')
|
||||
* @param string $inputType Type of input ('string', 'numeric', 'datepicker' ('day' do not work, don't know why), 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:loadmethod:savemethod:buttononly')
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value
|
||||
* @param object $extObject External object
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
|
||||
@ -422,7 +422,7 @@ class FormOther
|
||||
if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
||||
$sql_usr.= " WHERE u.entity IS NOT NULL"; // Show all users
|
||||
} else {
|
||||
$sql_usr.= " WHERE EXISTS (SELECT ug.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug WHERE u.rowid = ug.fk_user AND ug.entity IN (".getEntity('user')."))";
|
||||
$sql_usr.= " WHERE EXISTS (SELECT ug.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug WHERE u.rowid = ug.fk_user AND ug.entity IN (".getEntity('usergroup')."))";
|
||||
$sql_usr.= " OR u.entity = 0"; // Show always superadmin
|
||||
}
|
||||
}
|
||||
@ -445,7 +445,7 @@ class FormOther
|
||||
if (! empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
||||
$sql_usr.= " WHERE u2.entity IS NOT NULL"; // Show all users
|
||||
} else {
|
||||
$sql_usr.= " WHERE EXISTS (SELECT ug2.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug2 WHERE u2.rowid = ug2.fk_user AND ug2.entity IN (".getEntity('user')."))";
|
||||
$sql_usr.= " WHERE EXISTS (SELECT ug2.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug2 WHERE u2.rowid = ug2.fk_user AND ug2.entity IN (".getEntity('usergroup')."))";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -24,7 +24,7 @@ INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_u
|
||||
|
||||
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipWasValidated)__<br>__INFOS__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipWasValidated)__<br>__(FirstName)__ : __MEMBER_FIRSTNAME__<br>__(LastName)__ : __MEMBER_LASTNAME__<br>__(ID)__ : __MEMBER_ID__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1);
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user