From feebd4252a0d364f18cfcbb520d8e4c3248d74f8 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sun, 9 Apr 2017 11:29:54 +0200 Subject: [PATCH] add invoice_rec_prepare_head for reccuring invoice --- htdocs/core/lib/invoice.lib.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 6e5640d1e0af9..453b27aefee6e 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2017 Charlie Benke * * 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 @@ -157,4 +158,27 @@ function invoice_admin_prepare_head() } +function invoice_rec_prepare_head($object) +{ + global $db, $langs, $conf; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$object->id; + $head[$h][1] = $langs->trans('Card'); + $head[$h][2] = 'compta'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice-rec'); + + complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice-rec','remove'); + + return $head; +} +