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

Conflicts:
	htdocs/fourn/class/fournisseur.commande.dispatch.class.php
	htdocs/fourn/class/fournisseur.facture.class.php
	htdocs/reception/class/reception.class.php
This commit is contained in:
Laurent Destailleur
2020-04-24 18:58:47 +02:00
15 changed files with 154 additions and 10 deletions

View File

@@ -3409,6 +3409,19 @@ class Commande extends CommonOrder
$error++;
}
if (!$error)
{
// Delete extrafields of order details
$main = MAIN_DB_PREFIX . 'commandedet';
$ef = $main . "_extrafields";
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")";
if (!$this->db->query($sql))
{
$error++;
$this->errors[] = $this->db->lasterror();
}
}
if (!$error)
{
// Delete order details