dolibarr-git
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-git] [Dolibarr/dolibarr] ff7507: Fix: bug #6653 situation invo


From: Laurent Destailleur
Subject: [Dolibarr-git] [Dolibarr/dolibarr] ff7507: Fix: bug #6653 situation invoice miscalculation
Date: Tue, 11 Apr 2017 02:11:30 -0700

  Branch: refs/heads/develop
  Home:   https://github.com/Dolibarr/dolibarr
  Commit: ff75077b340888a079b1a61c541b1c90bb83d03b
      
https://github.com/Dolibarr/dolibarr/commit/ff75077b340888a079b1a61c541b1c90bb83d03b
  Author: vvnt <address@hidden>
  Date:   2017-04-08 (Sat, 08 Apr 2017)

  Changed paths:
    M htdocs/compta/facture/class/facture.class.php

  Log Message:
  -----------
  Fix: bug #6653 situation invoice miscalculation

Bug (#6653)

In price.lib.php (htdocs\core\lib\price.lib.php), the function 
calcul_price_total() is defined (line 76). The 7th parameter is 
**$remise_percent_global**.

However, this function is called on facture.class.php 
(htdocs\compta\facture\class\facture.class.php) and the 7th parameter used is 
**$line->product_type**. Consequently, invoice situation is correct when user 
sells a product (product_type = 0) and is wrong when user sells a service 
(product_type = 1).
Effectively, in the latter case, the total situation invoice will be wrong by 
1%.

In order to correct this, we can add 0 as the 7th parameter and move 
**$line->product_type** to the 10th parameter.


  Commit: b2b1dcc5745e913cf6ff549df4de1fba3a1806b1
      
https://github.com/Dolibarr/dolibarr/commit/b2b1dcc5745e913cf6ff549df4de1fba3a1806b1
  Author: Laurent Destailleur <address@hidden>
  Date:   2017-04-11 (Tue, 11 Apr 2017)

  Changed paths:
    M htdocs/compta/facture/class/facture.class.php

  Log Message:
  -----------
  Merge pull request #6663 from vvnt/patch-2

FIX: situation invoice miscalculation (#6653)


Compare: 
https://github.com/Dolibarr/dolibarr/compare/81020cea7729...b2b1dcc5745e

reply via email to

[Prev in Thread] Current Thread [Next in Thread]