Fix: Affichage TVA récupérée en mode recettes-dépenses incorrect sur état par société
This commit is contained in:
parent
343e0e3300
commit
c42fe1672f
@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -293,6 +292,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($amount)."</td>\n";
|
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "<td align=\"right\">".price($amount)."</td>\n";
|
print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// TVA à récupérer
|
// TVA à récupérer
|
||||||
$amount=0;
|
$amount=0;
|
||||||
$sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm";
|
$sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm";
|
||||||
@ -361,6 +361,7 @@ else
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->free($result);
|
||||||
} else {
|
} else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
@ -369,6 +370,7 @@ else
|
|||||||
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($amount)."</td>\n";
|
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "<td align=\"right\">".price($amount)."</td>\n";
|
print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// TVA récupérée
|
// TVA récupérée
|
||||||
$amount=0;
|
$amount=0;
|
||||||
$sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm";
|
$sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm";
|
||||||
@ -397,13 +399,14 @@ else
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$db->free($result);
|
||||||
} else {
|
} else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
print "<tr $bc[$var]><td> </td>";
|
print "<tr $bc[$var]><td> </td>";
|
||||||
print "<td>".$langs->trans("VATCollected")."</td>\n";
|
print "<td>".$langs->trans("VATCollected")."</td>\n";
|
||||||
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($obj->amount)."</td>\n";
|
if ($modecompta == 'CREANCES-DETTES') print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "<td align=\"right\">".price($obj->amount)."</td>\n";
|
print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user