Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop

Conflicts:
	htdocs/projet/element.php
This commit is contained in:
Laurent Destailleur 2020-02-03 02:58:45 +01:00
commit fc47fa5ec3
8 changed files with 927 additions and 793 deletions

File diff suppressed because it is too large Load Diff

View File

@ -77,17 +77,17 @@ class modLabel extends DolibarrModules
$this->rights_class = 'label';
$this->rights[1][0] = 601; // id de la permission
$this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission
$this->rights[1][1] = 'Read stickers';
$this->rights[1][3] = 1; // La permission est-elle une permission par defaut
$this->rights[1][4] = 'lire';
$this->rights[2][0] = 602; // id de la permission
$this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission
$this->rights[2][1] = 'Create/modify stickers';
$this->rights[2][3] = 0; // La permission est-elle une permission par defaut
$this->rights[2][4] = 'creer';
$this->rights[4][0] = 609; // id de la permission
$this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission
$this->rights[4][1] = 'Delete stickers';
$this->rights[4][3] = 0; // La permission est-elle une permission par defaut
$this->rights[4][4] = 'supprimer';
}

View File

@ -285,7 +285,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
DOL_URL_ROOT.'/don/list.php?leftmenu=donations'
);
// Translation lang files
$langfile=array(
$langfile = array(
"users",
"companies",
"prospects",
@ -359,89 +359,89 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
$dashboardlines = array();
// Do not include sections without management permission
require_once DOL_DOCUMENT_ROOT . '/core/class/workboardresponse.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
// Number of actions to do (late)
if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
$board = new ActionComm($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of project opened
if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$board = new Project($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of tasks to do (late)
if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
include_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
$board = new Task($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of commercial proposals opened (expired)
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$board = new Propal($db);
$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
// Number of commercial proposals CLOSED signed (billed)
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
$dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
}
// Number of commercial proposals opened (expired)
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php';
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
$board = new SupplierProposal($db);
$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
// Number of commercial proposals CLOSED signed (billed)
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
$dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
}
// Number of customer orders a deal
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$board = new Commande($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of suppliers orders a deal
if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
$board = new CommandeFournisseur($db);
$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
$dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting');
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
$dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting');
}
// Number of services enabled (delayed)
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$board = new Contrat($db);
$dashboardlines[$board->element . '_inactive'] = $board->load_board($user, "inactive");
$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
// Number of active services (expired)
$dashboardlines[$board->element . '_active'] = $board->load_board($user, "active");
$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active");
}
// Number of invoices customers (has paid)
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$board = new Facture($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of supplier invoices (has paid)
if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$board = new FactureFournisseur($db);
$dashboardlines[$board->element] = $board->load_board($user);
}
// Number of transactions to conciliate
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) {
include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$board = new Account($db);
$nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate
$nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate
if ($nb > 0) {
$dashboardlines[$board->element] = $board->load_board($user);
}
@ -449,36 +449,36 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
// Number of cheque to send
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
$board = new RemiseCheque($db);
$dashboardlines['RemiseCheque'] = $board->load_board($user);
}
// Number of foundation members
if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) {
include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$board = new Adherent($db);
$dashboardlines[$board->element . '_shift'] = $board->load_board($user, 'shift');
$dashboardlines[$board->element . '_expired'] = $board->load_board($user, 'expired');
$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
$dashboardlines[$board->element.'_expired'] = $board->load_board($user, 'expired');
}
// Number of expense reports to approve
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$board = new ExpenseReport($db);
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'toapprove');
}
// Number of expense reports to pay
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$board = new ExpenseReport($db);
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'topay');
}
// Number of holidays to approve
if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php';
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
$board = new Holiday($db);
$dashboardlines['Holiday'] = $board->load_board($user);
}
@ -877,23 +877,23 @@ print '<div class="fichecenter fichecenterbis">';
* Show boxes
*/
$boxlist.='<div class="twocolumns">';
$boxlist .= '<div class="twocolumns">';
$boxlist.='<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
if(!empty($nbworkboardcount))
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
if (!empty($nbworkboardcount))
{
$boxlist.=$boxwork;
$boxlist .= $boxwork;
}
$boxlist.=$resultboxes['boxlista'];
$boxlist .= $resultboxes['boxlista'];
$boxlist.= '</div>';
$boxlist .= '</div>';
if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
{
// Remove allready present info in new dash board
if(!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0){
if (!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0) {
foreach ($boxstatItems as $boxstatItemKey => $boxstatItemHtml) {
if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) {
unset($boxstatItems[$boxstatItemKey]);

View File

@ -45,6 +45,8 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG99-BASE', 'The base accountancy french plan', 1);
-- Description of chart of account FR PCG14-DEV
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG14-DEV', 'The developed accountancy french plan 2014', 1);
-- Description of chart of account FR PCG18-ASSOC
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
-- Description of chart of account BE PCMN-BASE
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 2, 'PCMN-BASE', 'The base accountancy belgium plan', 1);

View File

@ -28,6 +28,7 @@
-- ID 0 - 438
-- ID 1501 - 5999
-- ID 7000 - 7208
-- ADD 100000 to rowid # Do no remove this comment --
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
@ -1466,3 +1467,133 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 5964,'PCG14-DEV','INCOME','XXXXXX','791',5963,'Transferts de charges d''exploitation','1');
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 5965,'PCG14-DEV','INCOME','XXXXXX','796',5963,'Transferts de charges financières','1');
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 5966,'PCG14-DEV','INCOME','XXXXXX','797',5963,'Transferts de charges exceptionnelles','1');
--
-- Descriptif des plans comptables FR PCG18-ASSOC
--
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7201,'PCG18-ASSOC','CAPIT', 'CAPITAL', '1', '0', 'Fonds propres, emprunts et dettes assimilésFonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7202,'PCG18-ASSOC','IMMO', 'XXXXXX', '2', '0', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7203,'PCG18-ASSOC','STOCK', 'XXXXXX', '3', '0', 'Stock et commandes en cours d''exécution', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7204,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '4', '0', 'Créances et dettes à un an au plus', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7205,'PCG18-ASSOC','FINAN', 'XXXXXX', '5', '0', 'Placement de trésorerie et de valeurs disponibles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7206,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6', '0', 'Charges', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7207,'PCG18-ASSOC','INCOME', 'XXXXXX', '7', '0', 'Produits', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7208,'PCG18-ASSOC','SPECIAL', 'XXXXXX', '8', '0', 'Comptes spéciaux', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7000,'PCG18-ASSOC','CAPIT', 'XXXXXX', '10', '7201', 'Fonds propres et réserves', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7001,'PCG18-ASSOC','CAPIT', 'XXXXXX', '102', '7000', 'Fonds propres sans droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7002,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1021', '7001', 'Première situation nette établie', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7003,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1022', '7001', 'Fonds statutaires (à subdiviser en fonction des statuts)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7004,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1023', '7001', 'Dotations non consomptibles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7005,'PCG18-ASSOC','CAPIT', 'XXXXXX','10231', '7004', 'Dotations non consomptibles initiales', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7006,'PCG18-ASSOC','CAPIT', 'XXXXXX','10232', '7004', 'Dotations non consomptibles complémentaires', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7007,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1024', '7001', 'Autres fonds propres sans droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7008,'PCG18-ASSOC','CAPIT', 'XXXXXX', '103', '7000', 'Fonds propres avec droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7009,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1032', '7008', 'Fonds statutaires (à subdiviser en fonction des statuts)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7010,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1034', '7008', 'Autres fonds propres avec droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7011,'PCG18-ASSOC','CAPIT', 'XXXXXX', '105', '7000', 'Ecarts de réévaluation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7012,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1051', '7011', 'Ecarts de réévaluation sur des biens sans droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7013,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1052', '7011', 'Ecarts de réévaluation sur des biens avec droit de reprise', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7014,'PCG18-ASSOC','CAPIT', 'XXXXXX', '106', '7000', 'Réserves', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7015,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1068', '7014', 'Réserves pour projet de lentité', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7016,'PCG18-ASSOC','CAPIT', 'XXXXXX', '108', '7000', 'Dotations consomptibles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7017,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1081', '7016', 'Dotations consomptibles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7018,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1089', '7016', 'Dotations consomptibles inscrites au compte de résultat', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7019,'PCG18-ASSOC','CAPIT', 'XXXXXX', '15', '7201', 'Provisions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7020,'PCG18-ASSOC','CAPIT', 'XXXXXX', '152', '7019', 'Provisions pour charges sur legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7021,'PCG18-ASSOC','CAPIT', 'XXXXXX', '16', '7201', 'Emprunts et dettes assimilées', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7022,'PCG18-ASSOC','CAPIT', 'XXXXXX', '163', '7021', 'Autres emprunts obligataires', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7023,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1631', '7022', 'Titres associatifs et assimilés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7024,'PCG18-ASSOC','CAPIT', 'XXXXXX', '19', '7201', 'Fonds dédiés ou reportés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7025,'PCG18-ASSOC','CAPIT', 'XXXXXX', '191', '7024', 'Fonds reportés liés aux legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7026,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1911', '7025', 'Legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7027,'PCG18-ASSOC','CAPIT', 'XXXXXX', '1912', '7025', 'Donations temporaires dusufruit', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7028,'PCG18-ASSOC','CAPIT', 'XXXXXX', '194', '7024', 'Fonds dédiés sur subventions dexploitation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7029,'PCG18-ASSOC','CAPIT', 'XXXXXX', '195', '7024', 'Fonds dédiés sur contributions financières dautres organismes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7030,'PCG18-ASSOC','CAPIT', 'XXXXXX', '196', '7024', 'Fonds dédiés sur ressources liées à la générosité du public', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7031,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '20', '7202', 'Immobilisations incorporelles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7032,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '204', '7031', 'Donations temporaires dusufruit', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7033,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '24', '7202', 'Biens reçus par legs ou donations destinés à être cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7034,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '27', '7202', 'Autres immobilisations financières', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7035,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '2742', '7034', 'Prêts aux partenaires', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7036,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '28', '7202', 'Amortissements des immobilisations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7037,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '280', '7036', 'Amortissements des immobilisations incorporelles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7038,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '2804', '7037', 'Donations temporaires dusufruit', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7039,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '29', '7202', 'Dépréciations des immobilisations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7040,'PCG18-ASSOC', 'IMMO', 'XXXXXX', '294', '7039', 'Dépréciationsdes biens reçus par legs ou donations destinés à être cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7041,'PCG18-ASSOC','THIRDPARTY','CUSTOMER', '41', '7204', 'Clients, adhérents, usagers et comptes rattachés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7042,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '45', '7204', 'Confédération, fédération, union, entités affiliées', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7043,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '455', '7042', 'Partenaires - comptes courants', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7044,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '46', '7204', 'Débiteurs et créditeurs divers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7045,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '461', '7044', 'Créances reçues par legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7046,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '466', '7044', 'Dettes des legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7047,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '468', '7044', 'Divers charges à payer et produits à recevoir', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7048,'PCG18-ASSOC','THIRDPARTY', 'XXXXXX', '4681', '7047', 'Frais des bénévoles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7049,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '62', '7206', 'Autres services extérieurs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7050,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '622', '7049', 'Rémunérations dintermédiaires et honoraires', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7051,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6226', '7050', 'Honoraires', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7052,'PCG18-ASSOC','EXPENSE', 'XXXXXX','62264', '7051', 'Honoraires sur legs ou donations destinés à être cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7053,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '65', '7206', 'Autres charges de gestion courante', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7054,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '653', '7053', 'Charges de la générosité du public', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7055,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6531', '7054', 'Autres charges sur legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7056,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '657', '7053', 'Aides financières', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7057,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '67', '7206', 'Charges exceptionnelles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7058,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '673', '7057', 'Apports ou affectations en numéraire', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7059,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '675', '7057', 'Valeurs comptables des éléments dactifs cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7060,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6754', '7059', 'Immobilisations reçues par legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7061,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '68', '7206', 'Dotations aux amortissements, provisions et engagements', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7062,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6816', '7061', 'Dotations pour dépréciations des immobilisations incorporelles et corporelles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7063,'PCG18-ASSOC','EXPENSE', 'XXXXXX','68164', '7062', 'Dotations pour dépréciation dactifs reçus par legs ou donations destinés à être cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7064,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '689', '7061', 'Reports en fonds dédiés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7065,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6891', '7064', 'Reports en fonds reportés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7066,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6894', '7064', 'Reports en fonds dédiés sur subventions dexploitation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7067,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6895', '7064', 'Reports en fonds dédiés sur contributions financières dautres organismes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7068,'PCG18-ASSOC','EXPENSE', 'XXXXXX', '6896', '7064', 'Reports en fonds dédiés sur ressources liées à la générosité du public', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7069,'PCG18-ASSOC','INCOME', 'XXXXXX', '70', '7207', 'Ventes de produits fabriqués, prestations de services, marchandises', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7070,'PCG18-ASSOC','INCOME', 'SERVICE', '706', '7069', 'Ventes de prestations de services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7071,'PCG18-ASSOC','INCOME', 'SERVICE', '7063', '7070', 'Parrainages', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7072,'PCG18-ASSOC','INCOME', 'PRODUCT', '707', '7069', 'Ventes de marchandises', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7073,'PCG18-ASSOC','INCOME', 'PRODUCT', '7073', '7073', 'Ventes de dons en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7074,'PCG18-ASSOC','INCOME', 'XXXXXX', '73', '7207', 'Concours publics', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7075,'PCG18-ASSOC','INCOME', 'XXXXXX', '75', '7207', 'Autres produits de gestion courante', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7076,'PCG18-ASSOC','INCOME', 'XXXXXX', '753', '7075', 'Versements des fondateurs ou consommation de la dotation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7077,'PCG18-ASSOC','INCOME', 'XXXXXX', '7531', '7076', 'Versements des fondateurs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7078,'PCG18-ASSOC','INCOME', 'XXXXXX', '7532', '7076', 'Quotes-parts de dotation consomptible virée au compte de résultat', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7079,'PCG18-ASSOC','INCOME', 'XXXXXX', '754', '7075', 'Ressources liées à la générosité du public', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7080,'PCG18-ASSOC','INCOME', 'XXXXXX', '7541', '7079', 'Dons manuels', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7081,'PCG18-ASSOC','INCOME', 'XXXXXX','75411', '7080', 'Dons manuels', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7082,'PCG18-ASSOC','INCOME', 'XXXXXX','75412', '7080', 'Abandons de frais par les bénévoles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7083,'PCG18-ASSOC','INCOME', 'XXXXXX', '7542', '7079', 'Mécénats', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7084,'PCG18-ASSOC','INCOME', 'XXXXXX', '7543', '7079', 'Legs, donations et assurances-vie', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7085,'PCG18-ASSOC','INCOME', 'XXXXXX','75431', '7084', 'Assurances-vie', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7086,'PCG18-ASSOC','INCOME', 'XXXXXX','75432', '7084', 'Legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7087,'PCG18-ASSOC','INCOME', 'XXXXXX','75433', '7084', 'Autres produits sur legs ou donations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7088,'PCG18-ASSOC','INCOME', 'XXXXXX', '755', '7075', 'Contributions financières', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7089,'PCG18-ASSOC','INCOME', 'XXXXXX', '7551', '7088', 'Contributions financières dautres organismes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7090,'PCG18-ASSOC','INCOME', 'XXXXXX', '7552', '7088', 'Quotes-parts de générosité reçues', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7091,'PCG18-ASSOC','INCOME', 'XXXXXX', '756', '7075', 'Cotisations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7092,'PCG18-ASSOC','INCOME', 'XXXXXX', '7561', '7091', 'Cotisations sans contrepartie', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7093,'PCG18-ASSOC','INCOME', 'XXXXXX', '7562', '7091', 'Cotisations avec contrepartie', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7094,'PCG18-ASSOC','INCOME', 'XXXXXX', '757', '7075', 'Gains de change sur créances et dettes dexploitation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7095,'PCG18-ASSOC','INCOME', 'XXXXXX', '77', '7207', 'Produits exceptionnels', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7096,'PCG18-ASSOC','INCOME', 'XXXXXX', '775', '7095', 'Produits des cessions déléments dactifs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7097,'PCG18-ASSOC','INCOME', 'XXXXXX', '7754', '7096', 'Immobilisations reçues en legs ou donations destinées à être cédées', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7098,'PCG18-ASSOC','INCOME', 'XXXXXX', '78', '7207', 'Reprises sur amortissements, dépréciations et provisions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7099,'PCG18-ASSOC','INCOME', 'XXXXXX', '781', '7098', 'Reprises sur amortissements des immobilisations dépréciations et provisions (à inscrire dans les produits dexploitation)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7100,'PCG18-ASSOC','INCOME', 'XXXXXX', '7816', '7099', 'Reprises sur dépréciations des immobilisations incorporelles et corporelles', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7101,'PCG18-ASSOC','INCOME', 'XXXXXX','78164', '7100', 'Reprises sur dépréciations dactifs reçus par legs ou donations destinés à être cédés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7102,'PCG18-ASSOC','INCOME', 'XXXXXX', '789', '7098', 'Utilisations de fonds reportés et de fonds dédiés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7103,'PCG18-ASSOC','INCOME', 'XXXXXX', '7891', '7102', 'Utilisations de fonds reportés', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7104,'PCG18-ASSOC','INCOME', 'XXXXXX', '7894', '7102', 'Utilisations des fonds dédiés sur subventions dexploitation', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7105,'PCG18-ASSOC','INCOME', 'XXXXXX', '7895', '7102', 'Utilisations des fonds dédiés sur contributions financières dautres organismes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7106,'PCG18-ASSOC','INCOME', 'XXXXXX', '7896', '7102', 'Utilisations des fonds dédiés sur ressources liées à la générosité du public', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7107,'PCG18-ASSOC','INCOME', 'XXXXXX', '86', '7208', 'Emplois des contributions volontaires en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7108,'PCG18-ASSOC','INCOME', 'XXXXXX', '860', '7107', 'Secours en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7109,'PCG18-ASSOC','INCOME', 'XXXXXX', '861', '7107', 'Mises à disposition gratuite de biens', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7110,'PCG18-ASSOC','INCOME', 'XXXXXX', '862', '7107', 'Prestations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7111,'PCG18-ASSOC','INCOME', 'XXXXXX', '864', '7107', 'Personnel bénévole', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7112,'PCG18-ASSOC','INCOME', 'XXXXXX', '87', '7208', 'Contributions volontaires en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7113,'PCG18-ASSOC','INCOME', 'XXXXXX', '870', '7112', 'Dons en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7114,'PCG18-ASSOC','INCOME', 'XXXXXX', '871', '7112', 'Prestations en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7115,'PCG18-ASSOC','INCOME', 'XXXXXX', '875', '7112', 'Bénévolat', 1);

