Voile.Schema.Library.Transaction (Voile v0.1.23)

Copy Markdown View Source

Summary

Functions

Calculates days overdue with optional skip_holidays flag.

Calculates days overdue using calendar days (ALL days, no holiday exclusion). Use this when the library policy is to count every single day for fines, regardless of whether it's a holiday or weekend.

Calculates days overdue using business days (excluding holidays and weekends). This is the default calculation that respects the library's holiday calendar.

Functions

calculate_days_overdue(transaction, skip_holidays \\ false)

Calculates days overdue with optional skip_holidays flag.

  • When skip_holidays is true: counts ALL calendar days (no holiday exclusion)
  • When skip_holidays is false (default): counts only business days (excludes holidays)

This allows flexible fine calculation based on library policy configuration.

calendar_days_overdue(arg1)

Calculates days overdue using calendar days (ALL days, no holiday exclusion). Use this when the library policy is to count every single day for fines, regardless of whether it's a holiday or weekend.

days_overdue(arg1)

Calculates days overdue using business days (excluding holidays and weekends). This is the default calculation that respects the library's holiday calendar.

overdue?(arg1)