done restructure calculation retribution
This commit is contained in:
@@ -150,9 +150,11 @@ class TestRetributionCalculation extends Command
|
||||
protected function performCalculation($buildingTypeId, $floor, $area)
|
||||
{
|
||||
try {
|
||||
$result = $this->calculatorService->calculate($buildingTypeId, $floor, $area, false);
|
||||
// Round area to 2 decimal places to match database storage format
|
||||
$roundedArea = round($area, 2);
|
||||
$result = $this->calculatorService->calculate($buildingTypeId, $floor, $roundedArea, false);
|
||||
|
||||
$this->displayResults($result, $area, $floor);
|
||||
$this->displayResults($result, $roundedArea, $floor);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$this->error('❌ Error: ' . $e->getMessage());
|
||||
@@ -208,7 +210,7 @@ class TestRetributionCalculation extends Command
|
||||
|
||||
protected function testAllBuildingTypes()
|
||||
{
|
||||
$area = $this->option('area') ?: 100;
|
||||
$area = round($this->option('area') ?: 100, 2);
|
||||
$floor = $this->option('floor') ?: 2;
|
||||
|
||||
$this->info("🧪 TESTING SEMUA BUILDING TYPES");
|
||||
|
||||
Reference in New Issue
Block a user