Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/comm/propal/class/propal.class.php htdocs/expensereport/class/expensereport.class.php htdocs/projet/element.php htdocs/supplier_proposal/class/supplier_proposal.class.php
This commit is contained in:
commit
48a4ed656b
@ -484,6 +484,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
} else {
|
||||
$this->error = $line->error;
|
||||
$this->errors = $line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
@ -710,8 +711,8 @@ class Propal extends CommonObject
|
||||
|
||||
// Mise a jour informations denormalisees au niveau de la propale meme
|
||||
$result = $this->update_price(1, 'auto', 0, $mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
if ($result > 0) {
|
||||
$this->db->commit();
|
||||
return $this->line->id;
|
||||
} else {
|
||||
@ -721,6 +722,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
$this->errors = $this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
@ -913,7 +915,7 @@ class Propal extends CommonObject
|
||||
return $result;
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
|
||||
$this->errors = $this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1976,6 +1976,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
} else {
|
||||
$this->error = $line->error;
|
||||
$this->errors = $line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
@ -575,7 +575,8 @@ class Account extends CommonObject
|
||||
|
||||
return $accline->id;
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->error = $accline->error;
|
||||
$this->errors = $accline->errors;
|
||||
$this->db->rollback();
|
||||
|
||||
return -2;
|
||||
|
||||
@ -797,6 +797,7 @@ class Facture extends CommonInvoice
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error = $newinvoiceline->error;
|
||||
$this->errors = $newinvoiceline->errors;
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
@ -3202,6 +3203,7 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
$this->errors = $this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
@ -337,6 +337,7 @@ class ExpenseReport extends CommonObject
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error = $newndfline->error;
|
||||
$this->errors = $newndfline->errors;
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1649,6 +1649,7 @@ class Product extends CommonObject
|
||||
if ($result) {
|
||||
if (count($prodcustprice->lines) > 0) {
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$price_min = price($prodcustprice->lines[0]->price_min);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
|
||||
@ -774,7 +774,6 @@ foreach ($listofreferent as $key => $value)
|
||||
// Each element with at least one line is output
|
||||
$qualifiedforfinalprofit = true;
|
||||
if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false;
|
||||
if ($key == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false;
|
||||
//var_dump($key.' '.$qualifiedforfinalprofit);
|
||||
|
||||
// Calculate margin
|
||||
@ -783,7 +782,7 @@ foreach ($listofreferent as $key => $value)
|
||||
$total_revenue_ht += $total_ht;
|
||||
}
|
||||
|
||||
if ($margin != "add") { // Revert sign
|
||||
if ($margin != "add") { // Revert sign
|
||||
$total_ht = -$total_ht;
|
||||
$total_ttc = -$total_ttc;
|
||||
}
|
||||
|
||||
@ -481,12 +481,14 @@ class SupplierProposal extends CommonObject
|
||||
if ($result < -1)
|
||||
{
|
||||
$this->error = $prod->error;
|
||||
$this->errors = $prod->errors;
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = $prod->error;
|
||||
$this->errors = $prod->errors;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
@ -622,12 +624,14 @@ class SupplierProposal extends CommonObject
|
||||
$this->db->commit();
|
||||
return $this->line->id;
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->error = $this->error();
|
||||
$this->errors = $this->errors();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
$this->errors = $this->line->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user