<?php

namespace App\Libraries;

class PaymentCalculator {
    public function hitungGrandTotal($subtotal, $diskon) {
        $grandTotal = $subtotal - $diskon;
        return ($grandTotal < 0) ? 0 : $grandTotal;
    }
}