fix: Mein Betrieb - virtuelle socId und generischerer Name
- Virtuelle ID 99999999 statt $mysoc->id (ist immer 0 in Dolibarr) - Umbenennung "Firmen-Werkzeuge" → "Mein Betrieb" für mehrere Systeme - Unnötige Societe/Company-Includes entfernt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a14b33b7c7
commit
7a548c87e2
3 changed files with 7 additions and 14 deletions
|
|
@ -562,8 +562,8 @@ Decommission = Ausbauen
|
||||||
Recommission = Wieder einbauen
|
Recommission = Wieder einbauen
|
||||||
ShowDecommissioned = Ausgebaute Elemente anzeigen
|
ShowDecommissioned = Ausgebaute Elemente anzeigen
|
||||||
|
|
||||||
# Werkzeuge & Zubehör
|
# Eigener Betrieb & Zubehör
|
||||||
CompanyTools = Firmen-Werkzeuge
|
CompanyTools = Mein Betrieb
|
||||||
HasAccessories = Hat Zubehör
|
HasAccessories = Hat Zubehör
|
||||||
HasAccessoriesHelp = Ermöglicht die Zuordnung von Zubehör und Ersatzteilen
|
HasAccessoriesHelp = Ermöglicht die Zuordnung von Zubehör und Ersatzteilen
|
||||||
Accessories = Zubehör / Ersatzteile
|
Accessories = Zubehör / Ersatzteile
|
||||||
|
|
|
||||||
|
|
@ -310,8 +310,8 @@ Decommission = Decommission
|
||||||
Recommission = Recommission
|
Recommission = Recommission
|
||||||
ShowDecommissioned = Show decommissioned elements
|
ShowDecommissioned = Show decommissioned elements
|
||||||
|
|
||||||
# Tools & Accessories
|
# Own Company & Accessories
|
||||||
CompanyTools = Company Tools
|
CompanyTools = My Company
|
||||||
HasAccessories = Has Accessories
|
HasAccessories = Has Accessories
|
||||||
HasAccessoriesHelp = Allows assigning accessories and spare parts
|
HasAccessoriesHelp = Allows assigning accessories and spare parts
|
||||||
Accessories = Accessories / Spare Parts
|
Accessories = Accessories / Spare Parts
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@ if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
|
||||||
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
|
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
|
||||||
if (!$res) die("Include of main fails");
|
if (!$res) die("Include of main fails");
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|
||||||
dol_include_once('/kundenkarte/class/anlage.class.php');
|
dol_include_once('/kundenkarte/class/anlage.class.php');
|
||||||
dol_include_once('/kundenkarte/class/anlagetype.class.php');
|
dol_include_once('/kundenkarte/class/anlagetype.class.php');
|
||||||
dol_include_once('/kundenkarte/class/anlagefile.class.php');
|
dol_include_once('/kundenkarte/class/anlagefile.class.php');
|
||||||
|
|
@ -37,14 +35,9 @@ $confirm = GETPOST('confirm', 'alpha');
|
||||||
$anlageId = GETPOSTINT('anlage_id');
|
$anlageId = GETPOSTINT('anlage_id');
|
||||||
$parentId = GETPOSTINT('parent_id');
|
$parentId = GETPOSTINT('parent_id');
|
||||||
|
|
||||||
// Eigene Firma als Kontext
|
// Virtuelle Firma-ID für Werkzeuge - braucht keinen echten Societe-Eintrag
|
||||||
$socId = $mysoc->id;
|
// Die Anlage-Tabelle verwendet diese ID nur als Gruppierung
|
||||||
if ($socId <= 0) {
|
$socId = 99999999;
|
||||||
setEventMessages('Eigene Firma nicht konfiguriert. Bitte unter Einrichtung → Firma konfigurieren.', null, 'errors');
|
|
||||||
llxHeader('', 'Firmen-Werkzeuge');
|
|
||||||
llxFooter();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// WERKZEUG-System ermitteln
|
// WERKZEUG-System ermitteln
|
||||||
$werkzeugSystemId = 0;
|
$werkzeugSystemId = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue