Skip to content

Commit

Permalink
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/core/class/html.formfile.class.php
	htdocs/fourn/class/fournisseur.product.class.php
  • Loading branch information
eldy committed Dec 17, 2019
2 parents 5aeb667 + 27b1e71 commit 3207add
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions htdocs/fourn/class/fournisseur.product.class.php
Expand Up @@ -395,7 +395,6 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn
return -2;
}
}

else
{
dol_syslog(get_class($this).'::update_buyprice without knowing id of line, so we delete from company, quantity and supplier_ref and insert again', LOG_DEBUG);
Expand Down Expand Up @@ -438,18 +437,19 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn
$sql .= (empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'");
$sql .= ")";

$idinserted = 0;
$this->product_fourn_price_id = 0;

$resql = $this->db->query($sql);
if ($resql) {
$idinserted = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price");
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX . "product_fournisseur_price");
}
else {
$error++;
}

if (!$error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
// Add record into log table
// $this->product_fourn_price_id must be set
$result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code);
if ($result < 0) {
$error++;
Expand All @@ -465,7 +465,6 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn

if (empty($error)) {
$this->db->commit();
$this->product_fourn_price_id = $idinserted;
return $this->product_fourn_price_id;
} else {
$this->db->rollback();
Expand Down
8 changes: 5 additions & 3 deletions htdocs/projet/tasks/document.php
Expand Up @@ -284,9 +284,11 @@
$morehtmlref.='<br>';

// Third party
$morehtmlref.=$langs->trans("ThirdParty").': ';
$morehtmlref.=$projectstatic->thirdparty->getNomUrl(1);
$morehtmlref.='</div>';
$morehtmlref .= $langs->trans("ThirdParty") . ': ';
if (is_object($projectstatic->thirdparty) && $projectstatic->thirdparty->id > 0) {
$morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
}
$morehtmlref .= '</div>';
}

dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
Expand Down

0 comments on commit 3207add

Please sign in to comment.