dolibarr 18.0.6
mod_takepos_ref_simple Class Reference

Class to manage ref numbering of takepos cards with rule Simple. More...

Inheritance diagram for mod_takepos_ref_simple:
Collaboration diagram for mod_takepos_ref_simple:

Public Member Functions

 info ()
 Return description of numbering module.
 
 getExample ()
 Return an example of numbering module values.
 
 canBeActivated ()
 Test if the numbers already in the database do not cause any conflicts that will prevent this of conflicts that will prevent this numbering from working.
 
 getNextValue ($objsoc=null, $invoice=null, $mode='next')
 Return next value.
 
 getNumRef ($objsoc, $objforref)
 Return next free value.
 
- Public Member Functions inherited from ModeleNumRefTakepos
 isEnabled ()
 Return if a module can be used or not.
 
 getVersion ()
 Renvoi version du modele de numerotation.
 

Detailed Description

Class to manage ref numbering of takepos cards with rule Simple.

Definition at line 33 of file mod_takepos_ref_simple.php.

Member Function Documentation

◆ canBeActivated()

mod_takepos_ref_simple::canBeActivated ( )

Test if the numbers already in the database do not cause any conflicts that will prevent this of conflicts that will prevent this numbering from working.

Returns
boolean false if KO (there is a conflict), true if OK

Reimplemented from ModeleNumRefTakepos.

Definition at line 89 of file mod_takepos_ref_simple.php.

◆ getExample()

mod_takepos_ref_simple::getExample ( )

Return an example of numbering module values.

Returns
string Example.

Reimplemented from ModeleNumRefTakepos.

Definition at line 78 of file mod_takepos_ref_simple.php.

◆ getNextValue()

mod_takepos_ref_simple::getNextValue ( $objsoc = null,
$invoice = null,
$mode = 'next' )

Return next value.

Note to increase perf of this numbering engine: ALTER TABLE llx_facture ADD COLUMN calculated_numrefonly INTEGER AS (CASE SUBSTRING(ref FROM 1 FOR 2) WHEN 'TC' THEN CAST(SUBSTRING(ref FROM 10) AS SIGNED) ELSE 0 END) PERSISTENT; ALTER TABLE llx_facture ADD INDEX calculated_numrefonly_idx (calculated_numrefonly);

Parameters
Societe$objsocObject third party
Facture$invoiceObject invoice
string$mode'next' for next value or 'last' for last value
Returns
string|int Next ref value or last ref if $mode is 'last'

Reimplemented from ModeleNumRefTakepos.

Definition at line 135 of file mod_takepos_ref_simple.php.

References dol_print_error(), and dol_syslog().

Referenced by getNumRef().

◆ getNumRef()

mod_takepos_ref_simple::getNumRef ( $objsoc,
$objforref )

Return next free value.

Parameters
Societe$objsocObject third party
Object$objforrefObject for number to search
Returns
string Next free value

Definition at line 212 of file mod_takepos_ref_simple.php.

References getNextValue().

◆ info()

mod_takepos_ref_simple::info ( )

Return description of numbering module.

Returns
string Text with description

Reimplemented from ModeleNumRefTakepos.

Definition at line 63 of file mod_takepos_ref_simple.php.


The documentation for this class was generated from the following file: