Merge pull request #8887 from atm-florian/6.0

add hook on balence pages
This commit is contained in:
Laurent Destailleur 2018-05-30 10:47:59 +02:00 committed by GitHub
commit 7590df85e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 25 deletions

View File

@ -57,6 +57,9 @@ $arrayfields=array(
//... //...
); );
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('supplierbalencelist','globalcard'));
/* /*
* Actions * Actions
*/ */
@ -93,7 +96,7 @@ if ($id > 0)
// Invoice list // Invoice list
print load_fiche_titre($langs->trans("CustomerPreview")); print load_fiche_titre($langs->trans("CustomerPreview"));
print '<table class="noborder" width="100%">'; print '<table class="noborder tagtable liste" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'],$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'],$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
print '<td>'.$langs->trans("Element").'</td>'; print '<td>'.$langs->trans("Element").'</td>';

View File

@ -38,6 +38,8 @@ if ($user->societe_id > 0)
} }
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('supplierbalencelist','globalcard'));
/* /*
* View * View
@ -67,7 +69,7 @@ if ($socid > 0)
// Invoice list // Invoice list
print load_fiche_titre($langs->trans("SupplierPreview")); print load_fiche_titre($langs->trans("SupplierPreview"));
print '<table class="noborder" width="100%">'; print '<table class="noborder tagtable liste" width="100%">';
$sql = "SELECT s.nom, s.rowid as socid, f.ref_supplier, f.amount, f.datef as df,"; $sql = "SELECT s.nom, s.rowid as socid, f.ref_supplier, f.amount, f.datef as df,";
$sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; $sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,";