diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index eeeb821c223..ab8206c66b8 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -667,7 +667,7 @@ if ($rowid > 0)
*/
if ($action != 'addsubscription' && $action != 'create_thirdparty')
{
- $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
+ $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.fk_adherent_type as type,";
$sql.= " c.rowid as crowid, c.subscription,";
$sql.= " c.datec, c.fk_type as cfk_type,";
$sql.= " c.dateadh as dateh,";
@@ -705,26 +705,30 @@ if ($rowid > 0)
print "\n";
$accountstatic=new Account($db);
+ $adh = new Adherent($db);
$adht = new AdherentType($db);
while ($i < $num)
{
$objp = $db->fetch_object($result);
+ $adh->id = $objp->rowid;
+ $adh->typeid = $objp->type;
+
$subscriptionstatic->ref=$objp->crowid;
$subscriptionstatic->id=$objp->crowid;
- if ($objp->cfk_type > 0)
+ $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid);
+ if ($typeid > 0)
{
- $adht->fetch($objp->cfk_type);
+ $adht->fetch($typeid);
}
print '
';
print '| '.$subscriptionstatic->getNomUrl(1).' | ';
print ''.dol_print_date($db->jdate($objp->datec), 'dayhour')." | \n";
print '';
- if ($objp->cfk_type > 0)
- {
+ if ($typeid > 0) {
print $adht->getNomUrl(1);
}
print ' | ';
diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php
index 31cf3020765..a8478f35e88 100644
--- a/htdocs/adherents/subscription/card.php
+++ b/htdocs/adherents/subscription/card.php
@@ -313,8 +313,9 @@ if ($rowid && $action != 'edit')
print '
';
print '| '.$langs->trans("Type").' | ';
print '';
- if (! empty($object->fk_type) ) {
- $adht->fetch($object->fk_type);
+ if ($object->fk_type > 0 || $adh->typeid > 0) {
+ $typeid = ($object->fk_type > 0 ? $object->fk_type : $adh->typeid);
+ $adht->fetch($typeid);
print $adht->getNomUrl(1);
} else {
print $langs->trans("NoType");
@@ -345,7 +346,7 @@ if ($rowid && $action != 'edit')
// Amount
print ' |
| '.$langs->trans("Amount").' | '.price($object->amount).' |
';
- // Amount
+ // Label
print '| '.$langs->trans("Label").' | '.$object->note.' |
';
// Bank line
diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php
index 5caece3c3ba..16d92b20c5e 100644
--- a/htdocs/adherents/subscription/list.php
+++ b/htdocs/adherents/subscription/list.php
@@ -225,7 +225,7 @@ $param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($statut != '') $param.="&statut=".urlencode($statut);
-if ($search_type) $param.="&search_type=".urlencode($search_type);
+if ($search_type) $param.="&search_type=".urlencode($search_type);
if ($date_select) $param.="&date_select=".urlencode($date_select);
if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname);
if ($search_login) $param.="&search_login=".urlencode($search_login);
@@ -298,33 +298,33 @@ if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
if (! empty($arrayfields['d.ref']['checked']))
{
print '';
- print ' | ';
+ print '';
}
// Type
if (! empty($arrayfields['d.fk_type']['checked']))
{
print '';
- print '';
+ print '';
print' | ';
}
if (! empty($arrayfields['d.lastname']['checked']))
{
print '';
- print ' | ';
+ print '';
}
if (! empty($arrayfields['d.firstname']['checked']))
{
print '';
- print ' | ';
+ print '';
}
if (! empty($arrayfields['d.login']['checked']))
{
print '';
- print ' | ';
+ print '';
}
if (! empty($arrayfields['t.libelle']['checked']))
@@ -409,23 +409,23 @@ if (! empty($arrayfields['d.login']['checked']))
}
if (! empty($arrayfields['t.libelle']['checked']))
{
- print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", 'align="left"', $sortfield, $sortorder);
+ print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", '', $sortfield, $sortorder);
}
if (! empty($arrayfields['d.bank']['checked']))
{
- print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $pram, "", "", $sortfield, $sortorder);
+ print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $param, "", "", $sortfield, $sortorder);
}
if (! empty($arrayfields['c.dateadh']['checked']))
{
- print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", '', $sortfield, $sortorder, 'center nowraponall ');
}
if (! empty($arrayfields['c.datef']['checked']))
{
- print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", '', $sortfield, $sortorder, 'center nowraponall ');
}
if (! empty($arrayfields['d.amount']['checked']))
{
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", '', $sortfield, $sortorder, 'right ');
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@@ -457,9 +457,11 @@ while ($i < min($num, $limit))
$adherent->statut=$obj->statut;
$adherent->login=$obj->login;
$adherent->photo=$obj->photo;
+ $adherent->typeid=$obj->type;
+ $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid);
$adht = new AdherentType($db);
- $adht->fetch($obj->fk_type);
+ $adht->fetch($typeid);
print '';
@@ -473,7 +475,10 @@ while ($i < min($num, $limit))
if (! empty($arrayfields['d.fk_type']['checked']))
{
print '| ';
- if ( ! empty($obj->fk_type) ) print $adht->getNomUrl(1);
+ if ($typeid > 0)
+ {
+ print $adht->getNomUrl(1);
+ }
print ' | ';
if (! $i) $totalarray['nbfield']++;
}
diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
index 03d26b931b6..a72baaeff12 100644
--- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
+++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
@@ -76,17 +76,18 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
// Event/record is qualified
$qualified = 0;
$amounts = 0;
- if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL'
- || $action==='BILL_SUPPLIER_VALIDATE' || $action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL'
+ if ($action==='BILL_VALIDATE' || (($action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL') && $object->statut != 0)
+ || $action==='BILL_SUPPLIER_VALIDATE' || (($action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL') && $object->statut != 0)
|| $action==='MEMBER_SUBSCRIPTION_CREATE' || $action==='MEMBER_SUBSCRIPTION_MODIFY' || $action==='MEMBER_SUBSCRIPTION_DELETE'
- || $action==='DON_VALIDATE' || $action==='DON_MODIFY' || $action==='DON_DELETE'
+ || $action==='DON_VALIDATE' || (($action==='DON_MODIFY' || $action==='DON_DELETE') && $object->statut != 0)
|| $action==='CASHCONTROL_VALIDATE'
- || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW')
+ || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_DOWNLOAD' && $object->statut != 0)
+ || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_PREVIEW' && $object->statut != 0)
)
{
$qualified++;
-if (in_array($action, array(
+ if (in_array($action, array(
'MEMBER_SUBSCRIPTION_CREATE','MEMBER_SUBSCRIPTION_MODIFY','MEMBER_SUBSCRIPTION_DELETE',
'DON_VALIDATE','DON_MODIFY','DON_DELETE'))) $amounts = (double) $object->amount;
elseif ($action == 'CASHCONTROL_VALIDATE')
diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
index 1270b8b279a..bf08e794a65 100644
--- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
+++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
@@ -96,6 +96,8 @@ ALTER TABLE llx_adherent ADD gender VARCHAR(10);
ALTER TABLE llx_adherent_type ADD morphy VARCHAR(3);
ALTER TABLE llx_subscription ADD fk_type integer;
+UPDATE llx_subscription as s SET fk_type = (SELECT fk_adherent_type FROM llx_adherent as a where a.rowid = s.fk_adherent) where fk_type IS NULL;
+
-- Add url_id into unique index of bank_url
ALTER TABLE llx_bank_url DROP INDEX uk_bank_url;
ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type);
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index a2c2ea36f7d..08351fc752f 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -776,7 +776,7 @@ foreach ($listofreferent as $key => $value)
if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew)
{
$addform.='';
- if ($testnew) $addform.='
'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'';
+ if ($testnew) $addform.='
'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'';
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
$addform.='
'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'';
}
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 231e374422f..e66e2e52eec 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -162,6 +162,7 @@ div.buttonpayment input {
border-bottom: unset;
font-weight: bold;
text-transform: uppercase;
+ cursor: pointer;
}
input.buttonpaymentcb {
background-image: url();
@@ -631,20 +632,20 @@ select.flat.selectlimit {
.amountpaymentcomplete {
color: #008800;
font-weight: bold;
- font-size: 1.4em;
+ font-size: 1.2em;
}
.amountremaintopay {
color: #880000;
font-weight: bold;
- font-size: 1.4em;
+ font-size: 1.2em;
}
.amountremaintopayback {
font-weight: bold;
- font-size: 1.4em;
+ font-size: 1.2em;
}
.amountpaymentneutral {
font-weight: bold;
- font-size: 1.4em;
+ font-size: 1.2em;
}
.savingdocmask {
margin-top: 6px;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 8020a490181..6fd50fa42b3 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -374,6 +374,7 @@ div.buttonpayment input {
font-weight: bold;
text-transform: uppercase;
color: #333;
+ cursor: pointer;
}
input.buttonpaymentcb {
background-image: url();