diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 1c1fa12c665..11ef06d7d81 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1227,7 +1227,7 @@ class pdf_einstein extends ModelePDFCommandes * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param string $titlekey Translation key to show as title of document - * @return void + * @return int Return topshift value */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index f1e591d73a8..88798a8224a 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -67,13 +67,13 @@ class pdf_proforma extends pdf_einstein * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param string $titlekey Translation key to show as title of document - * @return void + * @return int Return topshift value */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma") { // phpcs:enable global $conf,$langs,$hookmanager; - parent::_pagehead($pdf, $object, $showaddress, $outputlangs, $titlekey); + return parent::_pagehead($pdf, $object, $showaddress, $outputlangs, $titlekey); } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f124156de8e..855d1fc8886 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -400,6 +400,7 @@ OldVATRates=Old VAT rate NewVATRates=New VAT rate PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion +PriceFormatInCurrentLanguage=Price Format In Current Language String=String TextLong=Long text HtmlText=Html text @@ -1908,6 +1909,7 @@ WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramatical DebugBarModuleActivated=Module debugbar is activated and slows dramaticaly the interface EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export +<<<<<<< HEAD InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than @@ -1923,4 +1925,6 @@ EndPointFor=End point for %s : %s DeleteEmailCollector=Delete email collector ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector? RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value -AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined \ No newline at end of file +AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined +======= +>>>>>>> branch '9.0' of git@github.com:Dolibarr/dolibarr.git diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 9b929f84946..f783a95e57d 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -262,26 +262,29 @@ class PriceParser return -1; } - //Get the supplier min + //Get the supplier min price $productFournisseur = new ProductFournisseur($this->db); - if ($productFournisseur->find_min_price_product_fournisseur($product->id, 0, 0) > 0) { - $supplier_min_price = $productFournisseur->fourn_unitprice; + $res = $productFournisseur->find_min_price_product_fournisseur($product->id, 0, 0); + if ($res < 1) { + $this->error_parser = array(25, null); + return -1; } + $supplier_min_price = $productFournisseur->fourn_unitprice; - //Accessible values by expressions - $extra_values = array_merge($extra_values, array( - "supplier_min_price" => $supplier_min_price, - )); + //Accessible values by expressions + $extra_values = array_merge($extra_values, array( + "supplier_min_price" => $supplier_min_price, + )); - //Parse the expression and return the price, if not error occurred check if price is higher than min - $result = $this->parseExpression($product, $price_expression->expression, $extra_values); - if (empty($this->error_parser)) { - if ($result < $product->price_min) { - $result = $product->price_min; - } - } - return $result; - } + //Parse the expression and return the price, if not error occurred check if price is higher than min + $result = $this->parseExpression($product, $price_expression->expression, $extra_values); + if (empty($this->error_parser)) { + if ($result < $product->price_min) { + $result = $product->price_min; + } + } + return $result; + } /** * Calculates supplier product price based on product supplier price and associated expression