show Additional Billing in the customer

This commit is contained in:
Ibnu Maksum
2024-07-23 14:43:43 +07:00
parent 694428f804
commit c32e921cab
5 changed files with 75 additions and 21 deletions

View File

@ -56,6 +56,22 @@ class User
return [$bills, $addcost];
}
public static function getBillNames($id = 0)
{
if (!$id) {
$id = User::getID();
if (!$id) {
return [];
}
}
$bills = [];
$attrs = User::getAttributes('Bill', $id);
foreach ($attrs as $k => $v) {
$bills[] = str_replace(' Bill', '', $k);
}
return $bills;
}
public static function billsPaid($bills, $id = 0)
{
if (!$id) {