Update fourn.lib.php
This commit is contained in:
parent
100c799811
commit
82fc43fa75
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2006 Marc Barilley <marc@ocebo.com>
|
* Copyright (C) 2006 Marc Barilley <marc@ocebo.com>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2022 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
|
||||||
@ -249,7 +250,13 @@ function ordersupplier_prepare_head(CommandeFournisseur $object)
|
|||||||
*/
|
*/
|
||||||
function supplierorder_admin_prepare_head()
|
function supplierorder_admin_prepare_head()
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user, $db;
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$extrafields->fetch_name_optionals_label('commande_fournisseur');
|
||||||
|
$extrafields->fetch_name_optionals_label('commande_fournisseurdet');
|
||||||
|
$extrafields->fetch_name_optionals_label('facture_fourn');
|
||||||
|
$extrafields->fetch_name_optionals_label('facture_fourn_det');
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
@ -273,21 +280,37 @@ function supplierorder_admin_prepare_head()
|
|||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorder_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorder_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrders");
|
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrders");
|
||||||
|
$nbExtrafields = $extrafields->attributes['commande_fournisseur']['count'];
|
||||||
|
if ($nbExtrafields > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||||
|
}
|
||||||
$head[$h][2] = 'supplierorder';
|
$head[$h][2] = 'supplierorder';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorderdet_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorderdet_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrdersLines");
|
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrdersLines");
|
||||||
|
$nbExtrafields = $extrafields->attributes['commande_fournisseurdet']['count'];
|
||||||
|
if ($nbExtrafields > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||||
|
}
|
||||||
$head[$h][2] = 'supplierorderdet';
|
$head[$h][2] = 'supplierorderdet';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoice_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoice_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoices");
|
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoices");
|
||||||
|
$nbExtrafields = $extrafields->attributes['facture_fourn']['count'];
|
||||||
|
if ($nbExtrafields > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||||
|
}
|
||||||
$head[$h][2] = 'supplierinvoice';
|
$head[$h][2] = 'supplierinvoice';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoicedet_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoicedet_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoicesLines");
|
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoicesLines");
|
||||||
|
$nbExtrafields = $extrafields->attributes['facture_fourn_det']['count'];
|
||||||
|
if ($nbExtrafields > 0) {
|
||||||
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||||
|
}
|
||||||
$head[$h][2] = 'supplierinvoicedet';
|
$head[$h][2] = 'supplierinvoicedet';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user