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

This commit is contained in:
Laurent Destailleur 2019-03-19 14:23:08 +01:00
commit 161d8aa22f
6 changed files with 47 additions and 25 deletions

View File

@ -21,14 +21,14 @@
<div class="center"> <div class="center">
<div class="login_table" align="center"> <div class="login_table center">
<!-- <tr><td colspan="2" valign="middle"> --> <!-- <tr><td colspan="2" valign="middle"> -->
<div id="login_line1" align="center"> <div id="login_line1" class="center">
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center"> <div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center">
<table class="none" summary="Login pass" cellpadding="2" align="center"> <table class="none center" summary="Login pass" cellpadding="2">
<!-- Login --> <!-- Login -->
<tr> <tr>
@ -50,7 +50,7 @@
</div> <!-- end div left --> </div> <!-- end div left -->
<!-- </td> <!-- </td>
<td align="center" valign="middle">--> <td class="center" valign="middle">-->
<div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;"> <div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;">
<img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" /> <img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" />

View File

@ -523,7 +523,7 @@ if ($id)
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">'; print '<td class="liste_titre center">';
if ($filterfound) if ($filterfound)
{ {
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
@ -590,7 +590,7 @@ if ($id)
// Show fields // Show fields
if (empty($reshook)) fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit'); if (empty($reshook)) fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit');
print '<td align="center" colspan="4">'; print '<td class="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">'; print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
@ -654,19 +654,19 @@ if ($id)
$url.='&'; $url.='&';
// Active // Active
print '<td align="center" class="nowrap">'; print '<td class="nowrap center">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>'; if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else print $langs->trans("AlwaysActive"); else print $langs->trans("AlwaysActive");
print "</td>"; print "</td>";
// Modify link // Modify link
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>'; if ($canbemodified) print '<td class="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
// Delete link // Delete link
if ($iserasable) if ($iserasable)
{ {
print '<td align="center">'; print '<td class="center">';
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>'; if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin //else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>'; print '</td>';

View File

@ -86,7 +86,7 @@ llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES
$donationstatic=new Don($db); $donationstatic=new Don($db);
// Genere requete de liste des dons // Genere requete de liste des dons
$sql = "SELECT d.rowid, d.datedon, d.fk_soc, d.firstname, d.lastname, d.societe,"; $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
$sql.= " d.amount, d.fk_statut as statut, "; $sql.= " d.amount, d.fk_statut as statut, ";
$sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " p.rowid as pid, p.ref, p.title, p.public";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
@ -154,7 +154,7 @@ if ($resql)
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="type" value="'.$type.'">'; print '<input type="hidden" name="type" value="'.$type.'">';
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton); print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton);
@ -172,9 +172,15 @@ if ($resql)
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">'; print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
print '</td>'; print '</td>';
if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) {
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_thirdparty" value="'.$search_thirdparty.'">';
print '</td>';
} else {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">'; print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
print '</td>'; print '</td>';
}
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">'; print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
print '</td>'; print '</td>';
@ -193,11 +199,15 @@ if ($resql)
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) {
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder);
} else {
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
}
print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
@ -219,9 +229,20 @@ if ($resql)
$donationstatic->ref=$objp->rowid; $donationstatic->ref=$objp->rowid;
$donationstatic->lastname=$objp->lastname; $donationstatic->lastname=$objp->lastname;
$donationstatic->firstname=$objp->firstname; $donationstatic->firstname=$objp->firstname;
print "<td>".$donationstatic->getNomUrl(1)."</td>\n"; print "<td>".$donationstatic->getNomUrl(1)."</td>";
print "<td>".$objp->societe."</td>\n"; if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) {
print "<td>".$donationstatic->getFullName($langs)."</td>\n";
$company=new Societe($db);
$result=$company->fetch($objp->socid);
if (!empty($objp->socid) && $company->id > 0) {
print "<td>".$company->getNomUrl(1)."</td>";
} else {
print "<td>".$objp->societe."</td>";
}
} else {
print "<td>".$objp->societe."</td>";
}
print "<td>".$donationstatic->getFullName($langs)."</td>";
print '<td class="center">'.dol_print_date($db->jdate($objp->datedon), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->datedon), 'day').'</td>';
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
{ {

View File

@ -6,6 +6,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -996,9 +997,9 @@ class ProductFournisseur extends Product
//$out .= '<td class="liste_titre right">'.$langs->trans("QtyMin").'</td>'; //$out .= '<td class="liste_titre right">'.$langs->trans("QtyMin").'</td>';
$out .= '<td class="liste_titre">'.$langs->trans("User").'</td></tr>'; $out .= '<td class="liste_titre">'.$langs->trans("User").'</td></tr>';
foreach ($productFournLogList as $productFournLog) { foreach ($productFournLogList as $productFournLog) {
$out.= '<tr><td align="class">'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'</td>'; $out.= '<tr><td class="right">'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'</td>';
$out.= '<td align="class">'.price($productFournLog['price']).'</td>'; $out.= '<td class="right">'.price($productFournLog['price']).'</td>';
//$out.= '<td align="class">'.$productFournLog['quantity'].'</td>'; //$out.= '<td class="right">'.$productFournLog['quantity'].'</td>';
$out.= '<td>'.$productFournLog['lastname'].'</td></tr>'; $out.= '<td>'.$productFournLog['lastname'].'</td></tr>';
} }
$out .= '</table>'; $out .= '</table>';