<?php

namespace App\Libraries;

class CartCalculator {
    public function hitungTotal($items) {
        $subtotal = 0;
        foreach ($items as $item) {
            $subtotal += ($item['harga_jual'] * $item['qty']);
        }
        return $subtotal;
    }
}