How pluginsglpi/credit works
Credit is a GLPI plugin for defining voucher types, assigning vouchers and quantities to entities, recording ticket-related consumption, and reviewing remaining credits and usage. It also supports consumption settings, expiry/low-credit alerts, and ticket notifications. The graph reflects documented capabilities and sampled hook/handler behavior; several subsystem paths are present in the tree but their implementation was not sampled, so uncertain wiring is omitted.
Main entry points: entity.class.php Entity vouchers · ticket.class.php Consumption logic · entity.form.php Entity voucher form · entityconfig.form.php Entity settings
Components 15
Voucher management
- Entity voucher form
front/entity.form.php - Entity settings
front/entityconfig.form.php - Entity vouchers
inc/entity.class.php - Voucher types
inc/type.class.php - Ticket settings
inc/ticketconfig.class.php
Ticket consumption
- Ticket voucher form
front/ticket.form.php - Consumption logic
inc/ticket.class.php - Available quantity lookup
ajax/dropdownQuantity.php - Form field updates
public/js/credit.js
Usage visibility
- Consumption details
front/ticket.php - Ticket notification data
hook.php
Alerts and notifications
- Entity alert templates
inc/notificationtargetentity.class.php
Other components
- GLPI user
- GLPI runtime
- GLPI database
Connections 25
- GLPI user → GLPI runtime: uses
- GLPI runtime → Entity voucher form: handles entity edits
- Entity voucher form → Entity vouchers: creates or updates
- Entity vouchers → GLPI database: stores vouchers
- GLPI runtime → Entity settings: handles settings
- Entity settings → Ticket settings: updates settings
- Ticket settings → GLPI database: stores settings
- GLPI runtime → Voucher types: manages dropdown types
- Voucher types → GLPI database: stores types
- GLPI runtime → Ticket voucher form: handles consumption entry
- Ticket voucher form → Consumption logic: adds consumption
- Consumption logic → GLPI database: reads and records use
- GLPI runtime → Consumption logic: dispatches ticket hooks
- Consumption logic → Entity vouchers: checks voucher balance
- GLPI runtime → Available quantity lookup: requests quantity
- Available quantity lookup → Entity vouchers: gets available maximum
- GLPI runtime → Form field updates: loads form behavior
- Form field updates → GLPI runtime: updates ticket selections
- GLPI runtime → Consumption details: opens consumption view
- Consumption details → Consumption logic: loads consumed details
- GLPI runtime → Ticket notification data: builds ticket notification data
- Ticket notification data → GLPI database: reads voucher totals
- GLPI runtime → Entity vouchers: runs credit checks
- Entity vouchers → Entity alert templates: raises expiry or low-credit event
- Entity alert templates → GLPI runtime: provides notification content