Fix: IRPF tax not applied when creating invoice from project times (#37077)

* Remove 'supplier_invoice' from old path array

* Update module path in arrayforoldpath

Sorry Eldy, I was confused. You are absolutely right, it is already corrected.

* Replace localtax2 assignment with get_localtax function


Error when creating an invoice with personal income tax from project times. The rate does not apply

* Refactor localtax1 calculation using get_localtax

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Yamil Esteban Garcia 2026-02-09 03:55:34 +01:00 committed by GitHub
parent 9da14a6eb2
commit eaa146293e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -470,8 +470,8 @@ if ($action == 'confirm_generateinvoice' && $user->hasRight('facture', 'creer'))
$pu_ht = empty($dataforprice['pu_ht']) ? 0 : $dataforprice['pu_ht'];
$txtva = $dataforprice['tva_tx'];
$localtax1 = $dataforprice['localtax1'];
$localtax2 = $dataforprice['localtax2'];
$localtax1 = get_localtax($txtva, 1, $projectstatic->thirdparty);
$localtax2 = get_localtax($txtva, 2, $projectstatic->thirdparty);
} else {
$prodDurationHoursBase = 1;