Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3702 [NumberingModule] add: custom numerotation dolibarr native #3801

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 'Atlas';

/**
* 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 = 'Promethée';

/**
* 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 = 'Épiméthée';

/**
* 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 = 'Janus';

/**
* 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 = 'Égéon';

/**
* 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