forked from Wavyzz/dolibarr
FIX Bug (#33964)
This commit is contained in:
@@ -1490,7 +1490,7 @@ class Expedition extends CommonObject
|
||||
|
||||
// Add a protection to refuse deleting if shipment has at least one delivery
|
||||
$this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment
|
||||
if (count($this->linkedObjectsIds) > 0) {
|
||||
if (isset($this->linkedObjectsIds['delivery']) && count($this->linkedObjectsIds['delivery']) > 0) {
|
||||
$this->error = 'ErrorThereIsSomeDeliveries';
|
||||
$error++;
|
||||
}
|
||||
@@ -1700,7 +1700,7 @@ class Expedition extends CommonObject
|
||||
|
||||
// Add a protection to refuse deleting if shipment has at least one delivery
|
||||
$this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment
|
||||
if (count($this->linkedObjectsIds) > 0) {
|
||||
if (isset($this->linkedObjectsIds['delivery']) && count($this->linkedObjectsIds['delivery']) > 0) {
|
||||
$this->error = 'ErrorThereIsSomeDeliveries';
|
||||
$error++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user