FIX #7567
This commit is contained in:
parent
d07ec07896
commit
d808add499
@ -53,6 +53,7 @@ UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for int
|
|||||||
InterventionStatistics=Statistics of interventions
|
InterventionStatistics=Statistics of interventions
|
||||||
NbOfinterventions=Nb of intervention cards
|
NbOfinterventions=Nb of intervention cards
|
||||||
NumberOfInterventionsByMonth=Nb of intervention cards by month (date of validation)
|
NumberOfInterventionsByMonth=Nb of intervention cards by month (date of validation)
|
||||||
|
AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit. Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them.
|
||||||
##### Exports #####
|
##### Exports #####
|
||||||
InterId=Intervention id
|
InterId=Intervention id
|
||||||
InterRef=Intervention ref.
|
InterRef=Intervention ref.
|
||||||
|
|||||||
@ -610,7 +610,14 @@ foreach ($listofreferent as $key => $value)
|
|||||||
if ($qualifiedfortotal) $total_ttc = $total_ttc + $total_ttc_by_line;
|
if ($qualifiedfortotal) $total_ttc = $total_ttc + $total_ttc_by_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Each element with at least one line is output
|
||||||
|
$qualifiedforfinalprofit=true;
|
||||||
|
if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit=false;
|
||||||
|
//var_dump($key);
|
||||||
|
|
||||||
// Calculate margin
|
// Calculate margin
|
||||||
|
if ($qualifiedforfinalprofit)
|
||||||
|
{
|
||||||
if ($margin=="add")
|
if ($margin=="add")
|
||||||
{
|
{
|
||||||
$balance_ht+= $total_ht;
|
$balance_ht+= $total_ht;
|
||||||
@ -628,6 +635,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$total_ht = -$total_ht;
|
$total_ht = -$total_ht;
|
||||||
$total_ttc = -$total_ttc;
|
$total_ttc = -$total_ttc;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*switch ($classname) {
|
/*switch ($classname) {
|
||||||
case 'FactureFournisseur':
|
case 'FactureFournisseur':
|
||||||
@ -655,16 +663,21 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$newclassname = $classname;
|
$newclassname = $classname;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
// Module
|
// Module
|
||||||
print '<td align="left">'.$name.'</td>';
|
print '<td align="left">'.$name.'</td>';
|
||||||
// Nb
|
// Nb
|
||||||
print '<td align="right">'.$i.'</td>';
|
print '<td align="right">'.$i.'</td>';
|
||||||
// Amount HT
|
// Amount HT
|
||||||
print '<td align="right">'.price($total_ht).'</td>';
|
print '<td align="right">';
|
||||||
|
if (! $qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||||
|
else print price($total_ht);
|
||||||
|
print '</td>';
|
||||||
// Amount TTC
|
// Amount TTC
|
||||||
print '<td align="right">'.price($total_ttc).'</td>';
|
print '<td align="right">';
|
||||||
|
if (! $qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||||
|
else print price($total_ttc);
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user