-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multicurrency U.P (net) (currency) update error #22948
Comments
I couldn't find any error in this page When updating the U.P. |
I could not reproduce the error in php 8.1 nor in php 7.2 |
Are |
I also could not reproduce the problem using multicurrency and Dolibarr 16.0.3 and PHP 7.4.33 (Supplier Purchase orders) |
Line 1073 in /commande/card.php modified to
casting |
The main issue, I think, is that, $pu_ht or $price_min are string and not numbers... |
The problem occurs on PHP 8.0 |
There is indeed another problem with $pu_ht as well. When in multi currency starting a new order and adding a product. then add a price in the second currency, it wont take the value entered and give following warning : Warning: Undefined variable $pu_ht_devise in /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/commande/card.php on line 953 Warning: Cannot modify header information - headers already sent by (output started at /customers/3/3/0/ line 953 in Commane/card.php $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, min($rank, count($object->lines) + 1), 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $fk_unit, '', 0, $pu_ht_devise); |
After the above partial fix now the problem is as follows: Creating a new line in the sales order with second currency activated AND entering the price in that second currency will result in the Amount entered in the second currency not being saved (Multicurrency_price_HT not saved). values are all 00 (zero) Modifying the price in the second currency in that saved line will result in the value being saved (Multicurrency_subprice). Entering a new product line and fill in the price in original currency will be saved. |
Hello, It is still the case with V18 ? |
* Update facture.class.php FIX #22948 * Update facture.class.php
Bug
When updating the U.P (net) (currency) in a purchase order, there is an error in htdocs/fourn/commande/card.php:778
The reason is that price_ttc is not set and line 778 tries to divide the vat rate with an empty number.
I would suggest to add elseif (GETPOST('price_ttc') != '') in line 769 in place of the else. This solves the issue.
Environment Version
16
Environment OS
ubuntu 22.04
Environment Web server
nginx
Environment PHP
8
Environment Database
MariaDB
Environment URL(s)
No response
Expected and actual behavior
No response
Steps to reproduce the behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered: