Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2023-09-03 17:14:37 +02:00
commit d0ef625ba0
7 changed files with 79 additions and 22 deletions

View File

@ -3,7 +3,15 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 1.0.0 compared to 18.0.0 *****
***** ChangeLog for 19.0.0 compared to 18.0.0 *****
For users:
----------
...
For developers or integrators:
------------------------------
...
WARNING:
@ -14,10 +22,44 @@ Following changes may create regressions for some external modules, but were nec
***** ChangeLog for 18.0.1 compared to 18.0.0 *****
FIX: Adding a product in recurring invoice does not use the correct VAT
FIX: API /product/getAttributes
FIX: avoid php8 warnings
FIX: bad balance of TR tag in multicurrency price view
FIX: Bad calculation of localtax when price_base_type not defined.
FIX: Bad link into message
FIX: Bad message on menu to go to setup of accounting custom groups
FIX: Bank receipt was empty
FIX: Billing massaction should be possible on Processed Reception.
FIX: clone when cloning object with ->lines containing not object
FIX: Condition to show column POSModule and POSTerminal in invoice list
FIX: CSS
FIX: date survey : button to add dates would not work. Session would store cells numbers which would stay to 10 for next surveys created.
FIX: dir output path for ODT models on reception card
FIX: Duplicate tooltip on ref of an agenda event
FIX: encrypt sensitive data must not be done for const MAIN_AGENDA_ACTIONAUTO
FIX: Export when old file export_csv.modules.php is still present
FIX: fatal error with bad definition of dictionaries
FIX: fatal error with some parameters
FIX: hook formBuilddocOptions was broken when used by 2 modules
FIX: Line for revenuestamp in accountancy transfer must appear only if it exists
FIX: Navigation between bank receipts
FIX: payment card: misleading message when delete button disabled
FIX: reception odt dir output path
FIX: SQL request parenthesis
FIX: Suppliers addlines never have VAT if buyprice for this supplier not set
FIX: TakePOS receipt preview in admin #25648
FIX: technical error on conciliation of lines
FIX: the account in chart of account to use for revenue stamp is on dict
FIX: url to check keyword not saved on partnership from public form
FIX: when adding new times on a survey, all hours would be erased.
***** ChangeLog for 18.0.0 compared to 17.0.0 *****
For uses:
---------
For users:
----------
NEW: PHP 8.2 compatibility (test not yet completed)
NEW: Module Workstations Management upgraded to stable status

View File

@ -3133,7 +3133,7 @@ function dol_print_size($size, $shortvalue = 0, $shortunit = 0)
* @param string $morecss More CSS
* @return string HTML Link
*/
function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $morecss = 'float')
function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $morecss = '')
{
global $langs;
@ -3141,26 +3141,29 @@ function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $mor
return '';
}
$link = '<a href="';
$linkstart = '<a href="';
if (!preg_match('/^http/i', $url)) {
$link .= 'http://';
$linkstart .= 'http://';
}
$link .= $url;
$link .= '"';
$linkstart .= $url;
$linkstart .= '"';
if ($target) {
$link .= ' target="'.$target.'"';
$linkstart .= ' target="'.$target.'"';
}
$link .= '>';
$linkstart .= '>';
$link = '';
if (!preg_match('/^http/i', $url)) {
$link .= 'http://';
}
$link .= dol_trunc($url, $max);
$link .= '</a>';
if ($morecss == 'float') {
$linkend = '</a>';
if ($morecss == 'float') { // deprecated
return '<div class="nospan'.($morecss ? ' '.$morecss : '').'" style="margin-right: 10px">'.($withpicto ?img_picto($langs->trans("Url"), 'globe').' ' : '').$link.'</div>';
} else {
return '<span class="nospan'.($morecss ? ' '.$morecss : '').'" style="margin-right: 10px">'.($withpicto ?img_picto($langs->trans("Url"), 'globe').' ' : '').$link.'</span>';
return $linkstart.'<span class="nospan'.($morecss ? ' '.$morecss : '').'" style="margin-right: 10px">'.($withpicto ?img_picto($langs->trans("Url"), 'globe').' ' : '').$link.'</span>'.$linkend;
}
}
@ -3706,7 +3709,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
*/
function dol_print_ip($ip, $mode = 0)
{
global $conf, $langs;
global $langs;
$ret = '';

View File

@ -60,6 +60,17 @@ ALTER TABLE llx_c_action_trigger ADD COLUMN contexts varchar(255) NULL;
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_CLOSE','Project closed','Executed when a project is closed','project',145);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_CREATE','Template invoices created','Executed when a Template invoices is created','facturerec',900);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_MODIFY','Template invoices update','Executed when a Template invoices is updated','facturerec',901);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_DELETE','Template invoices deleted','Executed when a Template invoices is deleted','facturerec',902);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILLREC_AUTOCREATEBILL','Template invoices use to create invoices with auto batch','Executed when a Template invoices is use to create invoice with auto batch','facturerec',903);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PARTNERSHIP_CREATE','Partnership created','Executed when a partnership is created','partnership',58000);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PARTNERSHIP_MODIFY','Partnership modified','Executed when a partnership is modified','partnership',58002);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PARTNERSHIP_SENTBYMAIL','Mails sent from partnership file','Executed when you send email from partnership file','partnership',58004);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PARTNERSHIP_DELETE','Partnership deleted','Executed when a partnership is deleted','partnership',58006);
-- amount was removed in v12
ALTER TABLE llx_facture DROP COLUMN amount;

