Update supplier_proposal.class.php

This commit is contained in:
Frédéric FRANCE 2021-11-23 22:17:05 +01:00 committed by GitHub
parent bc4ce6725a
commit 5e2dcf322c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2998,7 +2998,8 @@ class SupplierProposalLine extends CommonObjectLine
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0) {
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) {
$result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product);
if ($result < 0) {
return $result;
} else {
$this->pa_ht = $result;