diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 17796b6b35f..5a71d365ed1 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1296,7 +1296,7 @@ class AccountLine extends CommonObject
// No error check. Can fail if category already affected
}
- $bankline->rappro=1;
+ $this->rappro=1;
$this->db->commit();
return 1;
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 26d61d35919..6faeb1fa951 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -57,7 +57,12 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
+// Initialize technical object to manage hooks of paiements. Note that conf->hooks_modules contains array array
+$hookmanager = new HookManager($db);
+$hookmanager->initHooks(array('paiementcard'));
+$parameters=array('socid'=>$socid);
+$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
/*
* Action add_paiement et confirm_paiement
@@ -579,6 +584,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print '';
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$objp,$action); // Note that $action and $object may have been modified by hook
print "\n";
@@ -713,6 +720,10 @@ if (! GETPOST('action'))
print '
'.dol_print_date($db->jdate($objp->dp))." | \n";
print ''.$objp->paiement_type.' '.$objp->num_paiement." | \n";
print ''.price($objp->amount).' | | ';
+
+ $parameters=array();
+ $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$objp,$action); // Note that $action and $object may have been modified by hook
+
print '';
$i++;
}
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 000bd9a5b81..c586329d4c9 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -61,9 +61,6 @@ $socid='';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user, $origin, $origin_id);
-// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
-$hookmanager->initHooks(array('expeditioncard'));
-
$action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');
@@ -73,6 +70,11 @@ $hidedesc = (GETPOST('hidedesc','int') ? GETPOST('hidedesc','int') : (! empty(
$hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
$object = new Expedition($db);
+// Load object
+if ($id > 0 || ! empty($ref))
+{
+ $ret=$object->fetch($id, $ref);
+}
// Load object
if ($id > 0 || ! empty($ref))
@@ -80,9 +82,14 @@ if ($id > 0 || ! empty($ref))
$ret=$object->fetch($id, $ref);
}
+// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array('expeditioncard'));
+
/*
* Actions
*/
+$parameters=array();
+$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($action == 'add')
{