88 lines
2.2 KiB
Markdown
88 lines
2.2 KiB
Markdown
# SubtotalTitle - Facturedet Sync Update
|
|
|
|
## Was ist neu?
|
|
- **📄 Checkbox** bei jeder Section/Textzeile/Subtotal: Element zur Rechnung hinzufügen
|
|
- **→ Zur Rechnung / ← Aus Rechnung** Buttons: Alle Elemente auf einmal
|
|
- **ODT-Variablen** für formatierte Ausgabe im PDF/ODT
|
|
|
|
## Installation
|
|
|
|
### 1. Dateien kopieren
|
|
|
|
```
|
|
subtotaltitle_complete/
|
|
├── class/
|
|
│ └── actions_subtotaltitle.class.php → ERSETZEN
|
|
├── ajax/
|
|
│ └── sync_to_facturedet.php → NEU
|
|
├── js/
|
|
│ └── subtotaltitle_sync.js → NEU
|
|
├── css/
|
|
│ └── subtotaltitle_sync.css → Inhalt zu deiner CSS hinzufügen
|
|
└── core/
|
|
└── substitutions/
|
|
└── functions_subtotaltitle.lib.php → NEU (Ordner ggf. erstellen!)
|
|
```
|
|
|
|
### 2. Modul-Descriptor anpassen
|
|
|
|
In `core/modules/modSubtotalTitle.class.php` ändern:
|
|
|
|
```php
|
|
$this->module_parts = array(
|
|
'substitutions' => 1, // ← Diese Zeile hinzufügen/ändern!
|
|
'hooks' => array(
|
|
'data' => array('invoicecard'),
|
|
'entity' => '0'
|
|
)
|
|
);
|
|
```
|
|
|
|
### 3. Modul deaktivieren und wieder aktivieren
|
|
|
|
Damit die Substitution-Funktion erkannt wird.
|
|
|
|
## Verwendung
|
|
|
|
### In der Rechnungsansicht
|
|
|
|
| Element | Checkbox | Bedeutung |
|
|
|---------|----------|-----------|
|
|
| Section | 📄 | Zur Rechnung hinzufügen |
|
|
| Textzeile | 📄 | Zur Rechnung hinzufügen |
|
|
| Subtotal | 📄 | Zur Rechnung hinzufügen |
|
|
|
|
**Grüner Rand** = Element ist in der Rechnung/PDF enthalten
|
|
|
|
### Im ODT-Template
|
|
|
|
```
|
|
[!-- BEGIN row.lines --]
|
|
|
|
[!-- IF {line_is_section} --]
|
|
{line_desc}
|
|
[!-- ENDIF {line_is_section} --]
|
|
|
|
[!-- IF {line_is_textline} --]
|
|
{line_desc}
|
|
[!-- ENDIF {line_is_textline} --]
|
|
|
|
[!-- IF {line_is_normal} --]
|
|
{line_pos} {line_qty} {line_desc} {line_up_locale} € {line_price_ht_locale} €
|
|
[!-- ENDIF {line_is_normal} --]
|
|
|
|
[!-- IF {line_is_subtotal} --]
|
|
Zwischensumme: {line_price_ht_locale} €
|
|
[!-- ENDIF {line_is_subtotal} --]
|
|
|
|
[!-- END row.lines --]
|
|
```
|
|
|
|
## special_code Werte
|
|
|
|
| Typ | special_code | ODT-Variable |
|
|
|-----|-------------|--------------|
|
|
| Normales Produkt | 0 | `{line_is_normal}` |
|
|
| Section | 100 | `{line_is_section}` |
|
|
| Textzeile | 101 | `{line_is_textline}` |
|
|
| Zwischensumme | 102 | `{line_is_subtotal}` |
|