Merge pull request #21164 from fappels/15_fix_customerprice_warning

FIX: Customer price non numeric warning when 0 vat.
This commit is contained in:
Laurent Destailleur 2022-06-08 14:55:45 +02:00 committed by GitHub
commit a70bb9e9b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ class Productcustomerprice extends CommonObject
$this->price_base_type = trim($this->price_base_type);
}
if (isset($this->tva_tx)) {
$this->tva_tx = trim($this->tva_tx);
$this->tva_tx = (float) $this->tva_tx;
}
if (isset($this->recuperableonly)) {
$this->recuperableonly = trim($this->recuperableonly);
@ -621,7 +621,7 @@ class Productcustomerprice extends CommonObject
$this->price_base_type = trim($this->price_base_type);
}
if (isset($this->tva_tx)) {
$this->tva_tx = trim($this->tva_tx);
$this->tva_tx = (float) $this->tva_tx;
}
if (isset($this->recuperableonly)) {
$this->recuperableonly = trim($this->recuperableonly);