Merge branch 'develop' of https://github.com/dolibarr/dolibarr into develop

This commit is contained in:
Laurent Destailleur 2019-11-30 10:55:46 +01:00
commit f98f50e410
9 changed files with 28 additions and 21 deletions

View File

@ -79,7 +79,7 @@ class AgendaEvents extends DolibarrApi
throw new RestException(404, 'Agenda Events not found');
}
if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->ownerid != DolibarrApiAccess::$user->id) {
if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->userownerid != DolibarrApiAccess::$user->id) {
throw new RestException(401, "Insufficient rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id);
}

View File

@ -374,14 +374,14 @@ if ($resql)
{
// Payment term
print '<td class="liste_titre right">';
print $form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
$form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
print "</td>";
}
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
// Payment mode
print '<td class="liste_titre right">';
print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
$form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
print '</td>';
}
if (! empty($arrayfields['recurring']['checked']))
@ -487,7 +487,7 @@ if ($resql)
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
if (! empty($arrayfields['status']['checked'])) print_liste_field_titre($arrayfields['status']['label'], $_SERVER['PHP_SELF'], "f.suspended,f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'nomaxwidthsearch ')."\n";
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'nomaxwidthsearch ');
print "</tr>\n";
if ($num > 0)
@ -550,7 +550,7 @@ if ($resql)
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
{
print '<td class="right">';
print $form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
$form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
print '</td>'."\n";
if (! $i) $totalarray['nbfield']++;
}
@ -558,7 +558,7 @@ if ($resql)
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
print '<td class="right">';
print $form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
$form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
print '</td>'."\n";
if (! $i) $totalarray['nbfield']++;
}

View File

@ -1803,8 +1803,8 @@ class BonPrelevement extends CommonObject
* Write sender of request (me).
* Note: The tag PmtInf is opened here but closed into caller
*
* @param string $configuration conf
* @param int $ladate Date
* @param Conf $configuration conf
* @param int $ladate Date
* @param int $nombre 0 or 1
* @param float $total Total
* @param string $CrLf End of line character
@ -1827,15 +1827,15 @@ class BonPrelevement extends CommonObject
if ($account->fetch($id) > 0)
{
$this->emetteur_code_banque = $account->code_banque;
$this->emetteur_code_guichet = $account->code_guichet;
$this->emetteur_numero_compte = $account->number;
$this->emetteur_code_guichet = $account->code_guichet;
$this->emetteur_numero_compte = $account->number;
$this->emetteur_number_key = $account->cle_rib;
$this->emetteur_iban = $account->iban;
$this->emetteur_bic = $account->bic;
$this->emetteur_iban = $account->iban;
$this->emetteur_bic = $account->bic;
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
$this->raison_sociale = $account->proprio;
}
// Récupération info demandeur

View File

@ -1054,7 +1054,7 @@ class Contrat extends CommonObject
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
$exp = new Expedition($db);
$exp = new Expedition($this->db);
$exp->fetch($this->origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)

View File

@ -255,6 +255,7 @@ function user_admin_prepare_head()
$langs->load("users");
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT.'/admin/user.php';
$head[$h][1] = $langs->trans("Parameters");

View File

@ -1614,7 +1614,7 @@ class Expedition extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
{
global $langs;
global $langs, $conf;
$result = '';
$label = '<u>'.$langs->trans("ShowSending").'</u>';

View File

@ -360,12 +360,13 @@ class Livraison extends CommonObject
}
/**
* Validate object and update stock if option enabled
* Validate object and update stock if option enabled
*
* @param User $user Object user that validate
* @return int
* @param User $user Object user that validate
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int
*/
public function valid($user)
public function valid($user, $notrigger = 0)
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';

View File

@ -49,6 +49,11 @@ class Project extends CommonObject
*/
public $table_element_line = 'projet_task';
/**
* @var int Name of field date
*/
public $table_element_date;
/**
* @var int Field with ID of parent key if this field has a parent
*/

View File

@ -226,7 +226,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
if ($action == 'history')
{
$placeid = GETPOST('placeid', 'int');
$placeid = (int) GETPOST('placeid', 'int');
$invoice = new Facture($db);
$invoice->fetch($placeid);
}