Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
71c1d2275b
@ -218,9 +218,9 @@
|
|||||||
<severity>5</severity>
|
<severity>5</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>-->
|
||||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|||||||
@ -185,6 +185,7 @@ class AccountancyExport
|
|||||||
* Function who chose which export to use with the default config
|
* Function who chose which export to use with the default config
|
||||||
*
|
*
|
||||||
* @param unknown $TData data
|
* @param unknown $TData data
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function export(&$TData) {
|
public function export(&$TData) {
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
@ -602,6 +603,7 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @param unknown $str data
|
* @param unknown $str data
|
||||||
* @param integer $size data
|
* @param integer $size data
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function trunc($str, $size) {
|
public static function trunc($str, $size) {
|
||||||
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
|
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
|
||||||
|
|||||||
@ -2454,6 +2454,7 @@ class Adherent extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories)
|
public function setCategories($categories)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -82,6 +82,7 @@ class PrestaShopWebservice
|
|||||||
* Take the status code and throw an exception if the server didn't return 200 or 201 code
|
* Take the status code and throw an exception if the server didn't return 200 or 201 code
|
||||||
*
|
*
|
||||||
* @param int $status_code Status code of an HTTP return
|
* @param int $status_code Status code of an HTTP return
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function checkStatusCode($status_code)
|
protected function checkStatusCode($status_code)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -217,6 +217,7 @@ class DolibarrApi
|
|||||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
||||||
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
||||||
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
||||||
|
* @return bool
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') {
|
static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') {
|
||||||
|
|||||||
@ -188,6 +188,7 @@ class Setup extends DolibarrApi
|
|||||||
* @param int $id ID of country
|
* @param int $id ID of country
|
||||||
* @param string $lang Code of the language the name of the
|
* @param string $lang Code of the language the name of the
|
||||||
* country must be translated to
|
* country must be translated to
|
||||||
|
* @return array Array of cleaned object properties
|
||||||
*
|
*
|
||||||
* @url GET dictionary/countries/{id}
|
* @url GET dictionary/countries/{id}
|
||||||
*
|
*
|
||||||
@ -293,6 +294,7 @@ class Setup extends DolibarrApi
|
|||||||
* @param Ccountry $country Country
|
* @param Ccountry $country Country
|
||||||
* @param string $lang Code of the language the name of the
|
* @param string $lang Code of the language the name of the
|
||||||
* country must be translated to
|
* country must be translated to
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function translateLabel($country, $lang)
|
private function translateLabel($country, $lang)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,6 +28,7 @@ class Status
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get status (Dolibarr version)
|
* Get status (Dolibarr version)
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
function index() {
|
function index() {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|||||||
@ -105,7 +105,8 @@ class BlockedLogAuthority
|
|||||||
/**
|
/**
|
||||||
* Add a new block to the chain
|
* Add a new block to the chain
|
||||||
*
|
*
|
||||||
* @param string $block new block to chain
|
* @param string $block new block to chain
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function addBlock($block) {
|
public function addBlock($block) {
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,6 @@
|
|||||||
* See https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54
|
* See https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*ini_set('unserialize_callback_func', 'mycallback');
|
/*ini_set('unserialize_callback_func', 'mycallback');
|
||||||
|
|
||||||
function mycallback($classname)
|
function mycallback($classname)
|
||||||
@ -171,6 +168,7 @@ class BlockedLog
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to retrieve source object (it it still exists)
|
* Try to retrieve source object (it it still exists)
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getObjectLink()
|
public function getObjectLink()
|
||||||
{
|
{
|
||||||
@ -286,6 +284,7 @@ class BlockedLog
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* try to retrieve user author
|
* try to retrieve user author
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUser()
|
public function getUser()
|
||||||
{
|
{
|
||||||
@ -1029,6 +1028,7 @@ class BlockedLog
|
|||||||
* Check if module was already used or not for at least one recording.
|
* Check if module was already used or not for at least one recording.
|
||||||
*
|
*
|
||||||
* @param int $ignoresystem Ignore system events for the test
|
* @param int $ignoresystem Ignore system events for the test
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function alreadyUsed($ignoresystem=0)
|
function alreadyUsed($ignoresystem=0)
|
||||||
{
|
{
|
||||||
@ -1055,4 +1055,3 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -943,6 +943,7 @@ class Account extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories) {
|
public function setCategories($categories) {
|
||||||
// Handle single category
|
// Handle single category
|
||||||
@ -2282,4 +2283,3 @@ class AccountLine extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1334,6 +1334,7 @@ class Contact extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories)
|
public function setCategories($categories)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6810,6 +6810,7 @@ abstract class CommonObject
|
|||||||
* Function to load data from a SQL pointer into properties of current object $this
|
* Function to load data from a SQL pointer into properties of current object $this
|
||||||
*
|
*
|
||||||
* @param stdClass $obj Contain data of object from database
|
* @param stdClass $obj Contain data of object from database
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function setVarsFromFetchObj(&$obj)
|
protected function setVarsFromFetchObj(&$obj)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -171,6 +171,8 @@ class CoreObject extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to fetch children objects
|
* Function to fetch children objects
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function fetchChild()
|
public function fetchChild()
|
||||||
{
|
{
|
||||||
@ -207,6 +209,7 @@ class CoreObject extends CommonObject
|
|||||||
* Function to update children data
|
* Function to update children data
|
||||||
*
|
*
|
||||||
* @param User $user user object
|
* @param User $user user object
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function saveChild(User &$user)
|
public function saveChild(User &$user)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1594,6 +1594,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
* @param string $langkey Translation key
|
* @param string $langkey Translation key
|
||||||
* @param string $fieldkey Key of the html select field the text refers to
|
* @param string $fieldkey Key of the html select field the text refers to
|
||||||
* @param int $fieldrequired 1=Field is mandatory
|
* @param int $fieldrequired 1=Field is mandatory
|
||||||
|
* @return string
|
||||||
* @deprecated Form::editfieldkey
|
* @deprecated Form::editfieldkey
|
||||||
*/
|
*/
|
||||||
function fieldLabel($langkey, $fieldkey, $fieldrequired=0)
|
function fieldLabel($langkey, $fieldkey, $fieldrequired=0)
|
||||||
@ -7431,6 +7432,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param=''
|
|||||||
*
|
*
|
||||||
* @param string $htmlname Id of html object
|
* @param string $htmlname Id of html object
|
||||||
* @param string $addlink Add a 'link to' after
|
* @param string $addlink Add a 'link to' after
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function ajax_autoselect($htmlname, $addlink='')
|
function ajax_autoselect($htmlname, $addlink='')
|
||||||
{
|
{
|
||||||
@ -7568,6 +7570,7 @@ function dol_mimetype($file, $default='application/octet-stream', $mode=0)
|
|||||||
* @param int $id id of line
|
* @param int $id id of line
|
||||||
* @param bool $checkentity add filter on entity
|
* @param bool $checkentity add filter on entity
|
||||||
* @param string $rowidfield name of the column rowid
|
* @param string $rowidfield name of the column rowid
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
|
function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -233,6 +233,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
|
|||||||
* @param integer $hundreds Hundreds
|
* @param integer $hundreds Hundreds
|
||||||
* @param integer $tens Tens
|
* @param integer $tens Tens
|
||||||
* @param integer $units Units
|
* @param integer $units Units
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function hundreds2text($hundreds, $tens, $units)
|
function hundreds2text($hundreds, $tens, $units)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -263,6 +263,7 @@ function pdf_getHeightForLogo($logo, $url = false)
|
|||||||
*
|
*
|
||||||
* @param TCPDF $pdf PDF initialized object
|
* @param TCPDF $pdf PDF initialized object
|
||||||
* @param string $htmlcontent HTML Contect
|
* @param string $htmlcontent HTML Contect
|
||||||
|
* @return number
|
||||||
* @see getStringHeight
|
* @see getStringHeight
|
||||||
*/
|
*/
|
||||||
function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
|
function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
|
||||||
@ -2120,4 +2121,3 @@ function pdf_getSizeForImage($realpath)
|
|||||||
}
|
}
|
||||||
return array('width'=>$width,'height'=>$height);
|
return array('width'=>$width,'height'=>$height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||||||
* @param int $y y position in user units
|
* @param int $y y position in user units
|
||||||
* @param int $w width in user units
|
* @param int $w width in user units
|
||||||
* @param int $h height in user units
|
* @param int $h height in user units
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
|
private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1297,6 +1297,7 @@ class ExpenseReport extends CommonObject
|
|||||||
* @param User $fuser User
|
* @param User $fuser User
|
||||||
* @param Details $details Details
|
* @param Details $details Details
|
||||||
* @param int $notrigger Disable triggers
|
* @param int $notrigger Disable triggers
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
function setDeny($fuser,$details,$notrigger=0)
|
function setDeny($fuser,$details,$notrigger=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -155,5 +155,6 @@ if (GETPOST('withtab', 'alpha')) {
|
|||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -2487,8 +2487,6 @@ elseif (! empty($module))
|
|||||||
|
|
||||||
dol_fiche_end(); // End modules
|
dol_fiche_end(); // End modules
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -233,6 +233,6 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -256,7 +256,6 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -467,7 +467,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -161,6 +161,6 @@ else
|
|||||||
accessforbidden('',0,0);
|
accessforbidden('',0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -159,6 +159,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -99,6 +99,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Global test setup
|
* Global test setup
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
@ -106,6 +107,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test setup
|
* Unit test setup
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
@ -115,6 +117,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify pre conditions
|
* Verify pre conditions
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function assertPreConditions()
|
protected function assertPreConditions()
|
||||||
{
|
{
|
||||||
@ -122,6 +125,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle Dolibarr authentication
|
* Handle Dolibarr authentication
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function authenticate()
|
private function authenticate()
|
||||||
{
|
{
|
||||||
@ -142,6 +146,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test enabling developer mode
|
* Test enabling developer mode
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testEnableDeveloperMode()
|
public function testEnableDeveloperMode()
|
||||||
{
|
{
|
||||||
@ -161,6 +166,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test enabling the module
|
* Test enabling the module
|
||||||
*
|
*
|
||||||
* @depends testEnableDeveloperMode
|
* @depends testEnableDeveloperMode
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testModuleEnabled()
|
public function testModuleEnabled()
|
||||||
{
|
{
|
||||||
@ -186,6 +192,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test access to the configuration page
|
* Test access to the configuration page
|
||||||
*
|
*
|
||||||
* @depends testModuleEnabled
|
* @depends testModuleEnabled
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testConfigurationPage()
|
public function testConfigurationPage()
|
||||||
{
|
{
|
||||||
@ -198,6 +205,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test access to the about page
|
* Test access to the about page
|
||||||
*
|
*
|
||||||
* @depends testConfigurationPage
|
* @depends testConfigurationPage
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testAboutPage()
|
public function testAboutPage()
|
||||||
{
|
{
|
||||||
@ -210,6 +218,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test about page is rendering Markdown
|
* Test about page is rendering Markdown
|
||||||
*
|
*
|
||||||
* @depends testAboutPage
|
* @depends testAboutPage
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testAboutPageRendersMarkdownReadme()
|
public function testAboutPageRendersMarkdownReadme()
|
||||||
{
|
{
|
||||||
@ -226,6 +235,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test box is properly declared
|
* Test box is properly declared
|
||||||
*
|
*
|
||||||
* @depends testModuleEnabled
|
* @depends testModuleEnabled
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testBoxDeclared()
|
public function testBoxDeclared()
|
||||||
{
|
{
|
||||||
@ -238,6 +248,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test trigger is properly enabled
|
* Test trigger is properly enabled
|
||||||
*
|
*
|
||||||
* @depends testModuleEnabled
|
* @depends testModuleEnabled
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testTriggerDeclared()
|
public function testTriggerDeclared()
|
||||||
{
|
{
|
||||||
@ -254,6 +265,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
* Test trigger is properly declared
|
* Test trigger is properly declared
|
||||||
*
|
*
|
||||||
* @depends testTriggerDeclared
|
* @depends testTriggerDeclared
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testTriggerEnabled()
|
public function testTriggerEnabled()
|
||||||
{
|
{
|
||||||
@ -268,6 +280,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify post conditions
|
* Verify post conditions
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function assertPostConditions()
|
protected function assertPostConditions()
|
||||||
{
|
{
|
||||||
@ -275,6 +288,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test teardown
|
* Unit test teardown
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown()
|
public function tearDown()
|
||||||
{
|
{
|
||||||
@ -282,6 +296,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Global test teardown
|
* Global test teardown
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,6 +32,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Global test setup
|
* Global test setup
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
@ -40,6 +41,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test setup
|
* Unit test setup
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
@ -48,6 +50,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify pre conditions
|
* Verify pre conditions
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function assertPreConditions()
|
protected function assertPreConditions()
|
||||||
{
|
{
|
||||||
@ -56,6 +59,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A sample test
|
* A sample test
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function testSomething()
|
public function testSomething()
|
||||||
{
|
{
|
||||||
@ -66,6 +70,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify post conditions
|
* Verify post conditions
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function assertPostConditions()
|
protected function assertPostConditions()
|
||||||
{
|
{
|
||||||
@ -74,6 +79,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test teardown
|
* Unit test teardown
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
@ -82,6 +88,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Global test teardown
|
* Global test teardown
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
@ -92,6 +99,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
|
|||||||
* Unsuccessful test
|
* Unsuccessful test
|
||||||
*
|
*
|
||||||
* @param Exception $e Exception
|
* @param Exception $e Exception
|
||||||
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function onNotSuccessfulTest(Exception $e)
|
protected function onNotSuccessfulTest(Exception $e)
|
||||||
|
|||||||
@ -397,8 +397,8 @@ class MultiCurrency extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return int -1 if KO, 1 if OK
|
* @return int -1 if KO, 1 if OK
|
||||||
*/
|
*/
|
||||||
public function addRate($rate)
|
public function addRate($rate)
|
||||||
{
|
{
|
||||||
$currencyRate = new CurrencyRate($this->db);
|
$currencyRate = new CurrencyRate($this->db);
|
||||||
$currencyRate->rate = $rate;
|
$currencyRate->rate = $rate;
|
||||||
|
|
||||||
@ -412,16 +412,16 @@ class MultiCurrency extends CommonObject
|
|||||||
$this->rate = null;
|
$this->rate = null;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try get label of code in llx_currency then add rate
|
* Try get label of code in llx_currency then add rate
|
||||||
*
|
*
|
||||||
* @param string $code currency code
|
* @param string $code currency code
|
||||||
* @param double $rate new rate
|
* @param double $rate new rate
|
||||||
*
|
*
|
||||||
* @return int -1 if KO, 1 if OK, 2 if label found and OK
|
* @return int -1 if KO, 1 if OK, 2 if label found and OK
|
||||||
*/
|
*/
|
||||||
function addRateFromDolibarr($code, $rate)
|
function addRateFromDolibarr($code, $rate)
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
@ -450,25 +450,25 @@ class MultiCurrency extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add new entry into llx_multicurrency_rate to historise
|
* Add new entry into llx_multicurrency_rate to historise
|
||||||
*
|
*
|
||||||
* @param double $rate rate value
|
* @param double $rate rate value
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function updateRate($rate)
|
public function updateRate($rate)
|
||||||
{
|
{
|
||||||
return $this->addRate($rate);
|
return $this->addRate($rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch CurrencyRate object in $this->rate
|
* Fetch CurrencyRate object in $this->rate
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function getRate()
|
public function getRate()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT cr.rowid';
|
$sql = 'SELECT cr.rowid';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as cr';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as cr';
|
||||||
$sql.= ' WHERE cr.fk_multicurrency = '.$this->id;
|
$sql.= ' WHERE cr.fk_multicurrency = '.$this->id;
|
||||||
@ -481,9 +481,9 @@ class MultiCurrency extends CommonObject
|
|||||||
return $this->rate->fetch($obj->rowid);
|
return $this->rate->fetch($obj->rowid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id of currency from code
|
* Get id of currency from code
|
||||||
*
|
*
|
||||||
* @param DoliDB $db object db
|
* @param DoliDB $db object db
|
||||||
@ -491,8 +491,8 @@ class MultiCurrency extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return 0 if not found, >0 if OK
|
* @return 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public static function getIdFromCode(&$db, $code)
|
public static function getIdFromCode(&$db, $code)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE code = \''.$db->escape($code).'\' AND entity = '.$conf->entity;
|
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE code = \''.$db->escape($code).'\' AND entity = '.$conf->entity;
|
||||||
@ -501,9 +501,9 @@ class MultiCurrency extends CommonObject
|
|||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid;
|
if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid;
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id and rate of currency from code
|
* Get id and rate of currency from code
|
||||||
*
|
*
|
||||||
* @param DoliDB $db object db
|
* @param DoliDB $db object db
|
||||||
@ -513,8 +513,8 @@ class MultiCurrency extends CommonObject
|
|||||||
* @return array [0] => id currency
|
* @return array [0] => id currency
|
||||||
* [1] => rate
|
* [1] => rate
|
||||||
*/
|
*/
|
||||||
public static function getIdAndTxFromCode(&$db, $code, $date_document='')
|
public static function getIdAndTxFromCode(&$db, $code, $date_document='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m';
|
$sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m';
|
||||||
@ -539,53 +539,54 @@ class MultiCurrency extends CommonObject
|
|||||||
|
|
||||||
return array(0, 1);
|
return array(0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the conversion of amount with invoice rate
|
* Get the conversion of amount with invoice rate
|
||||||
*
|
*
|
||||||
* @param int $fk_facture id of facture
|
* @param int $fk_facture id of facture
|
||||||
* @param double $amount amount to convert
|
* @param double $amount amount to convert
|
||||||
* @param string $way dolibarr mean the amount is in dolibarr currency
|
* @param string $way dolibarr mean the amount is in dolibarr currency
|
||||||
* @param string $table facture or facture_fourn
|
* @param string $table facture or facture_fourn
|
||||||
*
|
*
|
||||||
* @return double amount converted
|
* @return double amount converted
|
||||||
*/
|
*/
|
||||||
public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture')
|
public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture')
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
|
$multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
|
||||||
|
|
||||||
if ($multicurrency_tx)
|
if ($multicurrency_tx)
|
||||||
{
|
{
|
||||||
if ($way == 'dolibarr') return $amount * $multicurrency_tx;
|
if ($way == 'dolibarr') return $amount * $multicurrency_tx;
|
||||||
else return $amount / $multicurrency_tx;
|
else return $amount / $multicurrency_tx;
|
||||||
}
|
}
|
||||||
else return $amount;
|
else return $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current invoite rate
|
* Get current invoite rate
|
||||||
*
|
*
|
||||||
* @param int $fk_facture id of facture
|
* @param int $fk_facture id of facture
|
||||||
* @param string $table facture or facture_fourn
|
* @param string $table facture or facture_fourn
|
||||||
*/
|
* @return bool
|
||||||
public static function getInvoiceRate($fk_facture, $table='facture')
|
*/
|
||||||
{
|
public static function getInvoiceRate($fk_facture, $table='facture')
|
||||||
global $db;
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
$sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture;
|
$sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture;
|
||||||
|
|
||||||
dol_syslog(__METHOD__,LOG_DEBUG);
|
dol_syslog(__METHOD__,LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql && ($line = $db->fetch_object($resql)))
|
if ($resql && ($line = $db->fetch_object($resql)))
|
||||||
{
|
{
|
||||||
return $line->multicurrency_tx;
|
return $line->multicurrency_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* With free account we can't set source then recalcul all rates to force another source
|
* With free account we can't set source then recalcul all rates to force another source
|
||||||
@ -621,19 +622,20 @@ class MultiCurrency extends CommonObject
|
|||||||
* Sync rates from api
|
* Sync rates from api
|
||||||
*
|
*
|
||||||
* @param array $response array of reponse from api to sync dolibarr rates
|
* @param array $response array of reponse from api to sync dolibarr rates
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function syncRates($response)
|
public static function syncRates($response)
|
||||||
{
|
{
|
||||||
global $db,$conf;
|
global $db,$conf;
|
||||||
|
|
||||||
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
|
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
|
|
||||||
if ($response->success)
|
if ($response->success)
|
||||||
{
|
{
|
||||||
|
|
||||||
$TRate = $response->quotes;
|
$TRate = $response->quotes;
|
||||||
$timestamp = $response->timestamp;
|
$timestamp = $response->timestamp;
|
||||||
@ -667,14 +669,14 @@ class MultiCurrency extends CommonObject
|
|||||||
* @param string $code current code to search
|
* @param string $code current code to search
|
||||||
* @return boolean True if exists, false if not exists
|
* @return boolean True if exists, false if not exists
|
||||||
*/
|
*/
|
||||||
public static function checkCodeAlreadyExists($code)
|
public static function checkCodeAlreadyExists($code)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$currency = new MultiCurrency($db);
|
$currency = new MultiCurrency($db);
|
||||||
if ($currency->fetch('', $code) > 0) return true;
|
if ($currency->fetch('', $code) > 0) return true;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -430,6 +430,6 @@ if ($object->allow_comments) {
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -78,8 +78,6 @@ print '</table>';
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -296,6 +296,6 @@ print '</table>'."\n";
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -161,6 +161,6 @@ print '<a name=bas></a>'."\n";
|
|||||||
print '<br><br><br>'."\n";
|
print '<br><br><br>'."\n";
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -564,6 +564,6 @@ print '</form>'."\n";
|
|||||||
print '<br><br><br><br>'."\n";
|
print '<br><br><br><br>'."\n";
|
||||||
print '</div></div>'."\n";
|
print '</div></div>'."\n";
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -204,6 +204,6 @@ else
|
|||||||
print '<br><br><br>'."\n";
|
print '<br><br><br>'."\n";
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -57,6 +57,6 @@ print '<div style="clear:both;"></div>';
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div></form>';
|
print '</div></form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -250,5 +250,6 @@ print '<br><br>';
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -326,5 +326,6 @@ $token='';
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -361,6 +361,6 @@ if ($mode == 'userconf' && $user->admin)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -68,6 +68,6 @@ foreach ($result as $driver)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -357,5 +357,6 @@ if ($action == 'create_updater' || $action == 'edit_updater') {
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -200,6 +200,6 @@ print '<div style="text-align: center">
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -744,7 +744,7 @@ print '</table>';
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -126,6 +126,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -116,6 +116,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -342,6 +342,6 @@ else
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -203,7 +203,6 @@ if ($id > 0 || $ref)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -2187,6 +2187,6 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
|
|||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -4504,6 +4504,7 @@ class Product extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories) {
|
public function setCategories($categories) {
|
||||||
// Handle single category
|
// Handle single category
|
||||||
|
|||||||
@ -657,7 +657,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -345,6 +345,6 @@ else
|
|||||||
print $langs->trans("ErrorUnknown");
|
print $langs->trans("ErrorUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -244,5 +244,6 @@ print '<script type="text/javascript">
|
|||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -889,7 +889,6 @@ else
|
|||||||
print $langs->trans("ErrorUnknown");
|
print $langs->trans("ErrorUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -397,8 +397,8 @@ if (! empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM))
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -409,7 +409,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -960,6 +960,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -115,6 +115,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -207,6 +207,6 @@ print "</table>";
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -2197,6 +2197,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -391,6 +391,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -421,6 +421,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -433,6 +433,6 @@ if (! $id)
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -257,5 +257,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -265,5 +265,6 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -236,6 +236,6 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -278,5 +278,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -263,5 +263,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -261,5 +261,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -260,5 +260,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -707,7 +707,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -140,5 +140,6 @@ if ($_GET["id"])
|
|||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -185,6 +185,6 @@ if ($resql)
|
|||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -73,6 +73,6 @@ dol_print_object_info($object);
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -271,7 +271,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -462,7 +462,6 @@ print '<div class="center"><input class="button" type="submit" name="valid" valu
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1173,7 +1173,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -994,6 +994,6 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -416,7 +416,6 @@ if (empty($action))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -551,7 +551,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -336,5 +336,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -157,7 +157,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -354,5 +354,6 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -576,7 +576,6 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -710,6 +710,6 @@ if ($conf->use_javascript_ajax)
|
|||||||
print '</script>';
|
print '</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -749,7 +749,6 @@ if ($conf->use_javascript_ajax)
|
|||||||
print '</script>';
|
print '</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -910,5 +910,6 @@ print '</table>';
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -113,6 +113,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -112,6 +112,6 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1288,6 +1288,6 @@ else
|
|||||||
print $langs->trans("RecordNotFound");
|
print $langs->trans("RecordNotFound");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1904,6 +1904,7 @@ class Project extends CommonObject
|
|||||||
* Existing categories are left untouch.
|
* Existing categories are left untouch.
|
||||||
*
|
*
|
||||||
* @param int[]|int $categories Category or categories IDs
|
* @param int[]|int $categories Category or categories IDs
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCategories($categories)
|
public function setCategories($categories)
|
||||||
{
|
{
|
||||||
@ -1972,4 +1973,3 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -183,6 +183,6 @@ print '<br>';
|
|||||||
// Include comment tpl view
|
// Include comment tpl view
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -266,6 +266,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -158,6 +158,6 @@ else
|
|||||||
dol_print_error('','NoRecordFound');
|
dol_print_error('','NoRecordFound');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1181,10 +1181,8 @@ if ($conf->use_javascript_ajax)
|
|||||||
print $comboenhancement;
|
print $comboenhancement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -364,7 +364,6 @@ else
|
|||||||
print '<div class="opacitymedium">'.$langs->trans("NoTasks").'</div>';
|
print '<div class="opacitymedium">'.$langs->trans("NoTasks").'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -318,7 +318,6 @@ if (! empty($conf->global->PROJECT_SHOW_PROJECT_LIST_ON_PROJECT_AREA))
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -191,6 +191,6 @@ if (!empty($object->id))
|
|||||||
show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
|
show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -919,7 +919,6 @@ print "</table>\n";
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -118,6 +118,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -373,6 +373,6 @@ print $stringtoshow;
|
|||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
print '<div style="clear:both"></div>';
|
print '<div style="clear:both"></div>';
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -724,6 +724,6 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user