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

This commit is contained in:
Laurent Destailleur 2022-09-09 16:47:18 +02:00
commit c104e6850d
2 changed files with 14 additions and 1 deletions

View File

@ -4905,7 +4905,7 @@ class Facture extends CommonInvoice
/**
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
* @return number or -1 if not available
* @return float or -1 if not available
*/
public function getRetainedWarrantyAmount($rounding = -1)
{

View File

@ -1016,6 +1016,19 @@ class Ticket extends CommonObject
}
}
// Delete all child tables
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_ticket";
$sql .= " WHERE fk_ticket = ".(int) $this->id;
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->errors[] = $this->db->lasterror();
}
}
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."ticket";
$sql .= " WHERE rowid=".((int) $this->id);