View File

@ -129,3 +129,4 @@ UPDATE llx_c_forme_juridique set libelle = 'SRL - Société à responsabilité l
ALTER TABLE llx_c_country ADD COLUMN eec integer;
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI','UK');
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);

View File

@ -57,32 +57,32 @@ if (! empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salarie
// Load translation files required by the page
$langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta'));
if (! empty($conf->facture->enabled)) $langs->load("bills");
if (! empty($conf->commande->enabled)) $langs->load("orders");
if (! empty($conf->propal->enabled)) $langs->load("propal");
if (! empty($conf->ficheinter->enabled)) $langs->load("interventions");
if (! empty($conf->deplacement->enabled)) $langs->load("trips");
if (! empty($conf->expensereport->enabled)) $langs->load("trips");
if (! empty($conf->don->enabled)) $langs->load("donations");
if (! empty($conf->loan->enabled)) $langs->load("loan");
if (! empty($conf->salaries->enabled)) $langs->load("salaries");
if (!empty($conf->facture->enabled)) $langs->load("bills");
if (!empty($conf->commande->enabled)) $langs->load("orders");
if (!empty($conf->propal->enabled)) $langs->load("propal");
if (!empty($conf->ficheinter->enabled)) $langs->load("interventions");
if (!empty($conf->deplacement->enabled)) $langs->load("trips");
if (!empty($conf->expensereport->enabled)) $langs->load("trips");
if (!empty($conf->don->enabled)) $langs->load("donations");
if (!empty($conf->loan->enabled)) $langs->load("loan");
if (!empty($conf->salaries->enabled)) $langs->load("salaries");
$id=GETPOST('id', 'int');
$ref=GETPOST('ref', 'alpha');
$action=GETPOST('action', 'alpha');
$datesrfc=GETPOST('datesrfc');
$dateerfc=GETPOST('dateerfc');
$dates=dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear'));
$datee=dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear'));
if (empty($dates) && ! empty($datesrfc)) $dates=dol_stringtotime($datesrfc);
if (empty($datee) && ! empty($dateerfc)) $datee=dol_stringtotime($dateerfc);
if (! isset($_POST['datesrfc']) && ! isset($_POST['datesday']) && ! empty($conf->global->PROJECT_LINKED_ELEMENT_DEFAULT_FILTER_YEAR))
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
$datesrfc = GETPOST('datesrfc');
$dateerfc = GETPOST('dateerfc');
$dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear'));
$datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear'));
if (empty($dates) && !empty($datesrfc)) $dates = dol_stringtotime($datesrfc);
if (empty($datee) && !empty($dateerfc)) $datee = dol_stringtotime($dateerfc);
if (!isset($_POST['datesrfc']) && !isset($_POST['datesday']) && !empty($conf->global->PROJECT_LINKED_ELEMENT_DEFAULT_FILTER_YEAR))
{
$new=dol_now();
$tmp=dol_getdate($new);
$new = dol_now();
$tmp = dol_getdate($new);
//$datee=$now
//$dates=dol_time_plus_duree($datee, -1, 'y');
$dates=dol_get_first_day($tmp['year'], 1);
$dates = dol_get_first_day($tmp['year'], 1);
}
if ($id == '' && $ref == '')
{
@ -91,18 +91,18 @@ if ($id == '' && $ref == '')
exit();
}
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0;
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
$object = new Project($db);
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments();
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments();
// Security check
$socid=$object->socid;
$socid = $object->socid;
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
$result = restrictedArea($user, 'projet', $object->id, 'projet&project');
$result = restrictedArea($user, 'projet', $object->id, 'projet&project');
$hookmanager->initHooks(array('projectOverview'));
@ -164,23 +164,23 @@ print '<tr><td class="tdtop">';
print $langs->trans("Usage");
print '</td>';
print '<td>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha')!=''?' checked="checked"':'') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("ProjectFollowOpportunity");
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
print '<br>';
}
if (empty($conf->global->PROJECT_HIDE_TASKS))
{
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha')!=''?' checked="checked"':'') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("ProjectFollowTasks");
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
print '<br>';
}
if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha')!=''?' checked="checked"':'') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("ProjectBillTimeDescription");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>';
@ -511,19 +511,19 @@ $listofreferent = array(
*/
);
$parameters=array('listofreferent'=>$listofreferent);
$parameters = array('listofreferent'=>$listofreferent);
$resHook = $hookmanager->executeHooks('completeListOfReferent', $parameters, $object, $action);
if(!empty($hookmanager->resArray)) {
if (!empty($hookmanager->resArray)) {
$listofreferent = array_merge($listofreferent, $hookmanager->resArray);
}
if ($action=="addelement")
if ($action == "addelement")
{
$tablename = GETPOST("tablename");
$elementselectid = GETPOST("elementselect");
$result=$object->update_element($tablename, $elementselectid);
if ($result<0)
$result = $object->update_element($tablename, $elementselectid);
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
}
@ -550,7 +550,7 @@ $showdatefilter = 0;
if (!$showdatefilter)
{
print '<div class="center centpercent">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
print '<input type="hidden" name="tablename" value="'.$tablename.'">';
print '<input type="hidden" name="action" value="view">';
@ -591,53 +591,53 @@ print '</tr>';
foreach ($listofreferent as $key => $value)
{
$name=$langs->trans($value['name']);
$title=$value['title'];
$classname=$value['class'];
$tablename=$value['table'];
$datefieldname=$value['datefieldname'];
$qualified=$value['test'];
$name = $langs->trans($value['name']);
$title = $value['title'];
$classname = $value['class'];
$tablename = $value['table'];
$datefieldname = $value['datefieldname'];
$qualified = $value['test'];
$margin = $value['margin'];
$project_field = $value['project_field'];
if ($qualified && isset($margin)) // If this element must be included into profit calculation ($margin is 'minus' or 'plus')
{
$element = new $classname($db);
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field)?$project_field:'fk_projet');
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field) ? $project_field : 'fk_projet');
if (count($elementarray)>0 && is_array($elementarray))
if (count($elementarray) > 0 && is_array($elementarray))
{
$total_ht = 0;
$total_ttc = 0;
$num=count($elementarray);
$num = count($elementarray);
for ($i = 0; $i < $num; $i++)
{
$tmp=explode('_', $elementarray[$i]);
$idofelement=$tmp[0];
$idofelementuser=$tmp[1];
$tmp = explode('_', $elementarray[$i]);
$idofelement = $tmp[0];
$idofelementuser = $tmp[1];
$element->fetch($idofelement);
if ($idofelementuser) $elementuser->fetch($idofelementuser);
// Define if record must be used for total or not
$qualifiedfortotal=true;
$qualifiedfortotal = true;
if ($key == 'invoice')
{
if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $element->type == Facture::TYPE_DEPOSIT) $qualifiedfortotal=false; // If hidden option to use deposits as payment (deprecated, not recommended to use this), deposits are not included
if (!empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal = false; // Replacement invoice, do not include into total
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $element->type == Facture::TYPE_DEPOSIT) $qualifiedfortotal = false; // If hidden option to use deposits as payment (deprecated, not recommended to use this), deposits are not included
}
if ($key == 'propal')
{
if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal=false; // Refused proposal must not be included in total
if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal = false; // Refused proposal must not be included in total
}
if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty();
// Define $total_ht_by_line
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount;
elseif ($tablename == 'fichinter') $total_ht_by_line=$element->getAmount();
elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty);
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line = $element->amount;
elseif ($tablename == 'fichinter') $total_ht_by_line = $element->getAmount();
elseif ($tablename == 'stock_mouvement') $total_ht_by_line = $element->price * abs($element->qty);
elseif ($tablename == 'projet_task')
{
if ($idofelementuser)
@ -788,49 +788,49 @@ foreach ($listofreferent as $key => $value)
$element = new $classname($db);
$addform='';
$addform = '';
$idtofilterthirdparty=0;
$idtofilterthirdparty = 0;
$array_of_element_linkable_with_different_thirdparty = array('facture_fourn', 'commande_fournisseur');
if (! in_array($tablename, $array_of_element_linkable_with_different_thirdparty))
if (!in_array($tablename, $array_of_element_linkable_with_different_thirdparty))
{
$idtofilterthirdparty=$object->thirdparty->id;
if (! empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty.=','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS;
$idtofilterthirdparty = $object->thirdparty->id;
if (!empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty .= ','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS;
}
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, $exclude_select_element))
{
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300', -2, !empty($project_field)?$project_field:'fk_projet');
if ($selectList<0)
$selectList = $formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300', -2, !empty($project_field) ? $project_field : 'fk_projet');
if ($selectList < 0)
{
setEventMessages($formproject->error, $formproject->errors, 'errors');
}
elseif($selectList)
elseif ($selectList)
{
// Define form with the combo list of elements to link
$addform.='<div class="inline-block valignmiddle">';
$addform.='<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
$addform.='<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
$addform.='<input type="hidden" name="tablename" value="'.$tablename.'">';
$addform.='<input type="hidden" name="action" value="addelement">';
$addform.='<input type="hidden" name="datesrfc" value="'.dol_print_date($dates, 'dayhourrfc').'">';
$addform.='<input type="hidden" name="dateerfc" value="'.dol_print_date($datee, 'dayhourrfc').'">';
$addform.='<table><tr><td>'.$langs->trans("SelectElement").'</td>';
$addform.='<td>'.$selectList.'</td>';
$addform.='<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
$addform.='</tr></table>';
$addform.='</form>';
$addform.='</div>';
$addform .= '<div class="inline-block valignmiddle">';
$addform .= '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
$addform .= '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
$addform .= '<input type="hidden" name="tablename" value="'.$tablename.'">';
$addform .= '<input type="hidden" name="action" value="addelement">';
$addform .= '<input type="hidden" name="datesrfc" value="'.dol_print_date($dates, 'dayhourrfc').'">';
$addform .= '<input type="hidden" name="dateerfc" value="'.dol_print_date($datee, 'dayhourrfc').'">';
$addform .= '<table><tr><td>'.$langs->trans("SelectElement").'</td>';
$addform .= '<td>'.$selectList.'</td>';
$addform .= '<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
$addform .= '</tr></table>';
$addform .= '</form>';
$addform .= '</div>';
}
}
if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew)
{
$addform.='<div class="inline-block valignmiddle">';
if ($testnew) $addform.='<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
$addform .= '<div class="inline-block valignmiddle">';
if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
$addform.='<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
}
$addform.='<div>';
$addform .= '<div>';
}
print load_fiche_titre($langs->trans($title), $addform, '');
@ -856,7 +856,7 @@ foreach ($listofreferent as $key => $value)
else print $langs->trans("ThirdParty");
print '</td>';
// Duration of intervention
if($tablename == 'fichinter')
if ($tablename == 'fichinter')
{
print '<td>';
print $langs->trans("TotalDuration");
@ -946,7 +946,7 @@ foreach ($listofreferent as $key => $value)
{
if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
{
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element->id . ($project_field ? '&projectfield=' . $project_field : '') . '" class="reposition">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unlink&tablename='.$tablename.'&elementselect='.$element->id.($project_field ? '&projectfield='.$project_field : '').'" class="reposition">';
print img_picto($langs->trans('Unlink'), 'unlink');
print '</a>';
}
@ -1072,7 +1072,7 @@ foreach ($listofreferent as $key => $value)
print '</td>';
// Add duration and store it in counter for fichinter
if($tablename == 'fichinter')
if ($tablename == 'fichinter')
{
print '<td>';
print convertSecondToTime($element->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
@ -1125,9 +1125,9 @@ foreach ($listofreferent as $key => $value)
if ($othermessage) print $othermessage;
if (isset($total_ht_by_line))
{
if (! $qualifiedfortotal) print '<strike>';
if (!$qualifiedfortotal) print '<strike>';
print price($total_ht_by_line);
if (! $qualifiedfortotal) print '</strike>';
if (!$qualifiedfortotal) print '</strike>';
}
if ($warning) print ' '.img_warning($warning);
print '</td>';
@ -1173,9 +1173,9 @@ foreach ($listofreferent as $key => $value)
if ($othermessage) print $othermessage;
if (isset($total_ttc_by_line))
{
if (! $qualifiedfortotal) print '<strike>';
if (!$qualifiedfortotal) print '<strike>';
print price($total_ttc_by_line);
if (! $qualifiedfortotal) print '</strike>';
if (!$qualifiedfortotal) print '</strike>';
}
if ($warning) print ' '.img_warning($warning);
print '</td>';
@ -1260,7 +1260,7 @@ foreach ($listofreferent as $key => $value)
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
// If fichinter add the total_duration
if($tablename == 'fichinter') print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
if ($tablename == 'fichinter') print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
print '<td class="right">';
if (empty($value['disableamount']))
{

View File

@ -1420,16 +1420,16 @@ class User extends CommonObject
$result = $this->create($user);
if ($result > 0)
{
if (! empty($this->pass)) { // If a clear password was received (this situation should not happen anymore now), we use it to save it into database
if (!empty($this->pass)) { // If a clear password was received (this situation should not happen anymore now), we use it to save it into database
$newpass = $this->setPassword($user, $this->pass);
if (is_numeric($newpass) && $newpass < 0) $result = -2;
} elseif (! empty($this->pass_crypted)) { // If a crypted password is already known, we save it directly into database because the previous create did not save it.
} elseif (!empty($this->pass_crypted)) { // If a crypted password is already known, we save it directly into database because the previous create did not save it.
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql .= " SET pass_crypted = '".$this->db->escape($this->pass_crypted)."'";
$sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql);
if (! $resql)
if (!$resql)
{
$result = -1;
}