Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
22478e4867
@ -2030,9 +2030,22 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole)
|
|||||||
function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array())
|
function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array())
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user, $bc;
|
global $langs, $conf, $user, $bc;
|
||||||
|
global $theme_datacolor;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
|
$listofstatus = array_keys($listofoppstatus);
|
||||||
|
$statusOppList = array();
|
||||||
|
$themeColorId = 0;
|
||||||
|
foreach ($listofstatus as $oppStatus) {
|
||||||
|
$oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code');
|
||||||
|
if ($oppStatusCode) {
|
||||||
|
$statusOppList[$oppStatus]['code'] = $oppStatusCode;
|
||||||
|
$statusOppList[$oppStatus]['color'] = isset($theme_datacolor[$themeColorId]) ? implode(', ', $theme_datacolor[$themeColorId]) : '';
|
||||||
|
}
|
||||||
|
$themeColorId++;
|
||||||
|
}
|
||||||
|
|
||||||
$projectstatic = new Project($db);
|
$projectstatic = new Project($db);
|
||||||
$thirdpartystatic = new Societe($db);
|
$thirdpartystatic = new Societe($db);
|
||||||
|
|
||||||
@ -2109,14 +2122,14 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
if (empty($arrayidofprojects)) $arrayidofprojects[0] = -1;
|
if (empty($arrayidofprojects)) $arrayidofprojects[0] = -1;
|
||||||
|
|
||||||
// Get list of project with calculation on tasks
|
// Get list of project with calculation on tasks
|
||||||
$sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount,";
|
$sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_percent, p.opp_amount,";
|
||||||
$sql2 .= " p.dateo, p.datee,";
|
$sql2 .= " p.dateo, p.datee,";
|
||||||
$sql2 .= " COUNT(t.rowid) as nb, SUM(t.planned_workload) as planned_workload, SUM(t.planned_workload * t.progress / 100) as declared_progess_workload";
|
$sql2 .= " COUNT(t.rowid) as nb, SUM(t.planned_workload) as planned_workload, SUM(t.planned_workload * t.progress / 100) as declared_progess_workload";
|
||||||
$sql2 .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
$sql2 .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
$sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
$sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
||||||
$sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
|
$sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
|
||||||
$sql2 .= " WHERE p.rowid IN (".join(',', $arrayidofprojects).")";
|
$sql2 .= " WHERE p.rowid IN (".join(',', $arrayidofprojects).")";
|
||||||
$sql2 .= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount, p.dateo, p.datee";
|
$sql2 .= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee";
|
||||||
$sql2 .= " ORDER BY p.title, p.ref";
|
$sql2 .= " ORDER BY p.title, p.ref";
|
||||||
|
|
||||||
$resql = $db->query($sql2);
|
$resql = $db->query($sql2);
|
||||||
@ -2135,7 +2148,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
print_liste_field_titre("OpportunityAmount", "", "", "", "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("OpportunityAmount", "", "", "", "", 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("OpportunityStatus", "", "", "", "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('OpportunityWeightedAmount', '', '', '', '', 'align="right"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
{
|
{
|
||||||
@ -2187,8 +2200,11 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
if ($objp->opp_amount) print price($objp->opp_amount, 0, '', 1, -1, -1, $conf->currency);
|
if ($objp->opp_amount) print price($objp->opp_amount, 0, '', 1, -1, -1, $conf->currency);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
$code = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
|
if ($objp->opp_percent && $objp->opp_amount) {
|
||||||
if ($code) print $langs->trans("OppStatus".$code);
|
$opp_weighted_amount = $objp->opp_percent * $objp->opp_amount / 100;
|
||||||
|
print price($opp_weighted_amount, 0, '', 1, -1, -1, $conf->currency);
|
||||||
|
$ponderated_opp_amount += price2num($opp_weighted_amount);
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
@ -2212,12 +2228,27 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="right">'.$projectstatic->getLibStatut(3).'</td>';
|
print '<td class="right">';
|
||||||
|
//print $projectstatic->getLibStatut(3);
|
||||||
|
if (isset($statusOppList[$objp->opp_status])) {
|
||||||
|
$oppStatusCode = $statusOppList[$objp->opp_status]['code'];
|
||||||
|
$oppStatusColor = $statusOppList[$objp->opp_status]['color'];
|
||||||
|
} else {
|
||||||
|
$oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||||
|
$oppStatusColor = '';
|
||||||
|
}
|
||||||
|
if ($oppStatusCode) {
|
||||||
|
if (!empty($oppStatusColor)) {
|
||||||
|
print '<a href="' . dol_buildpath('/projet/list.php?search_opp_status=' . $objp->opp_status, 1) . '" style="display: inline-block; width: 4px; border: 5px solid rgb(' . $oppStatusColor . '); border-radius: 2px;" title="' . $langs->trans("OppStatus" . $oppStatusCode) . '"></a>';
|
||||||
|
} else {
|
||||||
|
print '<a href="' . dol_buildpath('/projet/list.php?search_opp_status=' . $objp->opp_status, 1) . '" title="' . $langs->trans("OppStatus".$oppStatusCode) . '">' . $oppStatusCode . '</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total_task = $total_task + $objp->nb;
|
$total_task = $total_task + $objp->nb;
|
||||||
$total_opp_amount = $total_opp_amount + $objp->opp_amount;
|
$total_opp_amount = $total_opp_amount + $objp->opp_amount;
|
||||||
$ponderated_opp_amount = $ponderated_opp_amount + price2num($listofoppstatus[$objp->opp_status] * $objp->opp_amount / 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -3,6 +3,20 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<title>Reçu au titre des dons à certains organismes d’intérêt général</title>
|
<title>Reçu au titre des dons à certains organismes d’intérêt général</title>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.tdtop {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.justify {
|
||||||
|
text-align: justify;
|
||||||
|
text-justify: inter-word;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
position: relative;
|
||||||
|
left: 130mm;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="font-size:16px;">
|
<body style="font-size:16px;">
|
||||||
<div style="height: 297mm; width: 210mm; page-break-inside: avoid;">
|
<div style="height: 297mm; width: 210mm; page-break-inside: avoid;">
|
||||||
@ -10,14 +24,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="20%" class="nowrap center" valign="middle" align="center">
|
<td width="20%" class="nowrap center" valign="middle" align="center">
|
||||||
<img src="./theme/common/logo_cerfa.png" width="70px"/><br>
|
<img src="./theme/common/logo_cerfa.png" width="70px"/><br>
|
||||||
<font><b>N° 11580*03</b><br>
|
<font><b>N° 11580*04</b><br>
|
||||||
DGFIP
|
DGFIP
|
||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
<td class="nowrap" align="center" valign="middle">
|
<td class="nowrap" align="center" valign="middle">
|
||||||
<font size="+2"><b>Reçu au titre des dons<br>
|
<font size="+2"><b>Reçu au titre des dons<br>
|
||||||
à certains organismes d’intérêt général</b></font><br>
|
à certains organismes d’intérêt général</b></font><br>
|
||||||
Articles 200, 238 bis et 885-0 V bis A du code général des impôts (CGI)
|
Articles 200, 238 bis et 978 du code général des impôts (CGI)
|
||||||
</td>
|
</td>
|
||||||
<td width="20%" class="nowrap" align="center" valign="middle">
|
<td width="20%" class="nowrap" align="center" valign="middle">
|
||||||
Numéro d'ordre du reçu<br>
|
Numéro d'ordre du reçu<br>
|
||||||
@ -46,13 +60,13 @@
|
|||||||
__MAIN_INFO_SOCIETE_NOM__<br>
|
__MAIN_INFO_SOCIETE_NOM__<br>
|
||||||
<font size="+1"><b>Adresse :</b></font><br>
|
<font size="+1"><b>Adresse :</b></font><br>
|
||||||
__MAIN_INFO_SOCIETE_ADDRESS__<br>
|
__MAIN_INFO_SOCIETE_ADDRESS__<br>
|
||||||
<font size="+1"><b>Code postal </b></font> __MAIN_INFO_SOCIETE_ZIP__ <font size="+1"><b>Commune </b></font> __MAIN_INFO_SOCIETE_TOWN__<br>
|
<font size="+1">Code postal </font> __MAIN_INFO_SOCIETE_ZIP__ <font size="+1">Commune </font> __MAIN_INFO_SOCIETE_TOWN__<br>
|
||||||
<font size="+1"><b>Objet:</b></font><br>
|
<font size="+1"><b>Objet:</b></font><br>
|
||||||
__MAIN_INFO_SOCIETE_OBJECT__
|
__MAIN_INFO_SOCIETE_OBJECT__
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="justify">
|
||||||
<hr>
|
<hr>
|
||||||
<font size="+1"><b>Cochez la case concernée (1) :</b></font><br>
|
<font size="+1"><b>Cochez la case concernée (1) :</b></font><br>
|
||||||
<table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3">
|
<table width="100%" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="3">
|
||||||
@ -90,7 +104,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdtop"><INPUT type="checkbox"></td>
|
<td class="tdtop"><INPUT type="checkbox"></td>
|
||||||
<td>Association cultuelle ou de bienfaisance et établissement public des cultes reconnus d'Alsace-Moselle</td>
|
<td>Association cultuelle ou de bienfaisance et établissement public reconnus d'Alsace-Moselle</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdtop"><INPUT type="checkbox"></td>
|
<td class="tdtop"><INPUT type="checkbox"></td>
|
||||||
@ -138,7 +152,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdtop"><INPUT type="checkbox"></td>
|
<td class="tdtop"><INPUT type="checkbox"></td>
|
||||||
<td>Autre organisme : ………………………………………………………………………………………………</td>
|
<td>Autres organismes : ………………………………………………………………………………………………</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@ -217,7 +231,7 @@
|
|||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td width="33%">__ARTICLE200__</td>
|
<td width="33%">__ARTICLE200__</td>
|
||||||
<td width="33%">__ARTICLE238__</td>
|
<td width="33%">__ARTICLE238__</td>
|
||||||
<td width="33%">__ARTICLE885__</td>
|
<td width="33%">__ARTICLE978__</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<hr>
|
<hr>
|
||||||
@ -251,7 +265,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdtop">(3)</td>
|
<td class="tdtop">(3)</td>
|
||||||
<td>
|
<td class="justify">
|
||||||
L’organisme bénéficiaire peut cocher une ou plusieurs cases.<br>
|
L’organisme bénéficiaire peut cocher une ou plusieurs cases.<br>
|
||||||
L’organisme bénéficiaire peut, en application de l’article L. 80 C du livre des procédures fiscales, demander à l’administration s’il relève
|
L’organisme bénéficiaire peut, en application de l’article L. 80 C du livre des procédures fiscales, demander à l’administration s’il relève
|
||||||
de l’une des catégories d’organismes mentionnées aux articles 200 et 238 bis du code général des impôts.<br>
|
de l’une des catégories d’organismes mentionnées aux articles 200 et 238 bis du code général des impôts.<br>
|
||||||
@ -262,7 +276,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdtop">(4)</td>
|
<td class="tdtop">(4)</td>
|
||||||
<td>
|
<td class="justify">
|
||||||
Notamment : abandon de revenus ou de produits ; frais engagés par les bénévoles, dont ils renoncent expressément au remboursement<br>
|
Notamment : abandon de revenus ou de produits ; frais engagés par les bénévoles, dont ils renoncent expressément au remboursement<br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -274,10 +288,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr align="center">
|
<tr>
|
||||||
<td class="right">
|
<td class="right">
|
||||||
<table width="27%" border="0" cellspacing="0" cellpadding="1">
|
<table width="30%" border="0" cellspacing="0" cellpadding="1">
|
||||||
<tr><td align="center">Date et signature<br><br></td></tr>
|
<tr><td align="center">Date et signature<br></td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<table border="1" cellspacing="0" cellpadding="1" bgcolor="#000000" width="100%">
|
<table border="1" cellspacing="0" cellpadding="1" bgcolor="#000000" width="100%">
|
||||||
<tr><td valign="bottom" align="center">
|
<tr><td valign="bottom" align="center">
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2014-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com>
|
* Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -46,7 +46,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "cerfafr";
|
$this->name = "cerfafr";
|
||||||
$this->description = $langs->trans('DonationsReceiptModel').' - fr_FR - Cerfa 11580*03';
|
$this->description = $langs->trans('DonationsReceiptModel').' - fr_FR - Cerfa 11580*04';
|
||||||
|
|
||||||
// Dimension page for size A4
|
// Dimension page for size A4
|
||||||
$this->type = 'html';
|
$this->type = 'html';
|
||||||
@ -150,11 +150,11 @@ class html_cerfafr extends ModeleDon
|
|||||||
/*
|
/*
|
||||||
if (empty($don->societe))
|
if (empty($don->societe))
|
||||||
{
|
{
|
||||||
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" checked="checked" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 885-0 V bis A du CGI</td>';
|
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" checked="checked" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 978 du CGI</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" checked="checked" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 885-0 V bis A du CGI</td>';
|
$CodeDon = '<td width="33%"><input type="checkbox" disabled="true" > 200 du CGI</td><td width="33%"><input type="checkbox" disabled="true" checked="checked" > 238 bis du CGI</td><td width="33%"><input type="checkbox" disabled="true" > 978 du CGI</td>';
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
$form = str_replace('__ModePaiement__', $ModePaiement, $form);
|
$form = str_replace('__ModePaiement__', $ModePaiement, $form);
|
||||||
|
|
||||||
$frencharticle='';
|
$frencharticle='';
|
||||||
if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencharticle='<font size="+1">Article 200, 238 bis et 885-0 V bis A du code général des impôts (CGI)</font>';
|
if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencharticle='<font size="+1">Article 200, 238 bis et 978 du code général des impôts (CGI)</font>';
|
||||||
$form = str_replace('__FrenchArticle__', $frencharticle, $form);
|
$form = str_replace('__FrenchArticle__', $frencharticle, $form);
|
||||||
|
|
||||||
$frencheligibility='';
|
$frencheligibility='';
|
||||||
@ -237,18 +237,18 @@ class html_cerfafr extends ModeleDon
|
|||||||
}
|
}
|
||||||
$form = str_replace('__ARTICLE238__', $art238, $form);
|
$form = str_replace('__ARTICLE238__', $art238, $form);
|
||||||
|
|
||||||
$art885='';
|
$art978='';
|
||||||
if (preg_match('/fr/i', $outputlangs->defaultlang)) {
|
if (preg_match('/fr/i', $outputlangs->defaultlang)) {
|
||||||
if ($conf->global->DONATION_ART885 >= 1)
|
if ($conf->global->DONATION_ART978 >= 1)
|
||||||
{
|
{
|
||||||
$art885='<input type="checkbox" disabled="true" checked="checked" >885-0 V bis du CGI';
|
$art978='<input type="checkbox" disabled="true" checked="checked" >978 du CGI';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$art885='<input type="checkbox" disabled="true">885-0 V bis du CGI';
|
$art978='<input type="checkbox" disabled="true">978 du CGI';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$form = str_replace('__ARTICLE885__', $art885, $form);
|
$form = str_replace('__ARTICLE978__', $art978, $form);
|
||||||
|
|
||||||
// Save file on disk
|
// Save file on disk
|
||||||
dol_syslog("html_cerfafr::write_file $file");
|
dol_syslog("html_cerfafr::write_file $file");
|
||||||
|
|||||||
@ -91,10 +91,10 @@ class modDon extends DolibarrModules
|
|||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->const[$r][0] = "DONATION_ART885";
|
$this->const[$r][0] = "DONATION_ART978";
|
||||||
$this->const[$r][1] = "yesno";
|
$this->const[$r][1] = "yesno";
|
||||||
$this->const[$r][2] = "0";
|
$this->const[$r][2] = "0";
|
||||||
$this->const[$r][3] = 'Option Française - Eligibilité Art885-0 V bis du CGI';
|
$this->const[$r][3] = 'Option Française - Eligibilité Art978 du CGI';
|
||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012-2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2015 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com>
|
* Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com>
|
||||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
@ -431,13 +431,13 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td width="80%">'.$langs->trans("DONATION_ART885").'</td>';
|
print '<td width="80%">'.$langs->trans("DONATION_ART978").'</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('DONATION_ART885');
|
print ajax_constantonoff('DONATION_ART978');
|
||||||
} else {
|
} else {
|
||||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
print $form->selectarray("DONATION_ART885", $arrval, $conf->global->DONATION_ART885);
|
print $form->selectarray("DONATION_ART978", $arrval, $conf->global->DONATION_ART978);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|||||||
@ -163,3 +163,4 @@ INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, desc
|
|||||||
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
|
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
|
||||||
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);
|
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);
|
||||||
|
|
||||||
|
DELETE FROM llx_const WHERE name = __ENCRYPT('DONATION_ART885')__;
|
||||||
@ -164,6 +164,8 @@ OpportunityProbability=Lead probability
|
|||||||
OpportunityProbabilityShort=Lead probab.
|
OpportunityProbabilityShort=Lead probab.
|
||||||
OpportunityAmount=Lead amount
|
OpportunityAmount=Lead amount
|
||||||
OpportunityAmountShort=Lead amount
|
OpportunityAmountShort=Lead amount
|
||||||
|
OpportunityWeightedAmount=Opportunity weighted amount
|
||||||
|
OpportunityWeightedAmountShort=Opp. weighted amount
|
||||||
OpportunityAmountAverageShort=Average lead amount
|
OpportunityAmountAverageShort=Average lead amount
|
||||||
OpportunityAmountWeigthedShort=Weighted lead amount
|
OpportunityAmountWeigthedShort=Weighted lead amount
|
||||||
WonLostExcluded=Won/Lost excluded
|
WonLostExcluded=Won/Lost excluded
|
||||||
|
|||||||
@ -163,6 +163,8 @@ OpportunityProbability=Probabilité d'opportunité
|
|||||||
OpportunityProbabilityShort=Prob. opp.
|
OpportunityProbabilityShort=Prob. opp.
|
||||||
OpportunityAmount=Montant opportunité
|
OpportunityAmount=Montant opportunité
|
||||||
OpportunityAmountShort=Montant opportunité
|
OpportunityAmountShort=Montant opportunité
|
||||||
|
OpportunityWeightedAmount=Montant pondéré opportunité
|
||||||
|
OpportunityWeightedAmountShort=Montant pondéré opp.
|
||||||
OpportunityAmountAverageShort=montant moyen des opportunités
|
OpportunityAmountAverageShort=montant moyen des opportunités
|
||||||
OpportunityAmountWeigthedShort=Montant pondéré des opportunités
|
OpportunityAmountWeigthedShort=Montant pondéré des opportunités
|
||||||
WonLostExcluded=hors opportunités remportées/perdues
|
WonLostExcluded=hors opportunités remportées/perdues
|
||||||
|
|||||||
@ -273,11 +273,14 @@ class PriceParser
|
|||||||
//Get the supplier min price
|
//Get the supplier min price
|
||||||
$productFournisseur = new ProductFournisseur($this->db);
|
$productFournisseur = new ProductFournisseur($this->db);
|
||||||
$res = $productFournisseur->find_min_price_product_fournisseur($product->id, 0, 0);
|
$res = $productFournisseur->find_min_price_product_fournisseur($product->id, 0, 0);
|
||||||
if ($res < 1) {
|
if ($res < 0) {
|
||||||
$this->error_parser = array(25, null);
|
$this->error_parser = array(25, null);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} elseif($res == 0){
|
||||||
|
$supplier_min_price = 0;
|
||||||
|
} else {
|
||||||
$supplier_min_price = $productFournisseur->fourn_unitprice;
|
$supplier_min_price = $productFournisseur->fourn_unitprice;
|
||||||
|
}
|
||||||
|
|
||||||
//Accessible values by expressions
|
//Accessible values by expressions
|
||||||
$extra_values = array_merge($extra_values, array(
|
$extra_values = array_merge($extra_values, array(
|
||||||
|
|||||||
@ -377,7 +377,7 @@ class MouvementStock extends CommonObject
|
|||||||
{
|
{
|
||||||
$fk_project = 0;
|
$fk_project = 0;
|
||||||
if(!empty($this->origin)) { // This is set by caller for tracking reason
|
if(!empty($this->origin)) { // This is set by caller for tracking reason
|
||||||
$origintype = $this->origin->element;
|
$origintype = empty($this->origin->origin_type)?$this->origin->element:$this->origin->origin_type;
|
||||||
$fk_origin = $this->origin->id;
|
$fk_origin = $this->origin->id;
|
||||||
if ($origintype == 'project') $fk_project = $fk_origin;
|
if ($origintype == 'project') $fk_project = $fk_origin;
|
||||||
else
|
else
|
||||||
@ -981,10 +981,14 @@ class MouvementStock extends CommonObject
|
|||||||
default:
|
default:
|
||||||
if ($origintype)
|
if ($origintype)
|
||||||
{
|
{
|
||||||
$result = dol_include_once('/'.$origintype.'/class/'.$origintype.'.class.php');
|
// Separate originetype with "@" : left part is class name, right part is module name
|
||||||
|
$origintype_array = explode('@', $origintype);
|
||||||
|
$classname = ucfirst($origintype_array[0]);
|
||||||
|
$modulename = empty($origintype_array[1]) ? $classname : empty($origintype_array[1]);
|
||||||
|
$result=dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php');
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$classname = ucfirst($origintype);
|
$classname = ucfirst($classname);
|
||||||
$origin = new $classname($this->db);
|
$origin = new $classname($this->db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1048,6 +1048,11 @@ elseif ($object->id > 0)
|
|||||||
}*/
|
}*/
|
||||||
if (strcmp($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency);
|
if (strcmp($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Opportunity Weighted Amount
|
||||||
|
print '<tr><td>'.$langs->trans('OpportunityWeightedAmount').'</td><td>';
|
||||||
|
if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
|
|||||||
@ -131,6 +131,7 @@ $arrayfields = array(
|
|||||||
'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>103),
|
'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>103),
|
||||||
'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>104),
|
'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>104),
|
||||||
'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>105),
|
'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>105),
|
||||||
|
'opp_weighted_amount'=>array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>106),
|
||||||
'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110),
|
'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110),
|
||||||
'p.usage_opportunity'=>array('label'=>$langs->trans("UsageOpportunity"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>115),
|
'p.usage_opportunity'=>array('label'=>$langs->trans("UsageOpportunity"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES ? 1 : 0), 'position'=>115),
|
||||||
'p.usage_task'=>array('label'=>$langs->trans("UsageTasks"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_HIDE_TASKS ? 0 : 1), 'position'=>116),
|
'p.usage_task'=>array('label'=>$langs->trans("UsageTasks"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_HIDE_TASKS ? 0 : 1), 'position'=>116),
|
||||||
@ -289,7 +290,7 @@ if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; /
|
|||||||
|
|
||||||
$distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
|
$distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
|
||||||
$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut, p.fk_opp_status, p.public, p.fk_user_creat";
|
$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut, p.fk_opp_status, p.public, p.fk_user_creat";
|
||||||
$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount, p.usage_opportunity, p.usage_task, p.usage_bill_time";
|
$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount, p.usage_opportunity, p.usage_task, p.usage_bill_time";
|
||||||
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
||||||
$sql .= ", cls.code as opp_status_code";
|
$sql .= ", cls.code as opp_status_code";
|
||||||
// We'll need these fields in order to filter by categ
|
// We'll need these fields in order to filter by categ
|
||||||
@ -604,6 +605,11 @@ if (!empty($arrayfields['p.opp_percent']['checked']))
|
|||||||
print '<input type="text" class="flat" name="search_opp_percent" size="2" value="'.$search_opp_percent.'">';
|
print '<input type="text" class="flat" name="search_opp_percent" size="2" value="'.$search_opp_percent.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
if (!empty($arrayfields['opp_weighted_amount']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre nowrap right">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['p.budget_amount']['checked']))
|
if (!empty($arrayfields['p.budget_amount']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre nowrap right">';
|
print '<td class="liste_titre nowrap right">';
|
||||||
@ -676,7 +682,8 @@ if (!empty($arrayfields['p.datee']['checked'])) print_liste_field_titre(
|
|||||||
if (!empty($arrayfields['p.public']['checked'])) print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['p.public']['checked'])) print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center ');
|
if (!empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (!empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER['PHP_SELF'], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
if (!empty($arrayfields['opp_weighted_amount']['checked'])) print_liste_field_titre($arrayfields['opp_weighted_amount']['label'], $_SERVER['PHP_SELF'], 'opp_weighted_amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['p.usage_opportunity']['checked'])) print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['p.usage_opportunity']['checked'])) print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (!empty($arrayfields['p.usage_task']['checked'])) print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right ');
|
if (!empty($arrayfields['p.usage_task']['checked'])) print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
@ -694,7 +701,10 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array(
|
||||||
|
'nbfield' => 0,
|
||||||
|
'val' => array(),
|
||||||
|
);
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -848,6 +858,19 @@ while ($i < min($num, $limit))
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
// Opp weighted amount
|
||||||
|
if (!empty($arrayfields['opp_weighted_amount']['checked']))
|
||||||
|
{
|
||||||
|
if (!isset($totalarray['val']['opp_weighted_amount'])) $totalarray['val']['opp_weighted_amount'] = 0;
|
||||||
|
print '<td align="right">';
|
||||||
|
if ($obj->opp_weighted_amount) {
|
||||||
|
print price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '');
|
||||||
|
$totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount;
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
if (! $i) $totalarray['pos'][$totalarray['nbfield']] = 'opp_weighted_amount';
|
||||||
|
}
|
||||||
// Budget
|
// Budget
|
||||||
if (! empty($arrayfields['p.budget_amount']['checked']))
|
if (! empty($arrayfields['p.budget_amount']['checked']))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user