Skip to content

Commit

Permalink
Evarisk#3702 [NumberingModule] add: custom numerotation dolibarr native
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Apr 17, 2024
1 parent 761018d commit 84140a5
Show file tree
Hide file tree
Showing 60 changed files with 1,923 additions and 193 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
require_once __DIR__ . '/../../../saturne/class/saturnedocuments.class.php';

/**
* Class for ControlDocument.
* Class for AccidentInvestigationDocument.
*/
class AccidentInvestigationDocument extends SaturneDocuments
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2021-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/

/**
* \file core/modules/digiriskdolibarr/accidentinvestigation/mod_accidentinvestigation_custom.php
* \ingroup digiriskdolibarr
* \brief File of class to manage mod_accidentinvestigation_custom numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage accidentinvestigation numbering rules custom.
*/
class mod_accidentinvestigation_custom extends CustomModeleNumRefSaturne
{
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'AI';

/**
* @var string Name.
*/
public string $name = 'Custom';

/**
* Return description of module
*
* @param String $mode Either "standard" for normal prefix or "custom"
* @return String Descriptive text
*/
public function info($mode = 'custom'): string
{
return parent::info($mode);
}

/**
* Return next value
*
* @return string Value if OK, 0 if KO
*/
public function getNextValue(object $object): string
{
return parent::getNextCustomValue($object);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2023 EVARISK <[email protected]>
/* Copyright (C) 2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -17,7 +17,7 @@
*/

/**
* \file core/modules/digiriskdolibarr/address/mod_accidentinvestigation_standard.php
* \file core/modules/digiriskdolibarr/accidentinvestigation/mod_accidentinvestigation_standard.php
* \ingroup digiriskdolibarr
* \brief File of class to manage accident investigation numbering rules standard.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2021-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/

/**
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/accidentinvestigationdocument/mod_accidentinvestigationdocument_custom.php
* \ingroup digiriskdolibarr
* \brief File of class to manage mod_accidentinvestigationdocument_custom numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage accidentinvestigationdocument numbering rules custom.
*/
class mod_accidentinvestigationdocument_custom extends CustomModeleNumRefSaturne
{
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'AID';

/**
* @var string Name.
*/
public string $name = 'Custom';

/**
* Return description of module
*
* @param String $mode Either "standard" for normal prefix or "custom"
* @return String Descriptive text
*/
public function info($mode = 'custom'): string
{
return parent::info($mode);
}

/**
* Return next value
*
* @return string Value if OK, 0 if KO
*/
public function getNextValue(object $object): string
{
return parent::getNextCustomValue($object);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2023 EVARISK <[email protected]>
/* Copyright (C) 2023-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2021-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/

/**
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/auditreportdocument/mod_auditreportdocument_custom.php
* \ingroup digiriskdolibarr
* \brief File of class to manage mod_auditreportdocument_custom numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage auditreportdocument numbering rules custom.
*/
class mod_auditreportdocument_custom extends CustomModeleNumRefSaturne
{
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'ARD';

/**
* @var string Name.
*/
public string $name = 'Custom';

/**
* Return description of module
*
* @param String $mode Either "standard" for normal prefix or "custom"
* @return String Descriptive text
*/
public function info($mode = 'custom'): string
{
return parent::info($mode);
}

/**
* Return next value
*
* @return string Value if OK, 0 if KO
*/
public function getNextValue(object $object): string
{
return parent::getNextCustomValue($object);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2021-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/

/**
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/firepermitdocument/mod_firepermitdocument_custom.php
* \ingroup digiriskdolibarr
* \brief File of class to manage mod_firepermitdocument_custom numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage firepermitdocument numbering rules custom.
*/
class mod_firepermitdocument_custom extends CustomModeleNumRefSaturne
{
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'FPD';

/**
* @var string Name.
*/
public string $name = 'Custom';

/**
* Return description of module
*
* @param String $mode Either "standard" for normal prefix or "custom"
* @return String Descriptive text
*/
public function info($mode = 'custom'): string
{
return parent::info($mode);
}

/**
* Return next value
*
* @return string Value if OK, 0 if KO
*/
public function getNextValue(object $object): string
{
return parent::getNextCustomValue($object);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
*/

/**
* \file core/modules/digiquali/controldocument/mod_controldocument_standard.php
* \ingroup digiquali
* \brief File of class to manage controldocument numbering rules standard.
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/firepermitdocument/mod_firepermitdocument_standard.php
* \ingroup digiriskdolibarr
* \brief File of class to manage firepermitdocument numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage controldocument numbering rules standard.
* Class to manage firepermitdocument numbering rules standard.
*/
class mod_firepermitdocument_standard extends ModeleNumRefSaturne
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2021-2024 EVARISK <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/

/**
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/groupmentdocument/mod_groupmentdocument_custom.php
* \ingroup digiriskdolibarr
* \brief File of class to manage mod_groupmentdocument_custom numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage groupmentdocument numbering rules custom.
*/
class mod_groupmentdocument_custom extends CustomModeleNumRefSaturne
{
/**
* @var string Numbering module ref prefix.
*/
public string $prefix = 'GPD';

/**
* @var string Name.
*/
public string $name = 'Custom';

/**
* Return description of module
*
* @param String $mode Either "standard" for normal prefix or "custom"
* @return String Descriptive text
*/
public function info($mode = 'custom'): string
{
return parent::info($mode);
}

/**
* Return next value
*
* @return string Value if OK, 0 if KO
*/
public function getNextValue(object $object): string
{
return parent::getNextCustomValue($object);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
*/

/**
* \file core/modules/digiquali/controldocument/mod_controldocument_standard.php
* \ingroup digiquali
* \brief File of class to manage controldocument numbering rules standard.
* \file core/modules/digiriskdolibarr/digiriskdolibarrdocuments/groupmentdocument/mod_groupmentdocument_standard.php
* \ingroup digiriskdolibarr
* \brief File of class to manage groupmentdocument numbering rules standard.
*/

// Load Saturne libraries.
require_once __DIR__ . '/../../../../../../saturne/core/modules/saturne/modules_saturne.php';

/**
* Class to manage controldocument numbering rules standard.
* Class to manage groupmentdocument numbering rules standard.
*/
class mod_groupmentdocument_standard extends ModeleNumRefSaturne
{
Expand Down
Loading

0 comments on commit 84140a5

Please sign in to comment.