Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1a2ead7bdf
@ -25,15 +25,11 @@
|
|||||||
* \brief Page module configuration paid holiday.
|
* \brief Page module configuration paid holiday.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$res=0;
|
require '../../main.inc.php';
|
||||||
if (! $res && file_exists("../main.inc.php")) $res=@include("../main.inc.php"); // For root directory
|
require DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php"); // For "custom" directory
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
||||||
if (! $res) die("Include of main fails");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||||
dol_include_once("/holiday/class/holiday.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.form.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/user.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/usergroup.class.php");
|
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|
||||||
|
|||||||
@ -18,12 +18,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/holiday/include.inc.php
|
* \file htdocs/holiday/common.inc.php
|
||||||
* \ingroup holiday
|
* \ingroup holiday
|
||||||
* \brief Common load of data
|
* \brief Common load of data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/class/holiday.class.php");
|
require_once realpath(dirname(__FILE__)) . '/../main.inc.php';
|
||||||
|
if (! class_exists('Holiday')) {
|
||||||
|
require DOL_DOCUMENT_ROOT. '/holiday/class/holiday.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("user");
|
$langs->load("user");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|||||||
@ -22,12 +22,10 @@
|
|||||||
* \file define_holiday.php
|
* \file define_holiday.php
|
||||||
* \ingroup holiday
|
* \ingroup holiday
|
||||||
* \brief File that defines the balance of paid holiday of users.
|
* \brief File that defines the balance of paid holiday of users.
|
||||||
* \author dmouillard@teclib.com <Dimitri Mouillard>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
include 'common.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/user.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/common.inc.php");
|
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -20,18 +20,14 @@
|
|||||||
* \file fiche.php
|
* \file fiche.php
|
||||||
* \ingroup holiday
|
* \ingroup holiday
|
||||||
* \brief Form and file creation of paid holiday.
|
* \brief Form and file creation of paid holiday.
|
||||||
* \version $Id: fiche.php,v 1.16 2011/09/15 11:00:00 dmouillard Exp $
|
|
||||||
* \author dmouillard@teclib.com <Dimitri Mouillard>
|
|
||||||
* \remarks Form and file creation of paid holiday.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
include 'common.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.form.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/usergroup.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.formfile.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formfile.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/CMailFile.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/CMailFile.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.formmail.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formmail.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/common.inc.php");
|
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$myparam = GETPOST("myparam");
|
$myparam = GETPOST("myparam");
|
||||||
|
|||||||
@ -23,12 +23,11 @@
|
|||||||
* \brief List of holiday.
|
* \brief List of holiday.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
include 'common.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.form.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/core/class/html.formother.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formother.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/user.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/usergroup.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/common.inc.php");
|
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -20,15 +20,12 @@
|
|||||||
* \file month_report.php
|
* \file month_report.php
|
||||||
* \ingroup holiday
|
* \ingroup holiday
|
||||||
* \brief Monthly report of paid holiday.
|
* \brief Monthly report of paid holiday.
|
||||||
* \version $Id: month_report.php,v 1.00 2011/09/15 11:00:00 flegastelois Exp $
|
|
||||||
* \author flegastelois@teclib.com <François Legastelois>
|
|
||||||
* \remarks Monthly report of paid holiday.
|
|
||||||
*/
|
*/
|
||||||
require('../main.inc.php');
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/user/class/user.class.php');
|
include 'common.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/common.inc.php");
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -23,9 +23,8 @@
|
|||||||
* \ingroup holiday
|
* \ingroup holiday
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
include 'common.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/user/class/user.class.php");
|
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT. "/holiday/common.inc.php");
|
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -173,16 +173,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
// Crabe
|
// Crabe
|
||||||
$localobject->modelpdf='crabe';
|
$localobject->modelpdf='crabe';
|
||||||
$result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
|
||||||
|
|
||||||
$localobject=new Facture($this->savdb);
|
|
||||||
$localobject->initAsSpecimen();
|
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
|
|
||||||
// Oursin
|
|
||||||
$localobject->modelpdf='oursin';
|
|
||||||
$result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
$result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
@ -192,7 +182,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testFactureBuild
|
* testFactureFournisseurBuild
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -242,13 +232,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
|
|
||||||
// Edison
|
|
||||||
$localobject->modelpdf='edison';
|
|
||||||
$result=commande_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,20 +280,13 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
$localobject=new Propal($this->savdb);
|
$localobject=new Propal($this->savdb);
|
||||||
$localobject->initAsSpecimen();
|
$localobject->initAsSpecimen();
|
||||||
|
|
||||||
// Einstein
|
// Azur
|
||||||
$localobject->modelpdf='azur';
|
$localobject->modelpdf='azur';
|
||||||
$result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
$result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
|
|
||||||
// Edison
|
|
||||||
$localobject->modelpdf='jaune';
|
|
||||||
$result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
|
||||||
print __METHOD__." result=".$result."\n";
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +307,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
$localobject=new Project($this->savdb);
|
$localobject=new Project($this->savdb);
|
||||||
$localobject->initAsSpecimen();
|
$localobject->initAsSpecimen();
|
||||||
|
|
||||||
// Soleil
|
// Baleine
|
||||||
$localobject->modelpdf='baleine';
|
$localobject->modelpdf='baleine';
|
||||||
$result=project_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
$result=project_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
||||||
|
|
||||||
@ -385,14 +361,14 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
$localobject=new Expedition($this->savdb);
|
$localobject=new Expedition($this->savdb);
|
||||||
$localobject->initAsSpecimen();
|
$localobject->initAsSpecimen();
|
||||||
|
|
||||||
// Soleil
|
// Merou
|
||||||
$localobject->modelpdf='merou';
|
$localobject->modelpdf='merou';
|
||||||
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
|
|
||||||
// Soleil
|
// Rouget
|
||||||
$localobject->modelpdf='rouget';
|
$localobject->modelpdf='rouget';
|
||||||
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user