178 global $langs,
$conf, $user, $extrafields;
180 $extrafields->fetch_name_optionals_label(
'facture_fourn');
181 $extrafields->fetch_name_optionals_label(
'facture_fourn_det');
182 $extrafields->fetch_name_optionals_label(
'facture_fourn_rec');
183 $extrafields->fetch_name_optionals_label(
'facture_fourn_det_rec');
188 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
"/supplier_invoice/admin/supplier_invoice.php");
189 $head[$h][1] = $langs->trans(
"SuppliersInvoice");
190 $head[$h][2] =
'invoice';
193 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
"/supplier_invoice/admin/supplier_payment.php");
194 $head[$h][1] = $langs->trans(
"SuppliersPayment");
195 $head[$h][2] =
'supplierpayment';
200 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/supplier_invoice/admin/supplierinvoice_extrafields.php');
201 $head[$h][1] = $langs->trans(
"ExtraFieldsSupplierInvoices");
202 $nbExtrafields = $extrafields->attributes[
'facture_fourn'][
'count'];
203 if ($nbExtrafields > 0) {
204 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
206 $head[$h][2] =
'supplierinvoice';
209 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/supplier_invoice/admin/supplierinvoicedet_extrafields.php');
210 $head[$h][1] = $langs->trans(
"ExtraFieldsSupplierInvoicesLines");
211 $nbExtrafields = $extrafields->attributes[
'facture_fourn_det'][
'count'];
212 if ($nbExtrafields > 0) {
213 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
215 $head[$h][2] =
'supplierinvoicedet';
218 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/supplier_invoice/admin/supplierinvoice_rec_extrafields.php');
219 $head[$h][1] = $langs->trans(
"ExtraFieldsSupplierInvoicesRec");
220 $nbExtrafields = $extrafields->attributes[
'facture_fourn_rec'][
'count'];
221 if ($nbExtrafields > 0) {
222 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
224 $head[$h][2] =
'attributesrec';
227 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/supplier_invoice/admin/supplierinvoicedet_rec_extrafields.php');
228 $head[$h][1] = $langs->trans(
"ExtraFieldsSupplierInvoicesLinesRec");
229 $nbExtrafields = $extrafields->attributes[
'facture_fourn_det_rec'][
'count'];
230 if ($nbExtrafields > 0) {
231 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
233 $head[$h][2] =
'attributeslinesrec';
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).