Merge pull request #6665 from defrance/patch-4
Add invoice_rec_prepare_head for reccuring invoice
This commit is contained in:
commit
e08b92d913
@ -38,6 +38,7 @@ if (! empty($conf->projet->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php';
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('compta');
|
||||
@ -1109,11 +1110,7 @@ else
|
||||
$author = new User($db);
|
||||
$author->fetch($object->user_author);
|
||||
|
||||
$head=array();
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CardBill");
|
||||
$head[$h][2] = 'card';
|
||||
$head=invoice_rec_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("RepeatableInvoice"),0,'bill'); // Add a div
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com>
|
||||
*
|
||||
* 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?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CardBill");
|
||||
$head[$h][2] = 'card';
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user