Skip to content

Commit

Permalink
Fix tk7201
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-ph authored and atm-ph committed Mar 8, 2018
1 parent c575edd commit b6c9706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class/actions_subtotal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ function beforePDFCreation($parameters=array(), &$object, &$action)
$fk_parent_line = $line->rowid;

// Fix tk7201 - si on cache le détail, la TVA est renseigné au niveau du sous-total, l'erreur c'est s'il y a plusieurs sous-totaux pour les même lignes, ça va faire la somme
if(TSubtotal::isSubtotal($line) && TSubtotal::getNiveau($line) == 1)
if(TSubtotal::isSubtotal($line))
{
/*$total = $this->getTotalLineFromObject($object, $line, '');
Expand All @@ -1330,7 +1330,7 @@ function beforePDFCreation($parameters=array(), &$object, &$action)
*/
list($total, $total_tva, $total_ttc, $TTotal_tva) = $this->getTotalLineFromObject($object, $line, '', 1);

$line->TTotal_tva = $TTotal_tva;
if (TSubtotal::getNiveau($line) == 1) $line->TTotal_tva = $TTotal_tva;
$line->total_ht = $total;
$line->total_tva = $total_tva;
$line->total = $line->total_ht;
Expand Down

0 comments on commit b6c9706

Please sign in to comment.