mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX Project was lost when creating invoice from a template
Can set project on invoice during creation of invoice from a template Replace duplicated code to show lines with mutualized code
This commit is contained in:
@@ -3236,7 +3236,7 @@ abstract class CommonObject
|
||||
*/
|
||||
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0)
|
||||
{
|
||||
global $conf, $hookmanager, $inputalsopricewithtax, $usemargins, $langs, $user;
|
||||
global $conf, $hookmanager, $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $langs, $user;
|
||||
|
||||
// Define usemargins
|
||||
$usemargins=0;
|
||||
@@ -3365,7 +3365,8 @@ abstract class CommonObject
|
||||
function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0)
|
||||
{
|
||||
global $conf,$langs,$user,$object,$hookmanager;
|
||||
global $form,$bc,$bcdd, $object_rights;
|
||||
global $form,$bc,$bcdd;
|
||||
global $object_rights, $disableedit, $disablemove; // TODO We should not use global var for this !
|
||||
|
||||
$object_rights = $this->getRights();
|
||||
|
||||
@@ -4458,7 +4459,10 @@ abstract class CommonObject
|
||||
{
|
||||
global $user;
|
||||
|
||||
return $user->rights->{$this->element};
|
||||
$element = $this->element;
|
||||
if ($element == 'facturerec') $element='facture';
|
||||
|
||||
return $user->rights->{$element};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user