Two borrowing paths in PerpustakaanKU
The PerpustakaanKU repository has two ways to record a loan: a member creates it through the application, while an administrator can enter an offline transaction. Both use the same book records, but their validation needs differ.
Member borrowing
In the online flow, the application checks whether the member already has an active loan for the same book. It also checks stock availability before creating a transaction. The initial return date is set to seven days after the borrowing date.
These checks keep the basic flow clear: a member cannot create a second active loan for the same book, and a book with no available stock cannot be borrowed through that form.
Offline records entered by an administrator
For transactions that happen outside the application, an administrator enters the borrower's name, book, borrowing and return dates, and phone number. The return date must be later than the borrowing date. The system also rejects another active loan with the same borrower name and book.
Separate paths make it possible to record loans that do not belong to a member account. Administrators can view online and offline loans through a filter on the list page.
Overdue fees and implementation limits
When a loan is marked as returned, the controller calculates a fee of Rp1,000 for each day after the due date. That amount is the rule currently written in the project repository, not a recommendation for library policy.
There is a technical limit to address: the stock check and transaction creation happen as separate controller steps. For concurrent use, a future implementation should protect stock updates with a database transaction and suitable locking.
PerpustakaanKU is a portfolio project, not an operational library system. See the PerpustakaanKU project page for an overview of its other features.
