New: Add param to show title
This commit is contained in:
parent
49f40ee429
commit
d2275a0bbd
@ -135,9 +135,10 @@ class FormActions
|
|||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
|
* @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
|
||||||
* @param int $socid socid of user
|
* @param int $socid socid of user
|
||||||
|
* @param int $forceshowtitle Show title even if there is no actions to show
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function showactions($object,$typeelement,$socid=0)
|
function showactions($object,$typeelement,$socid=0,$forceshowtitle=0)
|
||||||
{
|
{
|
||||||
global $langs,$conf,$user;
|
global $langs,$conf,$user;
|
||||||
global $bc;
|
global $bc;
|
||||||
@ -148,7 +149,7 @@ class FormActions
|
|||||||
if (! is_array($listofactions)) dol_print_error($this->db,'FailedToGetActions');
|
if (! is_array($listofactions)) dol_print_error($this->db,'FailedToGetActions');
|
||||||
|
|
||||||
$num = count($listofactions);
|
$num = count($listofactions);
|
||||||
if ($num)
|
if ($num || $forceshowtitle)
|
||||||
{
|
{
|
||||||
if ($typeelement == 'invoice') $title=$langs->trans('ActionsOnBill');
|
if ($typeelement == 'invoice') $title=$langs->trans('ActionsOnBill');
|
||||||
elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title=$langs->trans('ActionsOnBill');
|
elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title=$langs->trans('ActionsOnBill');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user