library: barcode modes, patrons/lending, install-time shelves and item types

Quick Add:
- barcode choices: automatic (zero-padded, >= 7 digits), scan a pre-printed
  sticker per item, or none for now; bulk 'give barcodes to items without one';
  reserve a block of numbers and print the sheet ahead of time (link opens
  Koha's range printer prefilled)
- default shelf saved on the server (shared by every device)
- item types follow Koha; CSP allows cover redirects; aria attrs fixed

Koha bootstrap:
- default lending rule (3 weeks, 25 items, 3 renewals, no fines) - a fresh
  Koha refuses every checkout without one
- automatic library-card numbers (start at 1000001), fines off
- Koha's own auto-barcode off (one numbering scheme)
- patron card template (Avery 5371) and layout with a scannable barcode
- LIBRARY_CODE, SHELVES and ITEM_TYPES honoured at first install

Why 7 digits: decoded printed sheets - 7-digit Code 39 read back 40/40, 6-digit
all-numeric symbols were reinterpreted as Code 32 for ~1 in 10 values.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wi3ZSot4XbUViwRFgLpRf
This commit is contained in:
Claude
2026-11-06 11:07:02 +00:00
parent aa7950aa9e
commit 76866e8bbc
8 changed files with 601 additions and 98 deletions
+52
View File
@@ -0,0 +1,52 @@
---
description:
- "Library card sheet and layout for Tools > Patron card creator"
tables:
- creator_templates:
translatable: [ template_desc ]
multiline: [ ]
rows:
# Avery 5371 / 8871 business-card sheet: 10 cards, 2 across x 5 down.
- template_code: "Avery 5371 | 2 x 3-1/2 (10 per sheet)"
template_desc: "Library cards: 2 columns, 5 rows."
page_width: 8.5
page_height: 11
label_width: 3.5
label_height: 2
top_text_margin: 0
left_text_margin: 0
top_margin: 0.5
left_margin: 0.75
cols: 2
rows: 5
col_gap: 0
row_gap: 0
units: "INCH"
creator: "Patroncards"
- creator_layouts:
translatable: [ layout_name, layout_xml ]
multiline: [ layout_xml ]
rows:
# Name and library at the top, card number as a scannable barcode.
- layout_name: "Library card"
barcode_type: CODE39
start_label: 1
printing_type: BAR
guidebox: 0
oblique_title: 0
font: TR
font_size: 10
units: POINT
callnum_split: 0
text_justify: L
format_string: "barcode"
layout_xml:
- "<opt page_side=\"F\" units=\"POINT\">"
- " <text>&lt;firstname&gt; &lt;surname&gt;</text>"
- " <text enable=\"1\" font=\"TB\" font_size=\"14\" llx=\"14\" lly=\"118\" text_alignment=\"L\" />"
- " <text>Library card</text>"
- " <text enable=\"1\" font=\"TR\" font_size=\"9\" llx=\"14\" lly=\"100\" text_alignment=\"L\" />"
- " <barcode print=\"1\" type=\"CODE39\" llx=\"14\" lly=\"30\" height_scale=\"0.012\" width_scale=\"0.6\" text_print=\"1\" />"
- "</opt>"
creator: "Patroncards"