New: Les fonctions de saisie/consultation des charges sociales et impots sont mis dans un module part nomm 'Taxes et charges sociales'. En effet ces fonctions ne sont pas des fonctions de compta pure mais des fonctions de trsoreries. Ceci afin d'avoir une meilleur indpendance du module compta.
This commit is contained in:
parent
93dd22eed8
commit
d94dc96e22
@ -165,10 +165,10 @@ class Conf
|
||||
// Module commercial
|
||||
$this->commercial->enabled=defined("MAIN_MODULE_COMMERCIAL")?MAIN_MODULE_COMMERCIAL:0;
|
||||
$this->commercial->dir_output=DOL_DATA_ROOT."/rapport";
|
||||
// Module charges sociales
|
||||
$this->charges->enabled=1;
|
||||
$this->charges->dir_output=DOL_DATA_ROOT."/socialcontrib";
|
||||
$this->charges->dir_images=DOL_DATA_ROOT."/socialcontrib/images";
|
||||
// Module taxes et charges sociales
|
||||
$this->tax->enabled=1;
|
||||
$this->tax->dir_output=DOL_DATA_ROOT."/taxes";
|
||||
$this->tax->dir_images=DOL_DATA_ROOT."/taxes/images";
|
||||
// Module comptaexpert
|
||||
$this->comptaexpert->enabled=defined("MAIN_MODULE_COMPTABILITE_EXPERT")?MAIN_MODULE_COMPTABILITE_EXPERT:0;
|
||||
$this->comptaexpert->dir_output=DOL_DATA_ROOT."/comptaexpert";
|
||||
|
||||
@ -354,19 +354,19 @@ class MenuLeft {
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/deplacement/index.php?leftmenu=deplacement&mainmenu=accountancy", $langs->trans("Trips"), 0, $user->rights->deplacement->lire);
|
||||
}
|
||||
|
||||
// Charges
|
||||
if ($conf->charges->enabled)
|
||||
// Charges sociales
|
||||
if ($conf->tax->enabled)
|
||||
{
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/charges/index.php?leftmenu=charges&mainmenu=accountancy",$langs->trans("Charges"), 0, $user->rights->compta->charges->lire);
|
||||
if ($leftmenu=="charges") $newmenu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"), 1, $user->rights->compta->charges->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/charges/index.php?leftmenu=charges&mainmenu=accountancy",$langs->trans("Charges"), 0, $user->rights->tax->charges->lire);
|
||||
if ($leftmenu=="charges") $newmenu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"), 1, $user->rights->tax->charges->creer);
|
||||
}
|
||||
|
||||
// Compta tva
|
||||
if (($conf->compta->enabled || $conf->comptaexpert->enabled) && $conf->compta->tva && $user->societe_id == 0)
|
||||
// Charges tva
|
||||
if ($conf->tax->enabled && $conf->compta->tva && $user->societe_id == 0)
|
||||
{
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/tva/index.php?leftmenu=vat&mainmenu=accountancy",$langs->trans("VAT"),0,$user->rights->compta->charges->lire);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/fiche.php?action=create",$langs->trans("NewPayment"),1,$user->rights->compta->charges->creer);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/reglement.php",$langs->trans("Payments"),1,$user->rights->compta->charges->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/tva/index.php?leftmenu=vat&mainmenu=accountancy",$langs->trans("VAT"),0,$user->rights->tax->charges->lire);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/fiche.php?action=create",$langs->trans("NewPayment"),1,$user->rights->tax->charges->creer);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/reglement.php",$langs->trans("Payments"),1,$user->rights->tax->charges->lire);
|
||||
}
|
||||
|
||||
// Compta simple
|
||||
|
||||
@ -373,23 +373,24 @@ class MenuLeft {
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/deplacement/index.php?leftmenu=deplacement&mainmenu=accountancy", $langs->trans("Trips"), 0, $user->rights->deplacement->lire);
|
||||
}
|
||||
|
||||
// Charges
|
||||
// Charges sociales
|
||||
/*
|
||||
if ($conf->charges->enabled)
|
||||
if ($conf->tax->enabled)
|
||||
{
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/charges/index.php?leftmenu=charges&mainmenu=accountancy",$langs->trans("Charges"), 0, $user->rights->compta->charges->lire);
|
||||
if ($leftmenu=="charges") $newmenu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"), 1, $user->rights->compta->charges->creer);
|
||||
}
|
||||
*/
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/charges/index.php?leftmenu=charges&mainmenu=accountancy",$langs->trans("Charges"), 0, $user->rights->tax->charges->lire);
|
||||
if ($leftmenu=="charges") $newmenu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"), 1, $user->rights->tax->charges->creer);
|
||||
}
|
||||
*/
|
||||
|
||||
// Compa TVA
|
||||
// Charges tva
|
||||
/*
|
||||
if (($conf->compta->enabled || $conf->comptaexpert->enabled) && $conf->compta->tva && $user->societe_id == 0)
|
||||
if ($conf->tax->enabled && $conf->compta->tva && $user->societe_id == 0)
|
||||
{
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/tva/index.php?leftmenu=vat&mainmenu=accountancy",$langs->trans("VAT"),0,$user->rights->compta->charges->lire);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/fiche.php?action=create",$langs->trans("NewPayment"),1,$user->rights->compta->charges->creer);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/reglement.php",$langs->trans("Payments"),1,$user->rights->compta->charges->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/tva/index.php?leftmenu=vat&mainmenu=accountancy",$langs->trans("VAT"),0,$user->rights->tax->charges->lire);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/fiche.php?action=create",$langs->trans("NewPayment"),1,$user->rights->tax->charges->creer);
|
||||
if ($leftmenu=="vat") $newmenu->add_submenu(DOL_URL_ROOT."/compta/tva/reglement.php",$langs->trans("Payments"),1,$user->rights->tax->charges->lire);
|
||||
}
|
||||
*/
|
||||
|
||||
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
|
||||
{
|
||||
|
||||
@ -30,110 +30,109 @@
|
||||
\ingroup categorie
|
||||
\brief Fichier de description et activation du module Categorie
|
||||
*/
|
||||
|
||||
include_once "DolibarrModules.class.php";
|
||||
|
||||
/**
|
||||
\class modProduit
|
||||
\brief Classe de description et activation du module Produit
|
||||
*/
|
||||
|
||||
/**
|
||||
\class modCategorie
|
||||
\brief Classe de description et activation du module Categorie
|
||||
*/
|
||||
class modCategorie extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. définit les noms, constantes et boîtes
|
||||
* \param DB handler d'accès base
|
||||
*/
|
||||
function modCategorie ($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->id = 'categorie'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 1780;
|
||||
|
||||
$this->family = "products";
|
||||
$this->name = "Catégorie";
|
||||
$this->description = "Gestion des catégories de produits";
|
||||
|
||||
$this->revision = explode(' ','$Revision$');
|
||||
$this->version = $this->revision[1];
|
||||
//$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_CATEGORIE';
|
||||
$this->special = 0;
|
||||
$this->picto = '';
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modProduit");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'categorie';
|
||||
|
||||
$r=0;
|
||||
|
||||
$this->rights[$r][0] = 241; // id de la permission
|
||||
$this->rights[$r][1] = 'Lire les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'lire';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 242; // id de la permission
|
||||
$this->rights[$r][1] = 'Créer/modifier les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'w'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'creer';
|
||||
$r++;
|
||||
/**
|
||||
* \brief Constructeur. définit les noms, constantes et boîtes
|
||||
* \param DB handler d'accès base
|
||||
*/
|
||||
function modCategorie ($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->id = 'categorie'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 1780;
|
||||
|
||||
$this->rights[$r][0] = 243; // id de la permission
|
||||
$this->rights[$r][1] = 'Supprimer les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'd'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'supprimer';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 244; // id de la permission
|
||||
$this->rights[$r][1] = 'Voir le contenu des catégories cachées'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'voir';
|
||||
$r++;
|
||||
}
|
||||
$this->family = "products";
|
||||
$this->name = "Catégories de produit";
|
||||
$this->description = "Gestion des catégories de produits";
|
||||
|
||||
$this->revision = explode(' ','$Revision$');
|
||||
$this->version = $this->revision[1];
|
||||
//$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_CATEGORIE';
|
||||
$this->special = 0;
|
||||
$this->picto = '';
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modProduit");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'categorie';
|
||||
|
||||
$r=0;
|
||||
|
||||
$this->rights[$r][0] = 241; // id de la permission
|
||||
$this->rights[$r][1] = 'Lire les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'lire';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 242; // id de la permission
|
||||
$this->rights[$r][1] = 'Créer/modifier les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'w'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'creer';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 243; // id de la permission
|
||||
$this->rights[$r][1] = 'Supprimer les catégories'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'd'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'supprimer';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 244; // id de la permission
|
||||
$this->rights[$r][1] = 'Voir le contenu des catégories cachées'; // libelle de la permission
|
||||
$this->rights[$r][2] = 'r'; // type de la permission (déprécié à ce jour)
|
||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par défaut
|
||||
$this->rights[$r][4] = 'voir';
|
||||
$r++;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
|
||||
* Définit également les répertoires de données à créer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// Permissions
|
||||
$this->remove();
|
||||
/**
|
||||
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
|
||||
* Définit également les répertoires de données à créer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
$sql = array();
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -31,13 +31,13 @@
|
||||
\ingroup comptabilite
|
||||
\brief Fichier de description et activation du module Comptabilite
|
||||
*/
|
||||
|
||||
include_once "DolibarrModules.class.php";
|
||||
|
||||
/** \class modComptabilite
|
||||
|
||||
/**
|
||||
\class modComptabilite
|
||||
\brief Classe de description et activation du module Comptabilite
|
||||
*/
|
||||
|
||||
class modComptabilite extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -45,148 +45,110 @@ class modComptabilite extends DolibarrModules
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'accès base
|
||||
*/
|
||||
function modComptabilite($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'comptabilite'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 10 ;
|
||||
|
||||
$this->family = "financial";
|
||||
$this->name = "Comptabilite";
|
||||
$this->description = "Gestion sommaire de comptabilité";
|
||||
|
||||
$this->revision = explode(" ","$Revision$");
|
||||
$this->version = $this->revision[1];
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_COMPTABILITE';
|
||||
$this->special = 0;
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = "compta.php";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modFacture","modBanque");
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array("modComptabiliteExpert");
|
||||
$this->langfiles = array("compta");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Répertoires
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->compta->dir_output;
|
||||
$this->dirs[1] = $conf->compta->dir_output."/rapport";
|
||||
$this->dirs[2] = $conf->compta->dir_output."/export";
|
||||
$this->dirs[3] = $conf->compta->dir_images;
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'compta';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 91;
|
||||
$this->rights[$r][1] = 'Lire les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 92;
|
||||
$this->rights[$r][1] = 'Créer modifier les charges';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 93;
|
||||
$this->rights[$r][1] = 'Supprimer les charges';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'supprimer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 95;
|
||||
$this->rights[$r][1] = 'Lire CA, bilans, résultats';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'resultat';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 96;
|
||||
$this->rights[$r][1] = 'Paramétrer la ventilation';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'parametrer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 97;
|
||||
$this->rights[$r][1] = 'Lire les ventilations de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 98;
|
||||
$this->rights[$r][1] = 'Ventiler les lignes de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
/*
|
||||
Ce n'est pas un module en particulier qui doit conditionner l'accès à un espace
|
||||
partagé par plusieurs module. C'est au sein de l'espace compta/tréso que chaque zone
|
||||
est protégée par le droit adéquat.
|
||||
Sinon on bloque aussi utilisation du module banque, tva, des commandes à facturer,
|
||||
ou d'un autre module de compta.
|
||||
$r++;
|
||||
$this->rights[$r][0] = 98;
|
||||
$this->rights[$r][1] = "Accès à l'espace compta/tréso";
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'general';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
*/
|
||||
|
||||
}
|
||||
function modComptabilite($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'comptabilite'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 10 ;
|
||||
|
||||
$this->family = "financial";
|
||||
$this->name = "Comptabilite";
|
||||
$this->description = "Gestion sommaire de comptabilité";
|
||||
|
||||
$this->revision = explode(" ","$Revision$");
|
||||
$this->version = $this->revision[1];
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_COMPTABILITE';
|
||||
$this->special = 0;
|
||||
$this->picto='';
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = "compta.php";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modFacture","modBanque");
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array("modComptabiliteExpert");
|
||||
$this->langfiles = array("compta");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Répertoires
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->compta->dir_output;
|
||||
$this->dirs[1] = $conf->compta->dir_output."/rapport";
|
||||
$this->dirs[2] = $conf->compta->dir_output."/export";
|
||||
$this->dirs[3] = $conf->compta->dir_images;
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'compta';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 95;
|
||||
$this->rights[$r][1] = 'Lire CA, bilans, résultats';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'resultat';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 96;
|
||||
$this->rights[$r][1] = 'Paramétrer la ventilation';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'parametrer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 97;
|
||||
$this->rights[$r][1] = 'Lire les ventilations de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 98;
|
||||
$this->rights[$r][1] = 'Ventiler les lignes de factures';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'ventilation';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
|
||||
* Définit également les répertoires de données à créer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
\ingroup facture
|
||||
\brief Fichier de la classe de description et activation du module Facture
|
||||
*/
|
||||
|
||||
include_once "DolibarrModules.class.php";
|
||||
|
||||
|
||||
@ -40,7 +39,6 @@ include_once "DolibarrModules.class.php";
|
||||
\class modFacture
|
||||
\brief Classe de description et activation du module Facture
|
||||
*/
|
||||
|
||||
class modFacture extends DolibarrModules
|
||||
{
|
||||
|
||||
|
||||
@ -26,18 +26,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/modules/modPrelevement.class.php
|
||||
\ingroup prelevement
|
||||
\brief Fichier de description et activation du module Prelevement
|
||||
\file htdocs/includes/modules/modPrelevement.class.php
|
||||
\ingroup prelevement
|
||||
\brief Fichier de description et activation du module Prelevement
|
||||
*/
|
||||
|
||||
include_once "DolibarrModules.class.php";
|
||||
|
||||
/**
|
||||
\class modPrelevement
|
||||
\brief Classe de description et activation du module Prelevement
|
||||
*/
|
||||
|
||||
/**
|
||||
\class modPrelevement
|
||||
\brief Classe de description et activation du module Prelevement
|
||||
*/
|
||||
class modPrelevement extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -45,101 +44,102 @@ class modPrelevement extends DolibarrModules
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'accès base
|
||||
*/
|
||||
function modPrelevement($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'prelevement'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 57 ;
|
||||
|
||||
$this->family = "financial";
|
||||
$this->name = "Prelevement";
|
||||
$this->description = "Gestion des Prélèvements";
|
||||
|
||||
$this->revision = explode(' ','$Revision$');
|
||||
$this->version = $this->revision[1];
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_PRELEVEMENT';
|
||||
$this->special = 0;
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
$this->data_directory = $conf->prelevement->dir_output . "/bon";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modFacture");
|
||||
$this->requiredby = array();
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'prelevement';
|
||||
|
||||
$this->rights[1][0] = 151;
|
||||
$this->rights[1][1] = 'Consulter les prélèvements';
|
||||
$this->rights[1][2] = 'r';
|
||||
$this->rights[1][3] = 1;
|
||||
$this->rights[1][4] = 'bons';
|
||||
$this->rights[1][5] = 'lire';
|
||||
|
||||
$this->rights[2][0] = 152;
|
||||
$this->rights[2][1] = 'Configurer les prélèvements';
|
||||
$this->rights[2][2] = 'w';
|
||||
$this->rights[2][3] = 0;
|
||||
$this->rights[2][4] = 'bons';
|
||||
$this->rights[2][5] = 'configurer';
|
||||
|
||||
$this->rights[3][0] = 153;
|
||||
$this->rights[3][1] = 'Consulter les bons de prélèvements';
|
||||
$this->rights[3][2] = 'r';
|
||||
$this->rights[3][3] = 0;
|
||||
$this->rights[3][4] = 'bons';
|
||||
$this->rights[3][5] = 'lire';
|
||||
|
||||
$this->rights[4][0] = 154;
|
||||
$this->rights[4][1] = 'Créer un bon de prélèvement';
|
||||
$this->rights[4][2] = 'w';
|
||||
$this->rights[4][3] = 0;
|
||||
$this->rights[4][4] = 'bons';
|
||||
$this->rights[4][5] = 'creer';
|
||||
}
|
||||
function modPrelevement($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'prelevement'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 57 ;
|
||||
|
||||
$this->family = "financial";
|
||||
$this->name = "Prelevement";
|
||||
$this->description = "Gestion des Prélèvements";
|
||||
|
||||
$this->revision = explode(' ','$Revision$');
|
||||
$this->version = $this->revision[1];
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_PRELEVEMENT';
|
||||
$this->special = 0;
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
$this->data_directory = $conf->prelevement->dir_output . "/bon";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array("modFacture");
|
||||
$this->requiredby = array();
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'prelevement';
|
||||
|
||||
$this->rights[1][0] = 151;
|
||||
$this->rights[1][1] = 'Consulter les prélèvements';
|
||||
$this->rights[1][2] = 'r';
|
||||
$this->rights[1][3] = 1;
|
||||
$this->rights[1][4] = 'bons';
|
||||
$this->rights[1][5] = 'lire';
|
||||
|
||||
$this->rights[2][0] = 152;
|
||||
$this->rights[2][1] = 'Configurer les prélèvements';
|
||||
$this->rights[2][2] = 'w';
|
||||
$this->rights[2][3] = 0;
|
||||
$this->rights[2][4] = 'bons';
|
||||
$this->rights[2][5] = 'configurer';
|
||||
|
||||
$this->rights[3][0] = 153;
|
||||
$this->rights[3][1] = 'Consulter les bons de prélèvements';
|
||||
$this->rights[3][2] = 'r';
|
||||
$this->rights[3][3] = 0;
|
||||
$this->rights[3][4] = 'bons';
|
||||
$this->rights[3][5] = 'lire';
|
||||
|
||||
$this->rights[4][0] = 154;
|
||||
$this->rights[4][1] = 'Créer un bon de prélèvement';
|
||||
$this->rights[4][2] = 'w';
|
||||
$this->rights[4][3] = 0;
|
||||
$this->rights[4][4] = 'bons';
|
||||
$this->rights[4][5] = 'creer';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
|
||||
* Définit également les répertoires de données à créer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Permissions
|
||||
$this->remove();
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = $conf->prelevement->dir_output;
|
||||
$this->dirs[1] = $conf->prelevement->dir_output."/bon" ;
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = $conf->prelevement->dir_output;
|
||||
$this->dirs[1] = $conf->prelevement->dir_output."/bon" ;
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
143
htdocs/includes/modules/modTax.class.php
Normal file
143
htdocs/includes/modules/modTax.class.php
Normal file
@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/** \defgroup tax Module taxes
|
||||
\brief Module pour inclure des fonctions de saisies des taxes et charges sociales
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/modules/modTax.class.php
|
||||
\ingroup comptabilite
|
||||
\brief Fichier de description et activation du module Taxe
|
||||
*/
|
||||
include_once "DolibarrModules.class.php";
|
||||
|
||||
|
||||
/**
|
||||
\class modTax
|
||||
\brief Classe de description et activation du module Tax
|
||||
*/
|
||||
class modTax extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'accès base
|
||||
*/
|
||||
function modTax($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'tax'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 500 ;
|
||||
|
||||
$this->family = "financial";
|
||||
$this->name = "Taxes et charges sociales";
|
||||
$this->description = "Gestion des taxes et charges sociales";
|
||||
|
||||
$this->revision = explode(" ","$Revision$");
|
||||
$this->version = $this->revision[1];
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_TAX';
|
||||
$this->special = 0;
|
||||
$this->picto='bill';
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array();
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("compta");
|
||||
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Répertoires
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->tax->dir_output;
|
||||
$this->dirs[1] = $conf->tax->dir_images;
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'tax';
|
||||
$r=0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 91;
|
||||
$this->rights[$r][1] = 'Lire les charges';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 92;
|
||||
$this->rights[$r][1] = 'Créer modifier les charges';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 93;
|
||||
$this->rights[$r][1] = 'Supprimer les charges';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'charges';
|
||||
$this->rights[$r][5] = 'supprimer';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
|
||||
* Définit également les répertoires de données à créer pour ce module.
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction appelée lors de la désactivation d'un module.
|
||||
* Supprime de la base les constantes, boites et permissions du module.
|
||||
*/
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -136,6 +136,8 @@ Module400Name=Projects
|
||||
Module400Desc=Projects' management inside other modules
|
||||
Module410Name=Webcalendar
|
||||
Module410Desc=Webcalendar integration
|
||||
Module500Name=Taxes and social contributions
|
||||
Module500Desc=Taxes and social contributions' management
|
||||
Module700Name=Donations
|
||||
Module700Desc=Donations' management
|
||||
Module800Name=OSCommerce 1
|
||||
@ -182,9 +184,9 @@ Permission86=Send customers orders
|
||||
Permission87=Close customers orders
|
||||
Permission88=Cancel customers orders
|
||||
Permission89=Delete customers orders
|
||||
Permission91=Read charges and vat
|
||||
Permission92=Create/modify charges and vat
|
||||
Permission93=Delete charges and vat
|
||||
Permission91=Read social contributions and vat
|
||||
Permission92=Create/modify social contributions and vat
|
||||
Permission93=Delete social contributions and vat
|
||||
Permission95=Read reports
|
||||
Permission96=Setup dispatching
|
||||
Permission97=Read invoice accountancy dispatching
|
||||
|
||||
@ -136,6 +136,8 @@ Module400Name=Projets
|
||||
Module400Desc=Gestion des projets au sein des autres modules
|
||||
Module410Name=Webcalendar
|
||||
Module410Desc=Interface avec le calendrier Webcalendar
|
||||
Module500Name=Taxes et charges sociales
|
||||
Module500Desc=Gestion des taxes et charges sociales
|
||||
Module700Name=Dons
|
||||
Module700Desc=Gestion des dons
|
||||
Module800Name=OSCommerce 1
|
||||
|
||||
@ -299,6 +299,8 @@ alter table llx_accountingsystem_det rename to llx_accountingaccount;
|
||||
insert into llx_rights_def (id, libelle, module, type, bydefault, subperms, perms) values (262,'Consulter tous les clients','commercial','r',1,'voir','client');
|
||||
-- V4.1 insert into llx_user_rights(fk_user,fk_id) select distinct fk_user, '262' from llx_user_rights where fk_id = 261;
|
||||
update llx_rights_def set subperms='creer' where subperms='supprimer' AND module='user' AND perms='self' AND id=255;
|
||||
update llx_rights_def set module='tax' where module='compta' AND id in ('91','92','93');
|
||||
|
||||
|
||||
alter table llx_commandedet add column rang integer DEFAULT 0;
|
||||
alter table llx_propaldet add column rang integer DEFAULT 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user