Add hook in list of stripe payment mode list

This commit is contained in:
Laurent Destailleur 2019-01-28 03:00:28 +01:00
parent 31f4513a7e
commit 1ebd7048fb

View File

@ -833,7 +833,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print '<td>'.$langs->trans('Note').'</td>';
print '<td>'.$langs->trans('DateModification').'</td>';
// Hook fields
$parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>'');
$parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>'', 'linetype'=>'stripetitle');
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -851,7 +851,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$companypaymentmodetemp = new CompanyPaymentMode($db);
$sql='SELECT rowid FROM '.MAIN_DB_PREFIX."societe_rib";
$sql.=" WHERE type in ('card', 'paypal')";
$sql.=" WHERE type in ('card')";
$sql.=" AND fk_soc = ".$object->id;
$sql.=" AND status = ".$servicestatus;
@ -923,7 +923,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print dol_print_date($companypaymentmodetemp->tms, 'dayhour');
print '</td>';
// Fields from hook
$parameters=array('arrayfields'=>array(), 'obj'=>$obj);
$parameters=array('arrayfields'=>array(), 'obj'=>$obj, 'linetype'=>'stripecard');
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -1052,6 +1052,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
//var_dump($src);
print '';
print '</td>';
// Fields from hook
$parameters=array('arrayfields'=>array(), 'stripesource'=>$src, 'linetype'=>'stripecardremoteonly');
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print '<td align="right" class="nowraponall">';
if ($user->rights->societe->creer)
{