FIX travis errors
This commit is contained in:
parent
70ebc61c1f
commit
1379b2ce87
@ -3738,7 +3738,6 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Include file with class
|
// Include file with class
|
||||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||||
|
|
||||||
foreach ($dirmodels as $reldir) {
|
foreach ($dirmodels as $reldir) {
|
||||||
$dir = dol_buildpath($reldir . 'core/modules/' . $moduleName . '/');
|
$dir = dol_buildpath($reldir . 'core/modules/' . $moduleName . '/');
|
||||||
|
|
||||||
|
|||||||
@ -31,17 +31,35 @@ dol_include_once('/core/modules/takepos/modules_takepos.php');
|
|||||||
*/
|
*/
|
||||||
class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
||||||
{
|
{
|
||||||
var $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
/**
|
||||||
var $prefix = 'TK';
|
* Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr'
|
||||||
var $error = '';
|
* @var string
|
||||||
var $nom = 'Simple';
|
*/
|
||||||
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prefix
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $prefix = 'TK';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Error code (or message)
|
||||||
|
*/
|
||||||
|
public $error = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $nom = 'Simple';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return description of numbering module
|
* Return description of numbering module
|
||||||
*
|
*
|
||||||
* @return string Text with description
|
* @return string Text with description
|
||||||
*/
|
*/
|
||||||
function info()
|
public function info()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -53,7 +71,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
public function getExample()
|
||||||
{
|
{
|
||||||
return $this->prefix . '0-0501-0001';
|
return $this->prefix . '0-0501-0001';
|
||||||
}
|
}
|
||||||
@ -64,7 +82,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false si conflit, true si ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
public function canBeActivated()
|
||||||
{
|
{
|
||||||
global $conf, $langs, $db;
|
global $conf, $langs, $db;
|
||||||
|
|
||||||
@ -103,7 +121,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||||||
* @param string $mode 'next' for next value or 'last' for last value
|
* @param string $mode 'next' for next value or 'last' for last value
|
||||||
* @return string Next value
|
* @return string Next value
|
||||||
*/
|
*/
|
||||||
function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
|
public function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
@ -168,7 +186,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||||||
* @param Object $objforref Object for number to search
|
* @param Object $objforref Object for number to search
|
||||||
* @return string Next free value
|
* @return string Next free value
|
||||||
*/
|
*/
|
||||||
function getNumRef($objsoc, $objforref)
|
public function getNumRef($objsoc, $objforref)
|
||||||
{
|
{
|
||||||
return $this->getNextValue($objsoc, $objforref);
|
return $this->getNextValue($objsoc, $objforref);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,16 +33,29 @@ dol_include_once('/core/modules/takepos/modules_takepos.php');
|
|||||||
*/
|
*/
|
||||||
class mod_takepos_ref_universal extends ModeleNumRefTakepos
|
class mod_takepos_ref_universal extends ModeleNumRefTakepos
|
||||||
{
|
{
|
||||||
var $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
/**
|
||||||
var $error = '';
|
* Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr'
|
||||||
var $nom = 'Universal';
|
* @var string
|
||||||
|
*/
|
||||||
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Error code (or message)
|
||||||
|
*/
|
||||||
|
public $error = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $nom = 'Universal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi la description du modele de numerotation
|
* Renvoi la description du modele de numerotation
|
||||||
*
|
*
|
||||||
* @return string Texte descripif
|
* @return string Texte descripif
|
||||||
*/
|
*/
|
||||||
function info()
|
public function info()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -83,7 +96,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
public function getExample()
|
||||||
{
|
{
|
||||||
global $conf, $langs, $mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
@ -106,7 +119,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos
|
|||||||
* @param string $mode 'next' for next value or 'last' for last value
|
* @param string $mode 'next' for next value or 'last' for last value
|
||||||
* @return string Value if KO, <0 if KO
|
* @return string Value if KO, <0 if KO
|
||||||
*/
|
*/
|
||||||
function getNextValue($objsoc = 0, $invoice = null, $mode = 'next')
|
public function getNextValue($objsoc = 0, $invoice = null, $mode = 'next')
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
@ -138,7 +151,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos
|
|||||||
* @param Object $objforref Object for number to search
|
* @param Object $objforref Object for number to search
|
||||||
* @return string Next free value
|
* @return string Next free value
|
||||||
*/
|
*/
|
||||||
function getNumRef($objsoc, $objforref)
|
public function getNumRef($objsoc, $objforref)
|
||||||
{
|
{
|
||||||
return $this->getNextValue($objsoc, $objforref);
|
return $this->getNextValue($objsoc, $objforref);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,12 @@
|
|||||||
*/
|
*/
|
||||||
abstract class ModeleNumRefTakepos
|
abstract class ModeleNumRefTakepos
|
||||||
{
|
{
|
||||||
var $error='';
|
/**
|
||||||
|
* @var string Error code (or message)
|
||||||
|
*/
|
||||||
|
public $error='';
|
||||||
|
|
||||||
|
|
||||||
public $version = '';
|
public $version = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,7 +46,7 @@ abstract class ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return boolean true if module can be used
|
* @return boolean true if module can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
public function isEnabled()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -51,7 +56,7 @@ abstract class ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return string Texte descripif
|
* @return string Texte descripif
|
||||||
*/
|
*/
|
||||||
function info()
|
public function info()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("cashdesk@cashdesk");
|
$langs->load("cashdesk@cashdesk");
|
||||||
@ -59,11 +64,11 @@ abstract class ModeleNumRefTakepos
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi un exemple de numerotation
|
* Return an example of numbering
|
||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
public function getExample()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('cashdesk@cashdesk');
|
$langs->load('cashdesk@cashdesk');
|
||||||
@ -71,12 +76,12 @@ abstract class ModeleNumRefTakepos
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
* Checks if the numbers already in force in the data base do not
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
* cause conflicts that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false if conflict, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
public function canBeActivated()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -86,18 +91,18 @@ abstract class ModeleNumRefTakepos
|
|||||||
*
|
*
|
||||||
* @return string Valeur
|
* @return string Valeur
|
||||||
*/
|
*/
|
||||||
function getNextValue()
|
public function getNextValue()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
return $langs->trans('NotAvailable');
|
return $langs->trans('NotAvailable');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi version du module numerotation
|
* Renvoi version du modele de numerotation
|
||||||
*
|
*
|
||||||
* @return string Valeur
|
* @return string Valeur
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user