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

This commit is contained in:
Laurent Destailleur 2023-01-08 19:57:45 +01:00
commit 561ae3296d
4 changed files with 5 additions and 67 deletions

View File

@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) {
// Define variables to know what current user can do on properties of user linked to edited member
if ($object->user_id) {
// $User is the user who edits, $object->user_id is the id of the related user in the edited member
$caneditfielduser = ((($user->id == $object->user_id) && $$user->hasRight('user', 'self', 'creer'))
$caneditfielduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'creer'))
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'creer')));
$caneditpassworduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'password'))
|| (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'password')));

View File

@ -33,6 +33,7 @@ $sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$optioncss = GETPOST('optioncss', 'alpha');
$massaction = GETPOST('massaction', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
$page = 0;

View File

@ -188,7 +188,7 @@ class mailing_eventorganization extends MailingTargets
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
$formproject = new FormProjets($this->db);
$s .= $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1');
$s = $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1');
return $s;
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
/* Copyright (C) 2018-2023 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -65,8 +65,6 @@ $result = restrictedArea($user, 'banque');
*/
$form = new Form($db);
$societestatic = new Societe($db);
$memberstatic = new Adherent($db);
$acc = new Account($db);
$stripe = new Stripe($db);
@ -129,47 +127,12 @@ if (!$rowid) {
}
foreach ($payout->data as $payout) {
//$charge = $payout;
//var_dump($payout);
// The metadata FULLTAG is defined by the online payment page
/*$FULLTAG=$charge->metadata->FULLTAG;
// Save into $tmparray all metadata
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
// Load origin object according to metadata
if (!empty($tmparray['CUS']))
{
$societestatic->fetch($tmparray['CUS']);
}
else
{
$societestatic->id = 0;
}
if (!empty($tmparray['MEM']))
{
$memberstatic->fetch($tmparray['MEM']);
}
else
{
$memberstatic->id = 0;
}*/
$societestatic->fetch($charge->metadata->idcustomer);
$societestatic->id = $charge->metadata->idcustomer;
$societestatic->lastname = $obj->lastname;
$societestatic->firstname = $obj->firstname;
$societestatic->admin = $obj->admin;
$societestatic->login = $obj->login;
$societestatic->email = $obj->email;
$societestatic->socid = $obj->fk_soc;
print '<tr class="oddeven">';
// Ref
if (!empty($stripeacc)) {
$connect = $stripeacc.'/';
}
} else $connect = null;
$url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id;
if ($servicestatus) {
@ -178,32 +141,6 @@ if (!$rowid) {
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$payout->id."</a></td>\n";
// Stripe customer
//print "<td>".$charge->customer."</td>\n";
// Link
/*print "<td>";
if ($societestatic->id > 0)
{
print $societestatic->getNomUrl(1);
}
if ($memberstatic->id > 0)
{
print $memberstatic->getNomUrl(1);
}
print "</td>\n";*/
// Origine
//print "<td>";
////if ($charge->metadata->dol_type=="order"){
// $object = new Commande($db);
// $object->fetch($charge->metadata->dol_id);
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
//} elseif ($charge->metadata->dol_type=="invoice"){
// $object = new Facture($db);
// $object->fetch($charge->metadata->dol_id);
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
//}
//print "</td>\n";
// Date payment
print '<td class="center">'.dol_print_date($payout->created, 'dayhour')."</td>\n";
// Date payment