View File

@ -241,7 +241,7 @@ if ($ok && GETPOST('standard', 'alpha')) {
'fichinter'=>'fichinter', 'fichinterdet'=>'fichinterdet',
'inventory'=>'inventory',
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task', 'ticket'=>'ticket');
'adherent_type'=>'adherent_type', 'user'=>'user', 'partnershiap'=>'partnershiap', 'projet'=>'projet', 'projet_task'=>'projet_task', 'ticket'=>'ticket');
//$listofmodulesextra = array('fichinter'=>'fichinter');
print '<tr><td colspan="2"><br>*** Check fields into extra table structure match table of definition. If not add column into table</td></tr>';

View File

@ -82,10 +82,10 @@ YourPartnershipRefusedTopic=Partnership refused
YourPartnershipAcceptedTopic=Partnership accepted
YourPartnershipCanceledTopic=Partnership canceled
YourPartnershipWillSoonBeCanceledContent=We inform you that your partnership will soon be canceled (Backlink not found)
YourPartnershipRefusedContent=We inform you that your partnership request has been refused.
YourPartnershipWillSoonBeCanceledContent=We would like to inform you that your partnership will soon be canceled (we did not get renewal or a prerequisite for our partnership is missing). Contact us by email if this is an error.
YourPartnershipRefusedContent=We inform you that your partnership request has been refused. May be a prerequisite is missing. Contact us if you need more information.
YourPartnershipAcceptedContent=We inform you that your partnership request has been accepted.
YourPartnershipCanceledContent=We inform you that your partnership has been canceled.
YourPartnershipCanceledContent=We inform you that your partnership has been canceled. May be a prerequisite is missing. Contact us if you need more information.
CountLastUrlCheckError=Number of errors for last URL check
LastCheckBacklink=Date of last URL check

View File

@ -120,7 +120,7 @@ class Partnership extends CommonObject
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
'date_partnership_start' => array('type'=>'date', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,),
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1,),
'url_to_check' => array('type'=>'url', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax100'),
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',),
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>-2,),
'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>73, 'notnull'=>0, 'visible'=>-2,),

View File

@ -229,6 +229,7 @@ if (empty($reshook) && $action == 'add') {
$partnership->date_partnership_start = dol_now();
$partnership->fk_user_creat = 0;
$partnership->fk_type = GETPOST('partnershiptype', 'int');
$partnership->url = GETPOST('url');
//$partnership->typeid = $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE ? $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE : GETPOST('typeid', 'int');
$partnership->ip = getUserRemoteIP();
@ -253,16 +254,16 @@ if (empty($reshook) && $action == 'add') {
}
}
}
// test if societe already exist
// test if thirdparty already exists
$company = new Societe($db);
$result = $company->fetch(0, GETPOST('societe'));
if ($result == 0) { // si il ya pas d'entree sur le nom on teste l'email
if ($result == 0) { // if entry with name not found, we search using the email
$result1 = $company->fetch(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, GETPOST('email'));
if ($result1 > 0) {
$error++;
$errmsg = $langs->trans("EmailAlreadyExistsPleaseRewriteYourCompanyName");
} else {
//create thirdparty
// create thirdparty
$company = new Societe($db);
$company->name = GETPOST('societe');