Merge pull request #10592 from frederic34/patch-30

Update mod_expensereport_sand.php
This commit is contained in:
Laurent Destailleur 2019-02-14 13:32:00 +01:00 committed by GitHub
commit afc612c2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,11 +61,11 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
*/ */
function info() function info()
{ {
global $conf, $langs; global $db, $conf, $langs;
$langs->load("bills"); $langs->load("bills");
$form = new Form($this->db); $form = new Form($db);
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n"; $texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; $texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -101,9 +101,9 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
*/ */
function getExample() function getExample()
{ {
global $conf,$langs,$user; global $db, $conf,$langs,$user;
$exp=new ExpenseReport($this->db); $exp=new ExpenseReport($db);
$exp->initAsSpecimen(); $exp->initAsSpecimen();
$exp->fk_user_author = $user->id; $exp->fk_user_author = $user->id;