Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-04-20 14:44:36 +02:00
commit 40b3db940c
2 changed files with 5 additions and 5 deletions

View File

@ -502,8 +502,7 @@ class Invoices extends DolibarrApi
}
$result = $this->invoice->delete_contact($rowid);
if (!$result) {
if ($result < 0) {
throw new RestException(500, 'Error when deleted the contact');
}
@ -600,7 +599,7 @@ class Invoices extends DolibarrApi
/**
* Delete invoice
*
* @param int $id Invoice ID
* @param int $id Invoice ID
* @return array
*/
public function delete($id)
@ -617,7 +616,8 @@ class Invoices extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
if ($this->invoice->delete($id) < 0)
$result = $this->invoice->delete(DolibarrApiAccess::$user);
if ($result < 0)
{
throw new RestException(500);
}

View File

@ -746,7 +746,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf->SetXY($posx, $posy);
$pdf->SetFont('', 'B', $default_font_size + 2);
$pdf->SetTextColor(111, 81, 124);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $object->getLibStatut(0), '', 'R');
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R');
if ($showaddress) {
// Sender properties