diff --git a/app/Http/Controllers/OpenVolumeDistributionsController.php b/app/Http/Controllers/OpenVolumeDistributionsController.php index 18e96e6..15ab693 100644 --- a/app/Http/Controllers/OpenVolumeDistributionsController.php +++ b/app/Http/Controllers/OpenVolumeDistributionsController.php @@ -23,7 +23,7 @@ public function execute(): void FROM deliveryNotes LEFT JOIN volumeDistributions ON deliveryNotes.id = volumeDistributions.deliveryNoteId GROUP BY deliveryNotes.id - HAVING calcSum IS NULL OR calcSum != amount;'; + HAVING calcSum IS NULL OR calcSum != deliveryNotes.amount;'; $dataSet = Database::unprepared($sql);