Skip to content

Commit

Permalink
Merge remote-tracking branch 'Dolibarr/19.0' into 19
Browse files Browse the repository at this point in the history
  • Loading branch information
fappels committed Mar 29, 2024
2 parents a4bd2b5 + 5e0eb50 commit d8a39f7
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 28 deletions.
5 changes: 0 additions & 5 deletions htdocs/accountancy/admin/categories_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,6 @@
setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}

if (GETPOST('actioncancel', 'alpha')) {
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}

if ($action == 'confirm_delete' && $confirm == 'yes') { // delete
Expand Down
6 changes: 0 additions & 6 deletions htdocs/accountancy/admin/journals_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,8 @@
setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}

//if (GETPOST('actioncancel', 'alpha'))
//{
// $_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
//}

if ($action == 'confirm_delete' && $confirm == 'yes') { // delete
if ($tabrowid[$id]) {
$rowidcol = $tabrowid[$id];
Expand Down
7 changes: 5 additions & 2 deletions htdocs/accountancy/bookkeeping/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,11 @@
$form_question['separator3'] = array('name'=>'separator3', 'type'=>'separator');
}

// add documents in an archive for accountancy export (Quadratus)
if (getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_QUADRATUS) {
// add documents in an archive for some accountancy export format
if (getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_QUADRATUS
|| getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC
|| getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC2
) {
$form_question['notifiedexportfull'] = array(
'name' => 'notifiedexportfull',
'type' => 'checkbox',
Expand Down
8 changes: 4 additions & 4 deletions htdocs/admin/menus/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ function init_topleft()
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td>';
print '<td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST("titre", 'alphanohtml')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';

// Picto
print '<tr><td class="fieldrequired">'.$langs->trans('Image').'</td>';
print '<td><input type="text" class="minwidth300" name="picto" value="'.dol_escape_htmltag(GETPOST("picto", 'alphanohtmlallowclass')).'"></td><td>'.$langs->trans('Example').': fa-global</td></tr>';

// URL
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td>';
print '<td><input type="text" class="minwidth500" name="url" value="'.dol_escape_htmltag(GETPOST("url", 'alphanohtml')).'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';

// Picto
print '<tr><td class="fieldrequired">'.$langs->trans('Image').'</td>';
print '<td><input type="text" class="minwidth300" name="picto" value="'.dol_escape_htmltag(GETPOST("picto", 'alphanohtml')).'"></td><td>'.$langs->trans('Example').': fa-global</td></tr>';

// Langs
print '<tr><td>'.$langs->trans('LangFile').'</td>';
print '<td><input type="text" class="minwidth300" name="langs" value="'.dol_escape_htmltag($parent_langs).'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/class/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3355,7 +3355,7 @@ public function update(User $user, $notrigger = 0)
$sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
$sql .= " fk_user_modif=".(isset($user->id) ? $user->id : "null").",";
$sql .= " fk_user_valid=".((isset($this->user_validation_id) && $this->user_validation_id > 0) ? $this->user_validation_id : "null").",";
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/paiement/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@

// Confirmation of payment validation
if ($action == 'valide') {
$facid = $_GET['facid'];
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_validate', '', 0, 2);
$facid = GETPOSTINT('facid');
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.((int) $facid), $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_validate', '', 0, 2);
}

$linkback = '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
Expand Down
7 changes: 6 additions & 1 deletion htdocs/core/menus/standard/eldy_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,12 @@ public function showmenu($mode, $moredata = null)
$substitarray['__USERID__'] = $user->id; // For backward compatibility
$val['url'] = make_substitutions($val['url'], $substitarray);

$relurl = dol_buildpath($val['url'], 1);
if (!preg_match('/^http/', $val['url'])) {
$relurl = dol_buildpath($val['url'], 1);
} else {
$relurl = $val['url'];
}

$canonurl = preg_replace('/\?.*$/', '', $val['url']);

print '<a class="alilevel0" href="#">';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Rafael San José <rsanjose@alxarafe.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -115,10 +117,13 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
// Add user into some linked tools (mailman, spip, etc...)
if (($object->oldcopy->email != $object->email) || ($object->oldcopy->typeid != $object->typeid)) {
if (is_object($object->oldcopy) && (($object->oldcopy->email != $object->email) || ($object->oldcopy->typeid != $object->typeid))) { // If email has changed or if list has changed we delete mailman subscription for old email
if ($object->oldcopy->del_to_abo() < 0) {
$this->errors = $object->oldcopy->errors;
if (!empty($object->oldcopy->error)) {
$this->errors[] = $object->oldcopy->error;
// $object->oldcopy may be a stdClass and not original object depending on copy type, so we realod a new object to run the del_to_abo()
$tmpmember = new Adherent($this->db);
$tmpmember->fetch($object->oldcopy->id);
if ($tmpmember->del_to_abo() < 0) {
$this->errors = $tmpmember->errors;
if (!empty($tmpmember->error)) {
$this->errors[] = $tmpmember->error;
}
$return = -1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/mrp/js/lib_dispatch.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function addDispatchTR(qtyOrdered, qtyDispatched, index, nbrTrs, warehouseId, in
$.jnotify(errormsg, 'error', true);
return -1;
} else if (qtyDispatched >= qtyOrdered) {
let errormsg = '<?php echo dol_escape_js($langs->trans('NoRemainQtyToDispatch')); ?>;
let errormsg = '<?php echo dol_escape_js($langs->trans('NoRemainQtyToDispatch')); ?>';
$.jnotify(errormsg, 'error', true);
return -1;
} else if (qtyDispatched < qtyOrdered) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class StockTransfer extends CommonObject
*/
public $table_element = 'stocktransfer_stocktransfer';

/**
* @var string Name of subtable line
*/
public $table_element_line = 'stocktransfer_stocktransferline';

/**
* @var int Does this object support multicompany module ?
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table
Expand Down
4 changes: 2 additions & 2 deletions htdocs/projet/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@
print "</td>\n";

// Ref
print '<td class="left nowraponall">';
print '<td class="left nowraponall tdoverflowmax250">';
if ($tablename == 'expensereport_det') {
print $expensereport->getNomUrl(1);
} else {
Expand Down Expand Up @@ -1371,7 +1371,7 @@
print '</td>';

// Third party or user
print '<td class="left">';
print '<td class="tdoverflowmax150">';
if (is_object($element->thirdparty)) {
print $element->thirdparty->getNomUrl(1, '', 48);
} elseif ($tablename == 'expensereport_det') {
Expand Down

0 comments on commit d8a39f7

Please sign in to comment.