Doc #67195 [Opn->Nab]: [FR] Calcul de TVA faux
| From: | jeanseb@php.net | Date: | Sun, 28 Dec 2014 17:23:03 +0000 |
| Subject: | Doc #67195 [Opn->Nab]: [FR] Calcul de TVA faux | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11779@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67195&edit=1
ID: 67195
Updated by: jeanseb@php.net
Reported by: kylekatarnls at gmail dot com
Summary: [FR] Calcul de TVA faux
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Translation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2014-12-28 17:22:42] jeanseb@php.net
Faux, le calcul est bon.
Le calcul TTC => HT s'effectue via la formule suivante :
TTC * (100/(TVA+100)) = HT
Soit pour notre exemple (10550 avec une TVA Ã 5.5)
10550 * (100/(5.5+100)) = 10000
Source : http://vosdroits.service-public.fr/professionnels-entreprises/F24271.xhtml
------------------------------------------------------------------------
[2014-05-03 18:21:28] kylekatarnls at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/functions.anonymous
---
Le calcul suivant est faux :
$total += ($pricePerItem * $quantity) * ($tax + 1.0);
HC => TTC
10000 * (1+0.055) => 10550
TTC => HT
10550 * (1-0.055) => 9969,75 (faux devrait faire 10000)
Pour ajouter la TVA se calcul, il faut faire :
$total += ($pricePerItem * $quantity) / (1.0 - $tax);
HC => TTC
10000 / (1-0.055) => 10582,011
TTC => HT
10582,011 * (1-0.055) => 10000
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67195&edit=1