';
@@ -851,8 +858,7 @@ foreach ($listofreferent as $key => $value)
$expensereport->fetch($element->fk_expensereport);
}
- //print 'xxx'.$tablename;
- //print $classname;
+ //print 'xxx'.$tablename.'yyy'.$classname;
if ($breakline && $saved_third_id != $element->thirdparty->id)
{
@@ -1027,6 +1033,16 @@ foreach ($listofreferent as $key => $value)
{
$total_ht_by_line=$element->total_ht;
}
+
+ // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases
+ if ($tablename == 'payment_various')
+ {
+ if ($element->sens == 0)
+ {
+ $total_ht_by_line = -$total_ht_by_line;
+ }
+ }
+
print '| ';
if ($othermessage) print $othermessage;
if (isset($total_ht_by_line))
@@ -1064,6 +1080,16 @@ foreach ($listofreferent as $key => $value)
{
$total_ttc_by_line=$element->total_ttc;
}
+
+ // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases
+ if ($tablename == 'payment_various')
+ {
+ if ($element->sens == 0)
+ {
+ $total_ttc_by_line = -$total_ttc_by_line;
+ }
+ }
+
print ' | ';
if ($othermessage) print $othermessage;
if (isset($total_ttc_by_line))
|