Skip to main content

Overview

Invenicum’s loan tracking system helps you monitor items lent to team members, clients, or friends. Track who has what, when it’s due back, and automatically update inventory when items are returned.

Automated Stock Management

Inventory adjusts automatically when items are loaned or returned

Return Reminders

Dashboard highlights loans expiring today or overdue

Borrower Profiles

Store contact details and loan history

Digital Vouchers

Generate formatted loan receipts

How It Works

Creating a Loan

When you lend an item, Invenicum creates a loan record and decrements the item’s quantity.
1

Select Item to Loan

Navigate to the item you want to lend. Check that quantity is sufficient.
2

Click 'Create Loan'

Opens the loan creation form.
3

Enter Borrower Details

  • Name (required)
  • Email (optional, for notifications)
  • Phone (optional)
Contact info is stored for future loans to the same person.
4

Set Loan Parameters

  • Quantity: How many units to lend
  • Loan Date: Defaults to today
  • Expected Return Date: When you expect the item back
  • Notes: Special instructions or conditions
5

Save Loan

Item quantity is reduced immediately. A voucher ID is generated.
Technical Details (lib/data/services/loan_service.dart:50):
LoanService.createLoan(containerId, loan)
// POST /containers/{containerId}/loans
// Backend automatically:
//   1. Validates sufficient quantity
//   2. Decrements item stock
//   3. Sets status to 'active'
//   4. Associates with authenticated user

Loan States

Each loan has a status field:
  • active: Item is currently loaned out
  • returned: Item has been returned (sets actualReturnDate)
Overdue status is calculated dynamically. A loan is overdue if status == 'active' and expectedReturnDate is in the past (lib/data/models/loan.dart:135).

Returning Items

When a borrower returns an item:
1

Navigate to Loan

Find the loan in the Loans view (filter by borrower, item, or status).
2

Click 'Mark as Returned'

This action:
  • Sets status to “returned”
  • Records actualReturnDate
  • Increments item quantity by the loaned amount
3

Verify Inventory

Check the item’s quantity reflects the return.
Technical Details (lib/data/services/loan_service.dart:69):
LoanService.returnLoan(containerId, loanId)
// PUT /containers/{containerId}/loans/{loanId}/return
// Backend automatically increments stock
Returning a loan increments stock regardless of the item’s actual condition. Damaged items should be noted in the loan’s notes before returning, then adjusted manually in inventory.

Deleting Loans

Loans can be deleted if created by mistake (lib/data/services/loan_service.dart:86):
  • Only the user who created the loan can delete it
  • Deleting an active loan does not restore item quantity
  • Use this for erroneous entries, not for returns
If you accidentally loaned the wrong item, delete the loan and manually adjust the item’s quantity before creating a corrected loan.

Dashboard Integration

The main dashboard provides loan insights (lib/data/models/dashboard_stats.dart:13):

Loans Expiring Today

Shows all active loans with expectedReturnDate matching today’s date. Click to view details or mark as returned.

Top Loaned Items

Highlights your most frequently borrowed assets, helping identify:
  • High-demand items that may need additional purchases
  • Items to monitor closely for wear and tear

Container-Specific Stats

Each container shows:
  • Total active loans
  • Total loaned quantity
  • Overdue loan count

Use Cases

IT Equipment Loans

Track laptops, monitors, and peripherals lent to remote employees.

Tool Libraries

Manage shared tools in maker spaces or workshops.

Event Rentals

Monitor equipment loaned for events with specific return deadlines.

Library Systems

Simple book lending with due date tracking.

Voucher System

Each loan generates a unique formatted voucher ID (lib/data/models/loan.dart:19):
formattedVoucherId => 'V-000042'
// Format: V-{6-digit zero-padded ID}
Use this for:
  • Physical receipts when items leave your facility
  • Reference numbers in email confirmations
  • Quick lookup in the search interface
The voucher ID is derived from the loan’s database ID and is generated automatically.

Notifications and Reminders

Invenicum highlights time-sensitive loans:

Dashboard Alerts

  • Expiring Today: Shows in dedicated “Loans Expiring Today” widget
  • Overdue: Calculated client-side based on expectedReturnDate < now

Future Enhancements

Upcoming features (not yet implemented):
  • Email reminders to borrowers 24h before due date
  • Automatic notifications when loans become overdue
  • Recurring loan patterns for regular equipment sharing

Loan Statistics

Access detailed analytics per container (lib/data/services/loan_service.dart:101):
LoanService.getLoanStats(containerId)
// GET /containers/{containerId}/loans-stats
Returns:
  • Active loan count
  • Total loaned quantity
  • Overdue count
  • Average loan duration
  • Most frequent borrowers
Use loan stats to identify trends and optimize inventory levels for high-demand items.

Best Practices

Before Loaning

  1. Verify Quantity: Ensure sufficient stock before creating the loan
  2. Document Condition: Add notes about any existing damage
  3. Set Realistic Due Dates: Account for weekends and holidays
  4. Capture Contact Info: Always get borrower email/phone for follow-ups

Managing Active Loans

  1. Check Dashboard Daily: Review expiring and overdue loans each morning
  2. Communicate Proactively: Contact borrowers 1-2 days before due date
  3. Inspect on Return: Verify item condition matches loan notes
  4. Update Immediately: Mark items returned as soon as they arrive

For High-Value Items

  1. Require Approval: Implement a workflow where admins approve loans
  2. Shorter Loan Periods: Reduce risk with 3-5 day maximum loans
  3. Photo Documentation: Attach images to loan notes showing pre-loan condition
  4. Insurance Notes: Record relevant insurance details in loan notes

Limitations

  • No Partial Returns: If loaning 5 units, you must return all 5 at once (workaround: create separate loans per unit)
  • Single Item Per Loan: Each loan tracks one inventory item (workaround: create multiple loans)
  • No Late Fees: System tracks overdue status but doesn’t calculate penalties
  • Manual Notifications: Borrowers aren’t automatically emailed; notifications are managed through the Alerts system

API Reference

See the API documentation for:
  • Loan Service - Loan management API
  • Loan Model - Complete loan data structure
  • Dashboard Stats - Loan insights and statistics

Build docs developers (and LLMs) love