Print Runs (Tirages) Management
Relevant source files
The following files were used as context for generating this wiki page:
Print Runs (Tirages) Management is a core module within the Duplicator application designed to record, track, and bill reproduction jobs performed on various machines, including duplicators and photocopiers. It provides a structured way to log technical parameters such as sheet counts, master usage, and color fill rates, while automatically calculating costs based on pre-configured pricing models.
This system serves as the primary accounting interface for reproduction collectives, ensuring financial traceability and operational efficiency. It integrates with the Administration module for high-level oversight and the Statistics module for long-term reporting on printing volumes and profitability.
Sources: app/README.md:1-12, app/translations/en.json:54-57
Architecture and Data Flow
The management of print runs follows a Model-View-Controller (MVC) pattern. The backend logic is handled by specialized managers (e.g., TirageManager), which interact with a SQLite database to persist print data. The frontend provides interfaces for both creating new runs and administrative oversight.
Print Run Lifecycle
The lifecycle begins when a user submits a print run form. Data is processed to calculate the total price before being saved to the database. Administrators can subsequently view, edit, or mark these runs as paid.
The flow represents how a print run transitions from initial entry to administrative reconciliation.
Sources: app/models/admin.php:120-140, app/view/admin.tirage.html.php:1-20
Multi-Machine Support
The system distinguishes between different hardware types, primarily Duplicators and Photocopiers, each requiring specific data inputs for accurate cost calculation.
Hardware-Specific Attributes
| Attribute | Duplicator (Duplicopieur) | Photocopier (Photocopieuse) |
|---|---|---|
| Primary Counters | Masters and Passes | Passages (Clicks) |
| Consumables | Ink drums, Master rolls | Toner (CMYK) or Liquid Ink |
| Input Modes | Counters (Before/After) or Manual | Manual count or Page per copy |
| Pricing Factors | Master unit price, Paper, Ink | Click rate, Coverage/Fill rate |
Sources: app/translations/en.json:280-325, app/view/setup.html.php:140-160
Administrative Management
The administrative interface allows for bulk operations on recorded print runs. This includes tracking pending payments and filtering runs by machine or payment status.
Key Administrative Features
- Payment Tracking: Displays amounts pending for each specific machine.
- Grouped View: Multi-machine print runs are grouped together to show total costs for a single project or client.
- Bulk Actions: Supports marking multiple runs as paid or deleting selected records simultaneously.
- Pagination: Groups and individual runs are paginated to maintain performance with large datasets.
This diagram illustrates the sequence for bulk deletion of print records.
Sources: app/models/admin.php:575-595, app/view/admin.tirage.html.php:40-100
Administrative Parameters
The admin.php controller manages requests for the print run section through specific GET and POST actions.
| Parameter | Type | Description |
|---|---|---|
ids[] | Array | List of print run IDs for bulk operations. |
table | String | Target table (e.g., 'duplicopieur' or 'photocopieur'). |
action | String | Operation type: delete_selected or mark_as_paid. |
page_[machine] | Integer | Pagination index for a specific machine list. |
Sources: app/models/admin.php:510-540, app/view/admin.tirage.html.php:160-180
Pricing and Cost Calculation
Cost calculation is dynamic and depends on the configuration established during the Setup phase. Prices are derived from consumable costs (ink, masters, toner) and paper usage.
Calculation Logic
- Paper: Calculated based on the format (A3 vs A4). A3 prices are often stored as A4 unit prices multiplied by two.
- Duplicator Masters: Fixed cost per master created.
- Ink/Toner: Calculated by "Passes" (for duplicators) or "Clicks" (for photocopiers), often adjusted for color fill rates.
- Special Options: Adjustments for duplex (recto/verso) printing and specific drum usage.
Sources: app/view/setup.html.php:330-360, app/translations/en.json:330-350
Technical Summary
The Print Runs Management module ensures the financial sustainability of reproduction operations by providing:
- Granular Tracking: Recording specific counters for different machine types.
- Administrative Control: Tools for reconciliation and data maintenance.
- Automated Billing: Removing manual errors from complex cost calculations involving multiple consumables.