This article shows how to create visually appealing, professional royalty statements in details using your own HTML and CSS. You can completely control the layout and presentation while the system continues to calculate all values automatically.
Where to Find These Settings
- Log in to your details account.
- Go to Settings ► Layouts.
- Select the layout you use for royalty statements.
- Open the fields named Royalty Header, Royalty Template (not yet available coming soon!), and Royalty Footer.
These fields correspond to the database fields header_royalty, royalty_template, and footer_royalty. Additional customization areas include:
| Field | Purpose |
|---|---|
style_royalty (not yet available coming soon!) |
Contains your CSS rules. |
leading_text_royalty (not yet available coming soon!) |
Optional introduction above the statement. |
trailing_text_royalty (not yet available coming soon!) |
Optional note or disclaimer at the end. |
b2b_email_template |
Defines the email body used for statement notifications. |
About the Structure
The final statement is rendered by combining the fields in this order:
This means your CSS (in style_royalty) loads first, followed by the HTML from your header, then the main layout (royalty_template), and finally your footer or script area.
Data You Can Display
Your templates can display any information provided by details during statement generation. Common variables include:
| Category | Example Variables |
|---|---|
| Account | royalty_account_name, currency_iso |
| Period | start_date, end_date, royalty_period_id |
| Balances | opening_balance, royalty_amount, amount_payable, closing_balance |
| Contracts | contracts[] with contract_name, payment_net_all |
| Physical sales | physical_sales.rows[] such as item, format, country, royalty_amount |
| Digital sales | digital_sales.rows[] such as usage_type_textkey, net_sales, royalty_rate |
| Licensing | licence_sales.rows[] such as licence_name, income, royalty_amount |
Creating a Custom Header
You can include your logo, company information, and the current royalty period.
Building the Main Template
Use your royalty_template section for structure, tables, and summary areas. Below is a minimal example showing physical and digital sections with conditional logic.
Adding a Footer
Use footer_royalty for closing notes, bank information, or automatic print styles.
►
footer_royalty until access to the royalty_template section becomes available. You can download a sample file showing how to control CSS directly from footer_royalty here: Royalty Statement sample code .Styling Recommendations
- Use simple fonts and a clean hierarchy of headings.
- Keep totals clearly separated from line details.
- Reserve bold color accents for key figures only.
- Add
@media printrules to control page breaks for PDFs.
Example Layout Concepts
Classic Layout
A simple, print-friendly design:
- Header with logo and address.
- Summary table of balances and totals.
- Detailed sections for physical, digital, and licensing.
- Clean footer with contact and bank info.
Dashboard-Style Layout
A modern, data-rich view inside the same statement:
- Two-column summary (balances on one side, monthly totals on the other).
- Expandable or filterable contract tables.
- Light background sections and clear spacing.
- Optional visual summaries (countries, stores, or top tracks) using your own charting method.
Email Template (Optional)
Use b2b_email_template to define the message that accompanies automatic royalty emails:
Best Practices
- Start from a copy: Duplicate an existing layout before large changes.
- Keep CSS unified: all styling in
style_royalty. - Be concise: avoid unnecessary scripts or remote files.
- Test thoroughly: check both screen and PDF outputs.
- Maintain consistency: align statement design with your company branding.
Need Help?
If you d like assistance refining your layout, contact support@details.eu and include:
- Your layout name (
invoice_project_name) - A short description or screenshot of your current layout
- What you d like to improve or achieve
Related