Version 1.4.0: Dezimalmengen, Direktlinks, Menü-Cleanup
- Dezimalmengen in allen Produktfeldern (Produkte, Mehraufwand, Entfällt) - Button "Stundenzettel öffnen" funktioniert ohne Checkbox-Auswahl - Direktlink zum Stundenzettel-Tab in der Listenansicht - Linkes Menü: nur Übersicht mit Icon, Rest ohne - Aktions-Icons in Listenansicht mit Abstand Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
41973f0231
commit
fe2eb751c2
7 changed files with 39 additions and 34 deletions
8
README.md
Normal file → Executable file
8
README.md
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
||||||
# Stundenzettel Modul für Dolibarr
|
# Stundenzettel Modul für Dolibarr
|
||||||
|
|
||||||
**Version:** 1.3.0
|
**Version:** 1.4.0
|
||||||
**Autor:** Data IT Solution
|
**Autor:** Data IT Solution
|
||||||
**Kompatibilität:** Dolibarr 16.0+
|
**Kompatibilität:** Dolibarr 16.0+
|
||||||
**Lizenz:** GPL v3
|
**Lizenz:** GPL v3
|
||||||
|
|
@ -100,6 +100,12 @@ Sie können beim Kunden (unter **Kunden > Kundenkarte**) eine Standard-Leistung
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### Version 1.4.0
|
||||||
|
- **Stundenzettel öffnen ohne Produktauswahl**: Button "Stundenzettel öffnen" funktioniert jetzt auch ohne Checkbox-Auswahl - öffnet oder erstellt direkt einen Stundenzettel
|
||||||
|
- **Dezimalmengen**: Alle Mengenfelder (Produkte, Mehraufwand, Entfällt) unterstützen jetzt Kommazahlen (z.B. 0,3m Kabel)
|
||||||
|
- **Aktionsspalte in Liste**: Jeder Listeneintrag hat einen direkten Link zum Stundenzettel-Tab des Auftrags
|
||||||
|
- **Aufgeräumtes Menü**: Nur noch die Übersicht hat ein Icon, restliche Menüpunkte ohne Icons
|
||||||
|
|
||||||
### Version 1.3.0
|
### Version 1.3.0
|
||||||
- **Netto STZ Spalte in Auftragsliste**: Neue Spalte zeigt den Netto-Wert aller freigegebenen Stundenzettel eines Auftrags
|
- **Netto STZ Spalte in Auftragsliste**: Neue Spalte zeigt den Netto-Wert aller freigegebenen Stundenzettel eines Auftrags
|
||||||
- Automatische Berechnung bei Freigabe/Wiedereröffnung von Stundenzetteln
|
- Automatische Berechnung bei Freigabe/Wiedereröffnung von Stundenzetteln
|
||||||
|
|
|
||||||
2
ajax/update_qty.php
Normal file → Executable file
2
ajax/update_qty.php
Normal file → Executable file
|
|
@ -28,7 +28,7 @@ if (!$user->hasRight('stundenzettel', 'write')) {
|
||||||
|
|
||||||
$stundenzettel_id = GETPOST('stundenzettel_id', 'int');
|
$stundenzettel_id = GETPOST('stundenzettel_id', 'int');
|
||||||
$line_id = GETPOST('line_id', 'int');
|
$line_id = GETPOST('line_id', 'int');
|
||||||
$qty_done = GETPOST('qty_done', 'int');
|
$qty_done = (float)price2num(GETPOST('qty_done', 'alpha'));
|
||||||
|
|
||||||
if (empty($stundenzettel_id) || empty($line_id)) {
|
if (empty($stundenzettel_id) || empty($line_id)) {
|
||||||
echo json_encode(array('success' => false, 'error' => 'Missing parameters'));
|
echo json_encode(array('success' => false, 'error' => 'Missing parameters'));
|
||||||
|
|
|
||||||
24
card.php
Normal file → Executable file
24
card.php
Normal file → Executable file
|
|
@ -297,7 +297,7 @@ if ($action == 'confirm_delete_leistung' && $confirm == 'yes' && $permissiontoad
|
||||||
// Update product qty
|
// Update product qty
|
||||||
if ($action == 'update_qty' && $permissiontoadd) {
|
if ($action == 'update_qty' && $permissiontoadd) {
|
||||||
$line_id = GETPOST('line_id', 'int');
|
$line_id = GETPOST('line_id', 'int');
|
||||||
$qty_done = GETPOST('qty_done', 'int');
|
$qty_done = (float)price2num(GETPOST('qty_done', 'alpha'));
|
||||||
|
|
||||||
$result = $object->updateProductQty($line_id, $qty_done);
|
$result = $object->updateProductQty($line_id, $qty_done);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
|
|
@ -312,7 +312,7 @@ if ($action == 'update_qty' && $permissiontoadd) {
|
||||||
// Wenn Produkt NICHT im Auftrag → als Mehraufwand hinzufügen
|
// Wenn Produkt NICHT im Auftrag → als Mehraufwand hinzufügen
|
||||||
if ($action == 'add_product' && $permissiontoadd) {
|
if ($action == 'add_product' && $permissiontoadd) {
|
||||||
$fk_product = GETPOST('add_product_id', 'int');
|
$fk_product = GETPOST('add_product_id', 'int');
|
||||||
$qty = GETPOST('add_product_qty', 'int');
|
$qty = (float)price2num(GETPOST('add_product_qty', 'alpha'));
|
||||||
$description = GETPOST('add_product_description', 'restricthtml');
|
$description = GETPOST('add_product_description', 'restricthtml');
|
||||||
|
|
||||||
if ($fk_product > 0 || !empty($description)) {
|
if ($fk_product > 0 || !empty($description)) {
|
||||||
|
|
@ -437,7 +437,7 @@ if ($action == 'add_product' && $permissiontoadd) {
|
||||||
// Entfällt hinzufügen (Produkt aus Auftrag oder Mehraufwand das nicht verbaut wird)
|
// Entfällt hinzufügen (Produkt aus Auftrag oder Mehraufwand das nicht verbaut wird)
|
||||||
if ($action == 'add_entfaellt' && $permissiontoadd) {
|
if ($action == 'add_entfaellt' && $permissiontoadd) {
|
||||||
$entfaellt_product_raw = GETPOST('entfaellt_product', 'alpha');
|
$entfaellt_product_raw = GETPOST('entfaellt_product', 'alpha');
|
||||||
$qty = GETPOST('entfaellt_qty', 'int');
|
$qty = (float)price2num(GETPOST('entfaellt_qty', 'alpha'));
|
||||||
$reason = GETPOST('entfaellt_description', 'restricthtml');
|
$reason = GETPOST('entfaellt_description', 'restricthtml');
|
||||||
|
|
||||||
// Prüfen ob es ein Freitext-Produkt, Mehraufwand oder normales Produkt ist
|
// Prüfen ob es ein Freitext-Produkt, Mehraufwand oder normales Produkt ist
|
||||||
|
|
@ -608,7 +608,7 @@ if ($action == 'confirm_delete_entfaellt' && $confirm == 'yes' && $permissiontoa
|
||||||
// Mehraufwand hinzufügen (zusätzliches Produkt nicht aus Auftrag)
|
// Mehraufwand hinzufügen (zusätzliches Produkt nicht aus Auftrag)
|
||||||
if ($action == 'add_mehraufwand' && $permissiontoadd) {
|
if ($action == 'add_mehraufwand' && $permissiontoadd) {
|
||||||
$fk_product = GETPOST('mehraufwand_product', 'int');
|
$fk_product = GETPOST('mehraufwand_product', 'int');
|
||||||
$qty = GETPOST('mehraufwand_qty', 'int');
|
$qty = (float)price2num(GETPOST('mehraufwand_qty', 'alpha'));
|
||||||
$freetext_description = GETPOST('mehraufwand_description', 'restricthtml');
|
$freetext_description = GETPOST('mehraufwand_description', 'restricthtml');
|
||||||
$reason = GETPOST('mehraufwand_reason', 'restricthtml');
|
$reason = GETPOST('mehraufwand_reason', 'restricthtml');
|
||||||
|
|
||||||
|
|
@ -686,13 +686,13 @@ if ($action == 'add_mehraufwand' && $permissiontoadd) {
|
||||||
// Mehraufwand-Produkt aktualisieren (Menge und Grund)
|
// Mehraufwand-Produkt aktualisieren (Menge und Grund)
|
||||||
if ($action == 'update_mehraufwand' && $permissiontoadd) {
|
if ($action == 'update_mehraufwand' && $permissiontoadd) {
|
||||||
$line_id = GETPOST('line_id', 'int');
|
$line_id = GETPOST('line_id', 'int');
|
||||||
$qty_done = GETPOST('qty_done', 'int');
|
$qty_done = (float)price2num(GETPOST('qty_done', 'alpha'));
|
||||||
$reason = GETPOST('reason', 'restricthtml');
|
$reason = GETPOST('reason', 'restricthtml');
|
||||||
|
|
||||||
if ($line_id > 0 && $qty_done > 0) {
|
if ($line_id > 0 && $qty_done > 0) {
|
||||||
// Menge und Grund aktualisieren
|
// Menge und Grund aktualisieren
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."stundenzettel_product";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."stundenzettel_product";
|
||||||
$sql .= " SET qty_done = ".((int)$qty_done);
|
$sql .= " SET qty_done = ".((float)$qty_done);
|
||||||
$sql .= ", description = ".($reason !== '' ? "'".$db->escape($reason)."'" : "NULL");
|
$sql .= ", description = ".($reason !== '' ? "'".$db->escape($reason)."'" : "NULL");
|
||||||
$sql .= " WHERE rowid = ".((int)$line_id);
|
$sql .= " WHERE rowid = ".((int)$line_id);
|
||||||
$sql .= " AND fk_stundenzettel = ".((int)$object->id);
|
$sql .= " AND fk_stundenzettel = ".((int)$object->id);
|
||||||
|
|
@ -1241,7 +1241,7 @@ elseif ($object->id > 0) {
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update_qty">';
|
print '<input type="hidden" name="action" value="update_qty">';
|
||||||
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
||||||
print '<input type="number" name="qty_done" id="qty_'.$prod->rowid.'" value="'.$qtyDoneFormatted.'" class="flat" style="width:70px; text-align:center;" min="0" step="1" onkeypress="if(event.keyCode==13){this.form.submit();return false;}">';
|
print '<input type="number" name="qty_done" id="qty_'.$prod->rowid.'" value="'.$qtyDoneFormatted.'" class="flat" style="width:70px; text-align:center;" min="0" step="any" onkeypress="if(event.keyCode==13){this.form.submit();return false;}">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print formatQty($prod->qty_done);
|
print formatQty($prod->qty_done);
|
||||||
|
|
@ -1316,7 +1316,7 @@ elseif ($object->id > 0) {
|
||||||
|
|
||||||
// Menge
|
// Menge
|
||||||
print '<td class="center" style="width:80px;">';
|
print '<td class="center" style="width:80px;">';
|
||||||
print '<input type="number" name="add_product_qty" class="flat" style="width:70px; text-align:center;" value="1" min="1">';
|
print '<input type="number" name="add_product_qty" class="flat" style="width:70px; text-align:center;" value="1" min="0" step="any">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Hinzufügen-Button (colspan für Minus, Plus, Save, Delete)
|
// Hinzufügen-Button (colspan für Minus, Plus, Save, Delete)
|
||||||
|
|
@ -1397,7 +1397,7 @@ elseif ($object->id > 0) {
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update_qty">';
|
print '<input type="hidden" name="action" value="update_qty">';
|
||||||
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
||||||
print '<input type="number" name="qty_done" value="'.((int)$prod->qty_done).'" class="flat" style="width:70px; text-align:center;" min="1">';
|
print '<input type="number" name="qty_done" value="'.formatQty($prod->qty_done).'" class="flat" style="width:70px; text-align:center;" min="0" step="any">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|
@ -1555,7 +1555,7 @@ elseif ($object->id > 0) {
|
||||||
|
|
||||||
// Menge (mit dynamischem max basierend auf Produktauswahl)
|
// Menge (mit dynamischem max basierend auf Produktauswahl)
|
||||||
print '<td class="center" style="width:80px;">';
|
print '<td class="center" style="width:80px;">';
|
||||||
print '<input type="number" name="entfaellt_qty" id="entfaellt_qty_input" class="flat" style="width:70px; text-align:center;" value="1" min="1">';
|
print '<input type="number" name="entfaellt_qty" id="entfaellt_qty_input" class="flat" style="width:70px; text-align:center;" value="1" min="0" step="any">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Grund (Desktop: in Zeile, Mobile: ausgeblendet)
|
// Grund (Desktop: in Zeile, Mobile: ausgeblendet)
|
||||||
|
|
@ -1665,7 +1665,7 @@ elseif ($object->id > 0) {
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update_mehraufwand">';
|
print '<input type="hidden" name="action" value="update_mehraufwand">';
|
||||||
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
print '<input type="hidden" name="line_id" value="'.$prod->rowid.'">';
|
||||||
print '<input type="number" name="qty_done" value="'.((int)$qty).'" class="flat" style="width:70px; text-align:center;" min="1">';
|
print '<input type="number" name="qty_done" value="'.formatQty($qty).'" class="flat" style="width:70px; text-align:center;" min="0" step="any">';
|
||||||
} else {
|
} else {
|
||||||
print formatQty($qty);
|
print formatQty($qty);
|
||||||
}
|
}
|
||||||
|
|
@ -1729,7 +1729,7 @@ elseif ($object->id > 0) {
|
||||||
|
|
||||||
// Menge
|
// Menge
|
||||||
print '<td class="center" style="width:80px;">';
|
print '<td class="center" style="width:80px;">';
|
||||||
print '<input type="number" name="mehraufwand_qty" class="flat" style="width:70px; text-align:center;" value="1" min="1">';
|
print '<input type="number" name="mehraufwand_qty" class="flat" style="width:70px; text-align:center;" value="1" min="0" step="any">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Grund (Desktop: in Zeile, Mobile: ausgeblendet)
|
// Grund (Desktop: in Zeile, Mobile: ausgeblendet)
|
||||||
|
|
|
||||||
7
core/modules/modStundenzettel.class.php
Normal file → Executable file
7
core/modules/modStundenzettel.class.php
Normal file → Executable file
|
|
@ -53,7 +53,7 @@ class modStundenzettel extends DolibarrModules
|
||||||
$this->descriptionlong = "Verwaltet Stundenzettel für Kundenaufträge. Ermöglicht die Dokumentation von Arbeitszeiten, verbrauchten Materialien und Notizen. Integration mit SubtotalTitle für Produktgruppen-Unterstützung.";
|
$this->descriptionlong = "Verwaltet Stundenzettel für Kundenaufträge. Ermöglicht die Dokumentation von Arbeitszeiten, verbrauchten Materialien und Notizen. Integration mit SubtotalTitle für Produktgruppen-Unterstützung.";
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
$this->version = '1.3.0';
|
$this->version = '1.4.0';
|
||||||
|
|
||||||
// Autor
|
// Autor
|
||||||
$this->editor_name = 'Data IT Solution';
|
$this->editor_name = 'Data IT Solution';
|
||||||
|
|
@ -210,7 +210,6 @@ class modStundenzettel extends DolibarrModules
|
||||||
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Alle Stundenzettel',
|
'titre' => 'Alle Stundenzettel',
|
||||||
'prefix' => img_picto('', 'list', 'class="pictofixedwidth"'),
|
|
||||||
'mainmenu' => 'stundenzettel',
|
'mainmenu' => 'stundenzettel',
|
||||||
'leftmenu' => 'stundenzettel_list',
|
'leftmenu' => 'stundenzettel_list',
|
||||||
'url' => '/stundenzettel/list.php',
|
'url' => '/stundenzettel/list.php',
|
||||||
|
|
@ -228,7 +227,6 @@ class modStundenzettel extends DolibarrModules
|
||||||
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Neuer Stundenzettel',
|
'titre' => 'Neuer Stundenzettel',
|
||||||
'prefix' => img_picto('', 'add', 'class="pictofixedwidth"'),
|
|
||||||
'mainmenu' => 'stundenzettel',
|
'mainmenu' => 'stundenzettel',
|
||||||
'leftmenu' => 'stundenzettel_new',
|
'leftmenu' => 'stundenzettel_new',
|
||||||
'url' => '/stundenzettel/card.php?action=create',
|
'url' => '/stundenzettel/card.php?action=create',
|
||||||
|
|
@ -246,7 +244,6 @@ class modStundenzettel extends DolibarrModules
|
||||||
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Offene Stundenzettel',
|
'titre' => 'Offene Stundenzettel',
|
||||||
'prefix' => img_picto('', 'statut0', 'class="pictofixedwidth"'),
|
|
||||||
'mainmenu' => 'stundenzettel',
|
'mainmenu' => 'stundenzettel',
|
||||||
'leftmenu' => 'stundenzettel_open',
|
'leftmenu' => 'stundenzettel_open',
|
||||||
'url' => '/stundenzettel/list.php?search_status=0',
|
'url' => '/stundenzettel/list.php?search_status=0',
|
||||||
|
|
@ -264,7 +261,6 @@ class modStundenzettel extends DolibarrModules
|
||||||
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Meine Stundenzettel',
|
'titre' => 'Meine Stundenzettel',
|
||||||
'prefix' => img_picto('', 'user', 'class="pictofixedwidth"'),
|
|
||||||
'mainmenu' => 'stundenzettel',
|
'mainmenu' => 'stundenzettel',
|
||||||
'leftmenu' => 'stundenzettel_my',
|
'leftmenu' => 'stundenzettel_my',
|
||||||
'url' => '/stundenzettel/list.php?search_author=__USER_ID__',
|
'url' => '/stundenzettel/list.php?search_author=__USER_ID__',
|
||||||
|
|
@ -282,7 +278,6 @@ class modStundenzettel extends DolibarrModules
|
||||||
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
'fk_menu' => 'fk_mainmenu=stundenzettel',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Freigegeben',
|
'titre' => 'Freigegeben',
|
||||||
'prefix' => img_picto('', 'statut4', 'class="pictofixedwidth"'),
|
|
||||||
'mainmenu' => 'stundenzettel',
|
'mainmenu' => 'stundenzettel',
|
||||||
'leftmenu' => 'stundenzettel_validated',
|
'leftmenu' => 'stundenzettel_validated',
|
||||||
'url' => '/stundenzettel/list.php?search_status=1',
|
'url' => '/stundenzettel/list.php?search_status=1',
|
||||||
|
|
|
||||||
1
langs/de_DE/stundenzettel.lang
Normal file → Executable file
1
langs/de_DE/stundenzettel.lang
Normal file → Executable file
|
|
@ -68,6 +68,7 @@ SelectProducts = Produkte auswählen
|
||||||
NoProductsInOrder = Keine Produkte im Auftrag
|
NoProductsInOrder = Keine Produkte im Auftrag
|
||||||
AllProductsUsedOrOmitted = Alle Produkte bereits verbaut oder als entfällt markiert
|
AllProductsUsedOrOmitted = Alle Produkte bereits verbaut oder als entfällt markiert
|
||||||
TransferProducts = Produkte übernehmen
|
TransferProducts = Produkte übernehmen
|
||||||
|
OpenStundenzettel = Stundenzettel öffnen
|
||||||
TransferToStundenzettel = Übernehmen in Stundenzettel
|
TransferToStundenzettel = Übernehmen in Stundenzettel
|
||||||
FromOrder = Aus Auftrag
|
FromOrder = Aus Auftrag
|
||||||
Added = Hinzugefügt
|
Added = Hinzugefügt
|
||||||
|
|
|
||||||
5
list.php
Normal file → Executable file
5
list.php
Normal file → Executable file
|
|
@ -191,7 +191,10 @@ if ($resql) {
|
||||||
print '<td class="center">'.$objectstatic->LibStatut($obj->status, 5).'</td>';
|
print '<td class="center">'.$objectstatic->LibStatut($obj->status, 5).'</td>';
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
print '<td class="center">';
|
print '<td class="center nowraponall">';
|
||||||
|
if ($obj->fk_commande > 0) {
|
||||||
|
print '<a style="display:inline-block;margin-right:10px;" href="'.dol_buildpath('/stundenzettel/stundenzettel_commande.php?id='.$obj->fk_commande.'&tab=products&noredirect=1', 1).'" title="Stundenzettel bearbeiten">'.img_picto('Stundenzettel bearbeiten', 'edit').'</a>';
|
||||||
|
}
|
||||||
print '<a href="'.dol_buildpath('/stundenzettel/card.php?id='.$obj->rowid, 1).'">'.img_picto($langs->trans("View"), 'eye').'</a>';
|
print '<a href="'.dol_buildpath('/stundenzettel/card.php?id='.$obj->rowid, 1).'">'.img_picto($langs->trans("View"), 'eye').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|
|
||||||
18
stundenzettel_commande.php
Normal file → Executable file
18
stundenzettel_commande.php
Normal file → Executable file
|
|
@ -104,18 +104,16 @@ if ($action == 'transfer_products' && $user->hasRight('stundenzettel', 'write'))
|
||||||
$date_stundenzettel = GETPOST('date_stundenzettel', 'alpha');
|
$date_stundenzettel = GETPOST('date_stundenzettel', 'alpha');
|
||||||
$target_stundenzettel_id = GETPOST('stundenzettel_id', 'int'); // Vorausgewählter Stundenzettel
|
$target_stundenzettel_id = GETPOST('stundenzettel_id', 'int'); // Vorausgewählter Stundenzettel
|
||||||
|
|
||||||
// Prüfe ob mindestens etwas ausgewählt wurde
|
// Wenn nichts ausgewählt: Stundenzettel finden/erstellen und dorthin navigieren
|
||||||
if (empty($selected) && empty($selected_mehraufwand)) {
|
|
||||||
setEventMessages($langs->trans('NoProductsSelected'), null, 'errors');
|
|
||||||
} else {
|
|
||||||
// Wenn nur Mehraufwand ausgewählt, $selected als leeres Array initialisieren
|
|
||||||
if (empty($selected)) {
|
if (empty($selected)) {
|
||||||
$selected = array();
|
$selected = array();
|
||||||
}
|
}
|
||||||
|
if (empty($selected_mehraufwand)) {
|
||||||
|
$selected_mehraufwand = array();
|
||||||
|
}
|
||||||
|
|
||||||
// Mehraufwand-Zeilen werden direkt übernommen (ohne Bestätigungs-Dialog)
|
{
|
||||||
|
// Produkte werden direkt übernommen (falls ausgewählt)
|
||||||
// Produkte werden direkt übernommen (ohne Bestätigungs-Dialoge)
|
|
||||||
$stundenzettel = new Stundenzettel($db);
|
$stundenzettel = new Stundenzettel($db);
|
||||||
$use_stundenzettel_id = 0;
|
$use_stundenzettel_id = 0;
|
||||||
$forceNewStundenzettel = GETPOST('force_new_stundenzettel', 'int');
|
$forceNewStundenzettel = GETPOST('force_new_stundenzettel', 'int');
|
||||||
|
|
@ -246,7 +244,9 @@ if ($action == 'transfer_products' && $user->hasRight('stundenzettel', 'write'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($selected) || !empty($selected_mehraufwand)) {
|
||||||
setEventMessages($langs->trans('ProductsTransferred'), null, 'mesgs');
|
setEventMessages($langs->trans('ProductsTransferred'), null, 'mesgs');
|
||||||
|
}
|
||||||
header('Location: '.dol_buildpath('/stundenzettel/card.php?id='.$use_stundenzettel_id.'&tab=products', 1));
|
header('Location: '.dol_buildpath('/stundenzettel/card.php?id='.$use_stundenzettel_id.'&tab=products', 1));
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2031,7 +2031,7 @@ if ($tab == 'products') {
|
||||||
// Button nur anzeigen wenn nicht freigegeben
|
// Button nur anzeigen wenn nicht freigegeben
|
||||||
if ($stundenzettelStatus == 0) {
|
if ($stundenzettelStatus == 0) {
|
||||||
print '<div class="center" style="margin-top:20px;">';
|
print '<div class="center" style="margin-top:20px;">';
|
||||||
print '<input type="submit" class="button button-primary" value="'.$langs->trans("TransferProducts").'">';
|
print '<input type="submit" class="button button-primary" value="'.$langs->trans("OpenStundenzettel").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
} elseif ($stundenzettelStatus == 1) {
|
} elseif ($stundenzettelStatus == 1) {
|
||||||
// Status 1: Freigegeben - zeige Meldung mit Wiedereröffnen-Button
|
// Status 1: Freigegeben - zeige Meldung mit Wiedereröffnen-Button
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue