-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7 [Core] add: create main file and information systems architecture
- Loading branch information
1 parent
9b33758
commit c19fd21
Showing
30 changed files
with
1,751 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated binaries | ||
/build/*.zip | ||
/bin/*.zip | ||
# Doxygen generated documentation | ||
/build/doxygen/doxygen_warnings.log | ||
/doc/code/doxygen | ||
# Composer managed dependencies | ||
/vendor | ||
/dev/bin | ||
# PHPdocumentor generated files | ||
/build/phpdoc | ||
/doc/code/phpdoc | ||
# Sphinx generated files | ||
/doc/user/build | ||
/.settings/ | ||
/.buildpath | ||
/.project | ||
# Other | ||
*.back | ||
/.editorconfig | ||
/.gitattributes | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# CHANGELOG dolitmd FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) | ||
|
||
## 1.0 | ||
|
||
Initial version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# dolitmd | ||
Audit et accompagnement TMD | ||
# DoliTMD sur [DOLIBARR ERP CRM](https://www.dolibarr.org) | ||
|
||
## Informations | ||
|
||
- Numéro du module : 436303 | ||
- Version : 1.0.0 | ||
- Dernière mise à jour : 04/04/2023 | ||
- Éditeur : [Evarisk](https://www.evarisk.com) | ||
- Compatibilité : Dolibarr 15.0.0 - 16.0.5 | ||
- Thème : eldy | ||
- Licence : GPLv3 | ||
- Disponible sur : Windows - MacOS - Linux | ||
|
||
## Liens | ||
|
||
- Support & Assistance : [Forum www.dolibarr.fr](https://www.dolibarr.fr) / Par mail à [email protected] | ||
- Demo : [Demo DoliTMD](https://www.demodoli.digirisk.com) - ID: demo - Password: demo | ||
- Documentation : [Wiki DoliTMD](https://wiki.dolibarr.org/index.php/Module_DoliTMD) | ||
- Projet GitHub : [Projet DoliTMD](https://github.com/Evarisk/DoliTMD/projects?query=is%3Aopen) | ||
- D'autres modules développés par Evarisk disponibles sur [DoliStore.com](https://www.dolistore.com) | ||
|
||
## Fonctionnalités | ||
|
||
- Simplification de la CRM | ||
|
||
## Traductions | ||
|
||
- Français | ||
- Anglais | ||
|
||
## Installation | ||
|
||
### Méthode 1 : | ||
|
||
- Depuis le menu "Déployer/Installer un module externe" de Dolibarr : | ||
- Glisser l'archive ZIP 'module_DoliTMD-X.Y.Z' et cliquer sur "ENVOYER FICHIER" | ||
- Activer le module dans la liste des Modules/Applications installés | ||
|
||
### Méthode 2 : | ||
|
||
- Dans le dossier "dolibarr/htdocs/custom" copier la ligne suivante : | ||
``` | ||
git clone https://github.com/Evarisk/DoliTMD.git | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
/* Copyright (C) 2023 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/>. | ||
*/ | ||
|
||
/** | ||
* \file admin/about.php | ||
* \ingroup dolitmd | ||
* \brief About page of module dolitmd. | ||
*/ | ||
|
||
// Load dolitmd environment | ||
if (file_exists('../dolitmd.main.inc.php')) { | ||
require_once __DIR__ . '/../dolitmd.main.inc.php'; | ||
} else { | ||
die('Include of dolitmd main fails'); | ||
} | ||
|
||
// Libraries | ||
require_once __DIR__ . '/../lib/dolitmd.lib.php'; | ||
require_once __DIR__ . '/../core/modules/modDoliTMD.class.php'; | ||
|
||
// Global variables definitions | ||
global $db, $langs, $user; | ||
|
||
// Load translation files required by the page | ||
saturne_load_langs(); | ||
|
||
// Initialize technical objects | ||
$moddolitmd = new modDoliTMD($db); | ||
|
||
// Get parameters | ||
$backtopage = GETPOST('backtopage', 'alpha'); | ||
|
||
// Security check - Protection if external user | ||
$permissiontoread = $user->rights->dolitmd->adminpage->read; | ||
saturne_check_access($permissiontoread); | ||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$title = $langs->trans('ModuleAbout', 'DoliTMD'); | ||
$help_url = 'FR:Module_DoliTMD'; | ||
|
||
saturne_header(0,'', $title, $help_url); | ||
|
||
// Subheader | ||
$linkback = '<a href="' . ($backtopage ?: DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans('BackToModuleList') . '</a>'; | ||
print load_fiche_titre($title, $linkback, 'dolitmd_color@dolitmd'); | ||
|
||
// Configuration header | ||
$head = dolitmd_admin_prepare_head(); | ||
print dol_get_fiche_head($head, 'about', $title, -1, 'dolitmd_color@dolitmd'); | ||
|
||
print $moddolitmd->getDescLong(); | ||
|
||
// Page end | ||
print dol_get_fiche_end(); | ||
llxFooter(); | ||
$db->close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
//Silence is golden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
/* Copyright (C) 2023 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/>. | ||
*/ | ||
|
||
/** | ||
* \file admin/setup.php | ||
* \ingroup dolitmd | ||
* \brief dolitmd setup page. | ||
*/ | ||
|
||
// Load dolitmd environment | ||
if (file_exists('../dolitmd.main.inc.php')) { | ||
require_once __DIR__ . '/../dolitmd.main.inc.php'; | ||
} else { | ||
die('Include of dolitmd main fails'); | ||
} | ||
|
||
// Libraries | ||
require_once __DIR__ . '/../lib/dolitmd.lib.php'; | ||
|
||
// Global variables definitions | ||
global $db, $langs, $user; | ||
|
||
// Load translation files required by the page | ||
saturne_load_langs(); | ||
|
||
// Get parameters | ||
$backtopage = GETPOST('backtopage', 'alpha'); | ||
|
||
// Security check - Protection if external user | ||
$permissiontoread = $user->rights->dolitmd->adminpage->read; | ||
saturne_check_access($permissiontoread); | ||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$title = $langs->trans('ModuleSetup', 'dolitmd'); | ||
$help_url = 'FR:Module_dolitmd'; | ||
|
||
saturne_header(0,'', $title, $help_url); | ||
|
||
// Subheader | ||
$linkback = '<a href="' . ($backtopage ?: DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans('BackToModuleList') . '</a>'; | ||
print load_fiche_titre($title, $linkback, 'dolitmd_color@dolitmd'); | ||
|
||
// Configuration header | ||
$head = dolitmd_admin_prepare_head(); | ||
print dol_get_fiche_head($head, 'settings', $title, -1, 'dolitmd_color@dolitmd'); | ||
|
||
$db->close(); | ||
llxFooter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
/* Copyright (C) 2023 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/>. | ||
*/ | ||
|
||
/** | ||
* \file class/actions_dolitmd.class.php | ||
* \ingroup dolitmd | ||
* \brief dolitmd hook overload. | ||
*/ | ||
|
||
/** | ||
* Class ActionsDoliTMD | ||
*/ | ||
class ActionsDolitmd | ||
{ | ||
/** | ||
* @var DoliDB Database handler. | ||
*/ | ||
public DoliDB $db; | ||
|
||
/** | ||
* @var string Error code (or message) | ||
*/ | ||
public string $error = ''; | ||
|
||
/** | ||
* @var array Errors | ||
*/ | ||
public array $errors = []; | ||
|
||
/** | ||
* @var array Hook results. Propagated to $hookmanager->resArray for later reuse | ||
*/ | ||
public array $results = []; | ||
|
||
/** | ||
* @var string String displayed by executeHook() immediately after return | ||
*/ | ||
public string $resprints; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param DoliDB $db Database handler | ||
*/ | ||
public function __construct(DoliDB $db) | ||
{ | ||
$this->db = $db; | ||
} | ||
|
||
/** | ||
* Overloading the printMainArea function : replacing the parent's function with the one below | ||
* | ||
* @param array $parameters Hook metadatas (context, etc...) | ||
* @return int 0 < on error, 0 on success, 1 to replace standard code | ||
*/ | ||
public function addMoreBoxStatsCustomer(array $parameters, $object, $action): int | ||
{ | ||
global $user; | ||
|
||
// Do something only for the current context | ||
if ($parameters['currentcontext'] == 'thirdpartycomm') { | ||
if (isModEnabled('project') && $user->rights->project->lire) { | ||
$project = new Project($this->db); | ||
$project->fetchAll('', '', 0, 0, []); | ||
|
||
// Box factures | ||
$tmp = $object->getOutstandingBills('customer', 0); | ||
$outstandingOpened = $tmp['opened']; | ||
$outstandingTotal = $tmp['total_ht']; | ||
$outstandingTotalIncTax = $tmp['total_ttc']; | ||
|
||
$text = $langs->trans("OverAllInvoices"); | ||
$link = DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id; | ||
$icon = 'bill'; | ||
if ($link) { | ||
$boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; | ||
} | ||
$boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; | ||
$boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; | ||
$boxstat .= '<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; | ||
$boxstat .= '</div>'; | ||
if ($link) { | ||
$boxstat .= '</a>'; | ||
} | ||
} | ||
} | ||
|
||
return 0; // or return 1 to replace standard code | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
//Silence is golden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
//Silence is golden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
//Silence is golden |
Oops, something went wrong.