Compare commits

...

33 Commits

Author SHA1 Message Date
OpenXE
87739fccc5 Reordered navigation 2024-08-29 14:59:49 +02:00
OpenXE
c31b1a2b0d Version 1.12 2024-08-29 14:19:19 +02:00
OpenXE
39f9440990 Merge branch 'ps' 2024-08-29 14:17:25 +02:00
OpenXE
586e1bd9b9 bugfix exciler PR 2024-08-29 12:24:09 +02:00
OpenXE-ERP
ec68922e7a
Merge pull request #152 from exciler/bugfix_shopimport
FIX Shopimport: Update shop orders without shipments
2024-08-28 16:02:42 +02:00
OpenXE-ERP
d176ff757c
Merge pull request #151 from exciler/bugfix_articlethumbnail
Bugfix articlethumbnail
2024-08-28 16:02:30 +02:00
Andreas Palm
543c52f2f1 FIX Article: Use default picture selection in briefpapier 2024-08-27 15:44:20 +02:00
OpenXE-ERP
da8e007531
Merge pull request #150 from exciler/bugfix_shopimport
Shopimport: Fix sql escaping
2024-08-27 12:13:06 +02:00
OpenXE
a9656114a2 Bugfix verbindlichkeit positionen 2024-08-27 11:59:03 +02:00
Andreas Palm
1775d0b47f FIX Article: Filter deleted files from default picture selection 2024-08-26 22:19:15 +02:00
Andreas Palm
b7ade7b4b2 FIX Article: Filter deleted files from thumbnail selection 2024-08-26 21:58:28 +02:00
OpenXE
43b2cb05c0 Bugfix verbindlichkeit datepicker & skonto, zahlbarbis 0 tage 2024-08-26 14:18:41 +02:00
Andreas Palm
7675f93034 FIX Shopimport: Update shop orders without shipments 2024-08-25 21:50:50 +02:00
OpenXE
19ac3415e3 verbindlichkeit bugfix netto positions rounded 2024-08-25 20:15:43 +02:00
OpenXE
50d8646d70 verbindlichkeit date assistant 2024-08-25 14:33:11 +02:00
Andreas Palm
e1b9428ef5 Shopimport: Fix sql escaping 2024-08-14 09:48:51 +02:00
OpenXE
23b9fa781b Smarty shopimport, additional database entries for fresh install 2024-08-11 13:19:53 +02:00
OpenXE
7e2155f586 TOTP, additional database entries for fresh install 2024-08-11 13:10:35 +02:00
OpenXE
5ad57e2fc8 bugfix TOTP, additional database entries needed: login_password_check_otp (hook), TOTPCheckLogin (hook_register) 2024-08-11 12:52:06 +02:00
OpenXE
94f3fb0261 cronjobs/cleaner.php removed shopimport_amazon_fees 2024-08-03 14:28:05 +02:00
OpenXE
d180a1af54 module_creator echo $sql 2024-08-03 13:33:58 +02:00
OpenXE
cbd44d167a rework paketmarke contact fields 2024-07-13 15:19:54 +02:00
OpenXE
78dff8b5c1 Buchhaltung export UTF-8, UTF-8-BOM 2024-07-11 17:16:22 +02:00
OpenXE
71337794ce Bugfix gruppen kennziffer 2024-07-08 20:01:59 +02:00
OpenXE
f8e8b30e78 Merge branch 'master' into ps 2024-07-08 19:32:39 +02:00
OpenXE
7e44bbeccf bugfix artikeltexte 2024-07-02 13:20:21 +02:00
OpenXE
09aacfbb7b Bugfix file upload dragndrop 2024-06-12 15:14:57 +02:00
OpenXE
2b43efca70 Bugfix add price when address is in several groups 2024-06-11 20:00:16 +02:00
OpenXE
0b5b7cbed1 Bugfixes adressstammdatenblatt 2024-06-11 19:45:39 +02:00
OpenXE
3c170318df gruppen module reimplemented 2024-06-10 17:43:16 +02:00
OpenXE
575c15c333 adress search filter search in delivery adress 2024-06-08 10:03:14 +02:00
OpenXE
1321cb9ece artikeltexte improvements and navigation 2024-06-05 18:44:24 +02:00
OpenXE
a5f5f4aede reimplemented module artikeltexte 2024-06-05 09:48:56 +02:00
36 changed files with 2654 additions and 1618 deletions

View File

@ -14,17 +14,17 @@ class Shipment
public int $id;
/**
* @var string plain tracking number
* @var ?string plain tracking number
*/
public string $trackingNumber;
public ?string $trackingNumber;
/**
* @var string URL to view tracking details
* @var ?string URL to view tracking details
*/
public string $trackingUrl;
public ?string $trackingUrl;
/**
* @var string shipping method (after mapping to Shop domain)
* @var ?string shipping method (after mapping to Shop domain)
*/
public string $shippingMethod;
public ?string $shippingMethod;
}

View File

@ -270,7 +270,7 @@ class TOTPLoginService
$secret = $this->getTOTPSecret($userId);
}
$query = "otpauth://totp/{$label}?secret=" . $secret . '&issuer=Xentral&algorithm=SHA1&digits=6&period=30';
$query = "otpauth://totp/{$label}?secret=" . $secret . '&issuer=OpenXE&algorithm=SHA1&digits=6&period=30';
return $this->barcodeService->createQrCode($query);
}

View File

@ -148,8 +148,7 @@ $tables = [
'templatemessage',
'shopimport_auftraege',
'versandzentrum_log',
'api_request_response_log',
'shopimport_amazon_fees',
'api_request_response_log'
];
$minMemoryMb = 1;
$minMemory = $minMemoryMb * 1024 * 1024;
@ -623,34 +622,11 @@ if($shopExportLogCleanerActive && $tage > 0) {
$shopExportLogCleanerActive = $app->erp->Firmendaten('cleaner_shopexportlog');
$tage = (int)$app->erp->Firmendaten('cleaner_shopexportlog_tage');
$isToDelete = !empty($tableSchemaByTables['shopimport_amazon_fees'])
&& !empty($tableSchemaByTables['shopimport_amazon_fees']['todelete']);
if((!$shopExportLogCleanerActive || $tage <= 0 || $tage > 30) && $isToDelete) {
$shopExportLogCleanerActive = true;
if($tage <= 0 || $tage > 30) {
$tage = 30;
}
}
if($shopExportLogCleanerActive && $tage > 0) {
if($tage < 30) {
$tage = 30;
}
$app->DB->Delete(
sprintf(
"DELETE FROM `shopimport_amazon_fees`
WHERE DATE_SUB(NOW(), INTERVAL %d DAY) >= `zeitstempel` OR `zeitstempel` = '0000-00-00 00:00:00'",
$tage
)
);
$affectedRows = $app->DB->affected_rows();
if(!empty($tableSchemaByTables['shopimport_amazon_fees'])
&& ($tableSchemaByTables['shopimport_amazon_fees']['todelete'] > 0)) {
$tableSchemaByTables['shopimport_amazon_fees']['todelete'] -= $affectedRows;
}
if($affectedRows > 0 && !empty($optimize['shopimport_amazon_fees'])) {
$app->DB->Query('OPTIMIZE TABLE `shopimport_amazon_fees`');
unset($optimize['shopimport_amazon_fees']);
}
$app->DB->Update(
"UPDATE prozessstarter SET letzteausfuerhung=NOW(),mutex=1,mutexcounter=0 WHERE parameter = 'cleaner' AND aktiv = 1"
);

View File

@ -17873,6 +17873,23 @@ INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `ho
;
/* OpenXE 2024-02-03 für belegvorlagen */
/* OpenXE 2024-08-11 für TOTP */
INSERT INTO `hook`(`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
('login_password_check_otp', 1, 3, '', '');
INSERT INTO `hook_register`(
`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
( 0, 'TOTPCheckLogin', 1, 1, (SELECT id FROM hook WHERE NAME = 'login_password_check_otp' LIMIT 1), 'totp', 0);
/* OpenXE 2024-08-11 für TOTP */
/* OpenXE 2024-08-11 für Smarty shopimport */
INSERT INTO `hook` (`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
('ImportAuftragBefore', 1, 4, '', '');
INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
(0, 'ImportAuftragBeforeHook', 1, 1, (SELECT id FROM hook WHERE name = 'ImportAuftragBefore' LIMIT 1), 'onlineshops', 0);
/* OpenXE 2024-08-11 für Smarty shopimport */
/*
BelegPositionenButtons

View File

@ -616,7 +616,7 @@ class TemplateParser {
}
}
if(count($this->VARARRAY)>0)
if(!empty($this->VARARRAY))
foreach($this->VARARRAY as $key=>$value)
{
if($key!="")

View File

@ -1938,8 +1938,17 @@ class YUI {
}
}
$this->app->erp->RunHook('AARLGPositionenSprache', 6, $module, $id, $artikel_id, $sprache, $bezeichnung, $beschreibung);
// OpenXE artikel_texte
$language = $this->app->erp->GetSpracheBeleg($module,$id);
$sql = "SELECT * FROM artikel_texte WHERE artikel = '".$artikel_id."' AND sprache = '".$language."'";
$uebersetzung = $this->app->DB->SelectRow($sql);
if ($uebersetzung) {
$bezeichnung = $uebersetzung['name'];
$beschreibung = $uebersetzung['beschreibung'];
}
$bezeichnung = $this->app->DB->real_escape_string($bezeichnung);
$beschreibung = $this->app->DB->real_escape_string($beschreibung);
@ -5290,6 +5299,25 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
)
";
}
if(isset($parameter['lieferadresse']) && !empty($parameter['lieferadresse'])) {
$paramsArray[] = "
(
a.id IN
(
SELECT
adresse
FROM
lieferadressen lfadr
WHERE
lfadr.name LIKE '%" . $parameter['lieferadresse'] . "%' OR
lfadr.strasse LIKE '%" . $parameter['lieferadresse'] . "%' OR
lfadr.plz LIKE '%" . $parameter['lieferadresse'] . "%' OR
lfadr.ort LIKE '%" . $parameter['lieferadresse'] . "%'
)
)
";
}
if(isset($parameter['abteilung']) && !empty($parameter['abteilung'])) {
$paramsArray[] = "a.abteilung LIKE '%".$parameter['abteilung']."%' ";
@ -14131,24 +14159,18 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$action = $this->app->Secure->GetGET("action");
$id = $this->app->Secure->GetGET("id");
if($id)$this->app->Tpl->Set('ID',$id);
if ($speichern != "") {
$titel = $this->app->Secure->GetPOST("titel");
$beschreibung = $this->app->Secure->GetPOST("beschreibung");
$stichwort = $this->app->Secure->GetPOST("stichwort");
$this->app->Tpl->Set('TITLE', $titel);
$this->app->Tpl->Set('BESCHREIBUNG', $beschreibung);
if ($_FILES['upload']['tmp_name'] == "") {
$this->app->Tpl->Set('ERROR', "<div class=\"info\">Bitte w&auml;hlen Sie eine Datei aus und laden Sie diese herauf!</div>");
$this->app->erp->EnableTab("tabs-2");
} else {
//$fileid = $this->app->erp->CreateDatei($_FILES['upload']['name'],$titel,$beschreibung,"",$_FILES['upload']['tmp_name'],$this->app->User->GetName());
$this->app->erp->AddDateiVersion($datei, $this->app->User->GetName(), $_FILES['upload']['name'], "Neue Version", $_FILES['upload']['tmp_name']);
header("Location: index.php?module=$module&action=$action&id=$id");
exit;
// Get files here
if ($speichern != "") {
$retval = $this->FilesFromUploadtoDMS(null, null, $datei);
if ($retval !== true) {
$this->app->Tpl->Set('ERROR', implode(', ',$retval));
$this->app->erp->EnableTab("tabs-2");
} else {
header("Location: index.php?module=$module&action=$action&id=$id");
}
}
$this->app->Tpl->Set('STARTDISABLE', "<!--");
$this->app->Tpl->Set('ENDEDISABLE', "-->");
$this->app->Tpl->Parse($parsetarget, "datei_neudirekt.tpl");
@ -14225,61 +14247,18 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$id = $this->app->Secure->GetGET("id");
$sid = $this->app->Secure->GetGET("sid");
if($id)$this->app->Tpl->Set('ID', $id);
// Get files here
if ($speichern != "") {
if($parameter == '')$parameter = $id;
if(isset($_POST['dateiv']))
{
foreach($_POST['dateiv'] as $k => $v)
{
$name = $this->app->DB->real_escape_string($_POST['dateiname'][$k]);
$titel = $this->app->DB->real_escape_string($_POST['dateititel'][$k]);
$beschreibung = $this->app->DB->real_escape_string($_POST['beschreibung'][$k]);
$stichwort = $this->app->DB->real_escape_string($_POST['dateistichwort'][$k]);
//$getMime = explode('.', $name);
//$mime = end($getMime);
$data = explode(',', $v);
$encodedData = str_replace(' ','+',$data[1]);
$decodedData = base64_decode($encodedData);
$this->app->Tpl->Set('TITLE', $titel);
$this->app->Tpl->Set('BESCHREIBUNG', $beschreibung);
if ($v == "" ) {
$this->app->Tpl->Set('ERROR', "<div class=\"error\">Keine Datei ausgew&auml;hlt!</div>");
$this->app->erp->EnableTab("tabs-2");
} else {
$fileid = $this->app->erp->CreateDatei($name, $titel, $beschreibung, "", $decodedData, $this->app->User->GetName());
// stichwoerter hinzufuegen
$this->app->erp->AddDateiStichwort($fileid, $stichwort, $objekt, $parameter);
}
}
if($_FILES['upload']['tmp_name'] == "")
{
header("Location: index.php?module=$_module&action=$_action&id=$id&sid=$sid".($typ!=''?"&typ=".$typ:''));
}
if($parameter == '') {
$parameter = $id;
}
$titel = $this->app->Secure->GetPOST("titel");
$beschreibung = $this->app->Secure->GetPOST("beschreibung");
$stichwort = $this->app->Secure->GetPOST("stichwort");
$this->app->Tpl->Set('TITLE', $titel);
$this->app->Tpl->Set('BESCHREIBUNG', $beschreibung);
if ($_FILES['upload']['tmp_name'] == "" && empty($_POST['dateiv'])) {
$this->app->Tpl->Set('ERROR', "<div class=\"error\">Keine Datei ausgew&auml;hlt!</div>");
$this->app->erp->EnableTab("tabs-2");
} elseif($_FILES['upload']['tmp_name'] != '') {
$fileid = $this->app->erp->CreateDatei($_FILES['upload']['name'], $titel, $beschreibung, "", $_FILES['upload']['tmp_name'], $this->app->User->GetName());
// stichwoerter hinzufuegen
$this->app->erp->AddDateiStichwort($fileid, $stichwort, $objekt, $parameter);
header("Location: index.php?module=$_module&action=$_action&id=$id&sid=$sid".($typ!=''?"&typ=".$typ:''));
$retval = $this->FilesFromUploadtoDMS($objekt, $parameter);
if ($retval !== true) {
$this->app->Tpl->Set('ERROR', implode(', ',$retval));
$this->app->erp->EnableTab("tabs-2");
} else {
header("Location: index.php?module=$_module&action=$_action&id=$id&sid=$sid".($typ!=''?"&typ=".$typ:''));
}
}
@ -14547,6 +14526,87 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
}
}
/*
* Retrieve uploaded files and put them into DMS
* $datei: given file, just add a new version
* Return array of errors or true
*/
function FilesFromUploadtoDMS($objekt, $parameter, $datei = false) {
$retval = true;
// Files come from drag'n'drop
if(isset($_POST['dateiv']))
{
foreach($_POST['dateiv'] as $k => $v)
{
$name = $this->app->DB->real_escape_string($_POST['dateiname'][$k]);
$titel = $this->app->DB->real_escape_string($_POST['dateititel'][$k]);
$beschreibung = $this->app->DB->real_escape_string($_POST['dateibeschreibung'][$k]);
$stichwort = $this->app->DB->real_escape_string($_POST['dateistichwort'][$k]);
$data = explode(',', $v);
$encodedData = str_replace(' ','+',$data[1]);
$decodedData = base64_decode($encodedData);
$this->app->Tpl->Set('TITLE', $titel);
$this->app->Tpl->Set('BESCHREIBUNG', $beschreibung);
if ($v == "" ) {
$this->app->Tpl->Set('ERROR', "<div class=\"error\">Keine Datei ausgew&auml;hlt!</div>");
$this->app->erp->EnableTab("tabs-2");
} else {
// Save file to disk first
$tempfilename = rtrim($this->app->erp->GetTMP(), '/') . "/" . $name;
if($handle = fopen($tempfilename, "wb")){
fwrite($handle, $decodedData);
fclose($handle);
// Add file to DMS
if ($datei) {
$this->app->erp->AddDateiVersion($datei, $this->app->User->GetName(), $name, "Neue Version", $tempfilename);
} else {
$fileid = $this->app->erp->CreateDatei($name, $titel, $beschreibung, "", $tempfilename, $this->app->User->GetName());
// stichwoerter hinzufuegen
$this->app->erp->AddDateiStichwort($fileid, $stichwort, $objekt, $parameter);
}
} else {
if ($retval === true) {
$retval = array();
}
$retval[] = "<div class=\"error\">Datei konnte nicht gespeichert werden: ".$name."</div>";
}
}
}
} // drag'n'drop
// Single file comes from browse button
else {
$titel = $this->app->Secure->GetPOST("titel");
$beschreibung = $this->app->Secure->GetPOST("beschreibung");
$stichwort = $this->app->Secure->GetPOST("stichwort");
$this->app->Tpl->Set('TITLE', $titel);
$this->app->Tpl->Set('BESCHREIBUNG', $beschreibung);
if ($_FILES['upload']['tmp_name'] == "" && empty($_POST['dateiv'])) {
$this->app->erp->EnableTab("tabs-2");
if ($retval === true) {
$retval = array();
}
$retval[] = "<div class=\"error\">Keine Datei ausgew&auml;hlt!</div>";
} elseif ($_FILES['upload']['tmp_name'] != '') {
if ($datei) {
$this->app->erp->AddDateiVersion($datei, $this->app->User->GetName(), $_FILES['upload']['name'], "Neue Version", $_FILES['upload']['tmp_name']);
}
else {
$fileid = $this->app->erp->CreateDatei($_FILES['upload']['name'], $titel, $beschreibung, "", $_FILES['upload']['tmp_name'], $this->app->User->GetName());
// stichwoerter hinzufuegen
$this->app->erp->AddDateiStichwort($fileid, $stichwort, $objekt, $parameter);
}
}
}
return($retval);
}
function SortListAdd($parsetarget, &$ref, $menu, $sql, $sort = true) {
$module = $this->app->Secure->GetGET("module");

View File

@ -36,7 +36,7 @@ class PLACEHOLDER_MODULECLASSNAME {
// columns that are aligned right (numbers etc)
// $alignright = array(4,5,6,7,8);
$findcols = array('PLACEHOLDER_ID_COLUMN','PLACEHOLDER_ID_COLUMN',PLACEHOLDER_SQL_COLUMNS);
$findcols = array('PLACEHOLDER_ID_COLUMN','PLACEHOLDER_ID_COLUMN',PLACEHOLDER_SQL_COLUMNS); // use 'null' for non-searchable columns
$searchsql = array(PLACEHOLDER_SQL_COLUMNS);
$defaultorder = 1;
@ -60,6 +60,8 @@ class PLACEHOLDER_MODULECLASSNAME {
$count = "SELECT count(DISTINCT id) FROM PLACEHOLDER_MODULENAME WHERE $where";
// $groupby = "";
// echo($sql." WHERE ".$where." ".$groupby);
break;
}

View File

@ -18196,7 +18196,7 @@
},
{
"Field": "sprache",
"Type": "varchar(11)",
"Type": "varchar(30)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",

View File

@ -1,7 +1,7 @@
<?php
$version="OSS";
$version_revision="1.11";
$version_revision="1.12";
$gitinfo = file_get_contents("../gitinfo.json");
if (!empty($gitinfo)) {
$gitinfo = json_decode($gitinfo);

View File

@ -7077,155 +7077,138 @@ title: 'Abschicken',
{
// admin menu
$menu = 0;
// ------ Stammdaten
$navarray['menu']['admin'][++$menu]['first'] = array('Stammdaten','adresse','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Adressen','adresse','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Artikel','artikel','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Projekte','projekt','list');
// ------ Verkauf
$navarray['menu']['admin'][++$menu]['first'] = array('Verkauf','auftrag','list');
if($this->ModulVorhanden("anfrage")){
$navarray['menu']['admin'][$menu]['sec'][] = array('Anfrage', 'anfrage', 'list');
}
$navarray['menu']['admin'][$menu]['sec'][] = array('Angebot'.($this->Firmendaten("bezeichnungangebotersatz") && $this->Firmendaten("bezeichnungangebotersatz") != 'Angebot'? ' / '.$this->Firmendaten("bezeichnungangebotersatz"):''),'angebot','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Auftrag','auftrag','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('POS','pos','list');
$navarray['menu']['admin'][++$menu]['first'] = array('Einkauf','auftrag','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Preisanfrage','preisanfrage','list');
// ------ Beschaffung
$navarray['menu']['admin'][++$menu]['first'] = array('Beschaffung','auftrag','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Bestellung','bestellung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Bestellvorschlag','bestellvorschlag','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Erweiterter Bestellvorschlag','bestellvorschlagapp','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Preisanfrage','preisanfrage','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Produktion','produktion','list');
// ------ Logistik
$navarray['menu']['admin'][++$menu]['first'] = array('Logistik','lager','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wareneingang','wareneingang','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lieferschein','lieferschein','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Versand','versandpakete','lieferungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Artikelkontingente','artikelkontingente','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Ein- und auslagern','lager','letztebewegungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Inventur','inventur','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kommissionieraufkleber','kommissionieraufkleber','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kommissionierung','kommissionierung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lagermindestmengen','lagermindestmengen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lagerverwaltung','lager','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lieferschein','lieferschein','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Mindesthaltbarkeit','mhdwarning','list');
if($this->ModulVorhanden('lagermobil')) {
$navarray['menu']['admin'][$menu]['sec'][] = array('Mobile Lagerverwaltung','lagermobil','list');
}
if($this->ModulVorhanden('multiorderpicking')) {
$navarray['menu']['admin'][$menu]['sec'][] = array('Multiorder-Picking','multiorderpicking','list');
}
$navarray['menu']['admin'][$menu]['sec'][] = array('Reservierung','lager','reservierungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kommissionierung','kommissionierung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Inventur','inventur','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Versandzentrum','versanderzeugen','offene');
$navarray['menu']['admin'][$menu]['sec'][] = array('Produktionszentrum','produktionszentrum','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kommissionieraufkleber','kommissionieraufkleber','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Mindesthaltbarkeit','mhdwarning','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lagermindestmengen','lagermindestmengen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Artikelkontingente','artikelkontingente','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Ein- und auslagern','lager','letztebewegungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Reservierung','lager','reservierungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Versand','versandpakete','lieferungen');
$navarray['menu']['admin'][$menu]['sec'][] = array('Versandzentrum','versanderzeugen','offene');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wareneingang','wareneingang','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zwischenlager','lager','buchenzwischenlager');
// ------ Buchhaltung
$navarray['menu']['admin'][++$menu]['first'] = array('Buchhaltung','rechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Rechnungen','rechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zahlungseingang','zahlungseingang','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Reisekosten','reisekosten','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Arbeitsnachweis','arbeitsnachweis','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Gutschrift / '.$this->Firmendaten("bezeichnungstornorechnung"),'gutschrift','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Proformarechnung','proformarechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kontoausz&uuml;ge','kontoauszuege','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Buchungen','fibu_buchungen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Abolauf','rechnungslauf','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Mahnwesen','mahnwesen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Abolauf','rechnungslauf','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Arbeitsnachweis','arbeitsnachweis','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Buchungen','fibu_buchungen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Dokumenten Scanner','docscan','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Gutschriften / '.$this->Firmendaten("bezeichnungstornorechnung"),'gutschrift','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kontoausz&uuml;ge','kontoauszuege','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lieferantengutschriften','lieferantengutschrift','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Mahnwesen','mahnwesen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Proformarechnung','proformarechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Rechnungen','rechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Reisekosten','reisekosten','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Finanzbuchhaltung Export','buchhaltungexport','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zahlungsverkehr','zahlungsverkehr','ueberweisung');
$navarray['menu']['admin'][$menu]['sec'][] = array('Verbandsabrechnungen','verband','offene');
$navarray['menu']['admin'][$menu]['sec'][] = array('Vertreterabrechnungen','vertreter','list');
if($this->ModulVorhanden('provisionenartikelvertreter'))
if ($this->ModulVorhanden('provisionenartikelvertreter'))
{
$navarray['menu']['admin'][$menu]['sec'][] = array('Provisionen','provisionenartikelvertreter','list');
}else{
} else {
$navarray['menu']['admin'][$menu]['sec'][] = array('Provisionen','provisionenartikel','list');
}
if($this->Firmendaten("modul_mlm")=="1"){
$navarray['menu']['admin'][$menu]['sec'][] = array('Multilevel', 'multilevel', 'list');
}
$navarray['menu']['admin'][$menu]['sec'][] = array('Lohnabrechnung','lohnabrechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Verbindlichkeiten','verbindlichkeit','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lieferantengutschriften','lieferantengutschrift','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kassenbuch','kasse','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zahlungseingang','zahlungseingang','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zahlungsverkehr','zahlungsverkehr','ueberweisung');
// ------ Controlling
$navarray['menu']['admin'][++$menu]['first'] = array('Controlling','marketing','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Verkaufszahlen','verkaufszahlen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Umsatzstatistik','umsatzstatistik','allgemein');
$navarray['menu']['admin'][$menu]['sec'][] = array('Statistiken','statistiken','dashboard');
$navarray['menu']['admin'][$menu]['sec'][] = array('Aktionscodes','aktionscodes','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Berichte','report','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Management Board','managementboard','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Aktionscodes','aktionscodes','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Statistiken','statistiken','dashboard');
$navarray['menu']['admin'][$menu]['sec'][] = array('Umsatzstatistik','umsatzstatistik','allgemein');
$navarray['menu']['admin'][$menu]['sec'][] = array('Verkaufszahlen','verkaufszahlen','list');
// ------ Verwaltung
$navarray['menu']['admin'][++$menu]['first'] = array('Verwaltung','rechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Ticketregeln','ticketregeln','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zeitkonten','zeiterfassung','list');
if(!$this->RechteVorhanden('mitarbeiterzeiterfassung','dashboard')){
$navarray['menu']['admin'][$menu]['sec'][] = array('Antrag einreichen','mitarbeiterzeiterfassung','timemanagementrequest');
}
else{
$navarray['menu']['admin'][$menu]['sec'][] = array('Mitarbeiterzeiterfassung','mitarbeiterzeiterfassung','dashboard');
}
$navarray['menu']['admin'][$menu]['sec'][] = array('Import/Export Zentrale','importvorlage','uebersicht');
$navarray['menu']['admin'][$menu]['sec'][] = array('W&auml;hrungen','waehrungumrechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Seriennummern','seriennummern','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Chargen','chargen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('RMA Lieferungen','rma','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Service & Support','service','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Etikettendrucker','etikettendrucker','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('W&auml;hrungen','waehrungumrechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Ticketregeln','ticketregeln','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zeitkonten','zeiterfassung','list');
// ------ System
$navarray['menu']['admin'][++$menu]['first'] = array('System','rechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Einstellungen','einstellungen','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Online-Shops / Marktplätze','onlineshops','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Backup','backup','list','recover','delete','reset');
$navarray['menu']['admin'][$menu]['sec'][] = array('Upgrade','upgrade','list','recover','delete','reset');
//$navarray['menu']['admin'][$menu]['sec'][] = array('AppStore','appstore','list');
// ------ Mein Bereich
$navarray['menu']['admin'][++$menu]['first'] = array('Mein Bereich','welcome','main');
$startseite = $this->app->DB->Select("SELECT startseite FROM user WHERE id='".$this->app->User->GetID()."' LIMIT 1");
if($startseite!="")
$navarray['menu']['admin'][$menu]['sec'][] = array('Meine Startseite','welcome','startseite');
$navarray['menu']['admin'][$menu]['sec'][] = array('Startseite','welcome','start');
// $navarray['menu']['admin'][$menu]['sec'][] = array('Meine Apps','welcome','meineapps');
if($this->app->User->GetType() === 'admin') {
// $navarray['menu']['admin'][$menu]['sec'][] = ['Learning Dashboard', 'learningdashboard', 'list'];
if($startseite!="") {
$navarray['menu']['admin'][$menu]['sec'][] = array('Meine Startseite','welcome','startseite');
}
$navarray['menu']['admin'][$menu]['sec'][] = array('Tickets','ticket','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kalender','kalender','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Pinnwand','welcome','pinwand');
$navarray['menu']['admin'][$menu]['sec'][] = array('Aufgaben','aufgaben','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('E-Mail','webmail','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Chat','chat','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zeiterfassung','zeiterfassung','create');
// $navarray['menu']['admin'][$menu]['sec'][] = array('Stechuhr','stechuhr','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wiedervorlage','wiedervorlage','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wiki','wiki','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Interner Support', 'internalsupport', 'list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Einstellungen','welcome','settings');
// $navarray['menu']['admin'][$menu]['sec'][] = array('Datenschutz', 'dataprotection','list');
// $navarray['menu']['admin'][$menu]['sec'][] = array('Lizenz','appstore','buy');
$navarray['menu']['admin'][$menu]['sec'][] = array('E-Mail','webmail','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kalender','kalender','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Interner Support', 'internalsupport', 'list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Pinnwand','welcome','pinwand');
$navarray['menu']['admin'][$menu]['sec'][] = array('Startseite','welcome','start');
$navarray['menu']['admin'][$menu]['sec'][] = array('Tickets','ticket','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wiedervorlage','wiedervorlage','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Wiki','wiki','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Zeiterfassung','zeiterfassung','create');
$navarray['menu']['admin'][$menu]['sec'][] = array('Abmelden','welcome','logout');
return $this->CalculateNavigation($navarray);
@ -16624,9 +16607,10 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
$check = $this->app->DB->Select("SELECT $key FROM adresse WHERE id='$adresse' LIMIT 1");
if($check!=${$key})
{
$this->app->DB->Update("UPDATE adresse SET $key='".${$key}."' WHERE id='$adresse' LIMIT 1");
$val = $this->app->DB->real_escape_string(${$key});
$this->app->DB->Update("UPDATE adresse SET $key='$val' WHERE id='$adresse' LIMIT 1");
$logfile = $this->app->DB->Select("SELECT `logfile` FROM adresse WHERE id='$adresse' LIMIT 1");
$this->app->DB->Update("UPDATE adresse SET `logfile`='".$logfile." Update Feld $key alt:$check neu:".${$key}.";' WHERE id='$adresse' LIMIT 1");
$this->app->DB->Update("UPDATE adresse SET `logfile`='".$logfile." Update Feld $key alt:$check neu:".$val.";' WHERE id='$adresse' LIMIT 1");
}
}
@ -31277,15 +31261,15 @@ function Firmendaten($field,$projekt="")
$variante_von = $this->app->DB->Select("SELECT variante_von FROM artikel WHERE id = '$artikel' LIMIT 1");
if($variante_von)$beschreibung = $this->app->DB->real_escape_string($this->app->DB->Select("SELECT anabregs_text FROM artikel WHERE id='$variante_von' LIMIT 1"));
}
if($this->ModulVorhanden('artikel_texte')){
if(array_key_exists($belegsprache,$adresssprachen)){
if(array_key_exists($belegsprache,$adresssprachen)){
$belegsprache = $adresssprachen[$belegsprache];
}
$artikelbeschreibung = $this->app->DB->Select("SELECT beschreibung FROM artikel_texte WHERE artikel=$artikel AND sprache='$belegsprache'");
if($artikelbeschreibung){
$beschreibung = $artikelbeschreibung;
}
}
$artikelbeschreibung = $this->app->DB->Select("SELECT beschreibung FROM artikel_texte WHERE artikel=$artikel AND sprache='$belegsprache'");
if($artikelbeschreibung){
$beschreibung = $artikelbeschreibung;
}
}
//$vpe = $this->app->DB->Select("SELECT vpe FROM verkaufspreise WHERE id='$verkauf' LIMIT 1");
$sort = $this->app->DB->Select("SELECT MAX(sort) FROM ".$typ."_position WHERE $typ='$id' LIMIT 1");
@ -31300,20 +31284,19 @@ function Firmendaten($field,$projekt="")
if($this->app->DB->Select("SELECT adr.id FROM auftrag auf INNER JOIN adresse adr ON auf.adresse = adr.id AND adr.sprache = 'englisch' WHERE auf.id = '$id' LIMIT 1"))
$name = $this->app->DB->Select("SELECT name_en FROM artikel WHERE id = '$artikel'");
if($name === '')$name = $this->app->DB->Select("SELECT name_de FROM artikel WHERE id = '$artikel'");
if($this->ModulVorhanden('artikel_texte')){
if(array_key_exists($belegsprache,$adresssprachen)){
if(array_key_exists($belegsprache,$adresssprachen)){
$belegsprache = $adresssprachen[$belegsprache];
}
$artikelbezeichnung = $this->app->DB->Select(
}
$artikelbezeichnung = $this->app->DB->Select(
"SELECT name
FROM artikel_texte
WHERE artikel=$artikel AND sprache='$belegsprache'
ORDER BY name <> '' DESC
LIMIT 1"
);
if($artikelbezeichnung){
);
if($artikelbezeichnung){
$name = $artikelbezeichnung;
}
}
}
@ -37436,7 +37419,8 @@ function Firmendaten($field,$projekt="")
SELECT dv.datei AS datei
FROM datei_stichwoerter AS ds
JOIN (SELECT datei, MAX(id) AS id FROM datei_version GROUP BY datei) AS dv ON dv.datei = ds.datei
WHERE ds.objekt LIKE 'Artikel' AND
JOIN datei AS d on ds.datei = d.id
WHERE ds.objekt LIKE 'Artikel' AND d.geloescht = 0 AND
ds.parameter = '%d' AND
(ds.subjekt LIKE 'Shopbild' OR ds.subjekt LIKE 'Druckbild' OR ds.subjekt LIKE 'Bild')
ORDER BY ds.subjekt LIKE 'Shopbild' DESC, ds.subjekt LIKE 'Druckbild' DESC, ds.sort
@ -38104,7 +38088,7 @@ function Firmendaten($field,$projekt="")
$sql_erweiterung = '';
if(!empty($gruppenarr))
{
$sql_erweiterung .= ' OR v.gruppe IN ('.implode(' ', $gruppenarr).') ';
$sql_erweiterung .= ' OR v.gruppe IN ('.implode(', ', $gruppenarr).') ';
}
if(!$guenstigste_vk) {
$vkarr = $this->app->DB->SelectArr("SELECT * FROM verkaufspreise v WHERE v.ab_menge <= '$menge' AND

View File

@ -1181,11 +1181,7 @@ class Remote
}
$shopexportarr = $this->app->DB->SelectRow("SELECT * FROM shopexport WHERE id='$id' LIMIT 1");
$artikelexport = $shopexportarr['artikelexport'];
$translationpossible = false;
if($this->app->erp->ModulVorhanden('artikel_texte'))
{
$translationpossible = true;
}
$loadElements = [
'foreign_numbers' => true,
'article_descriptions' => true,
@ -1815,7 +1811,7 @@ class Remote
foreach ($db->yieldAll($query) as $matrixdaten) {
$data[$i]['matrix_varianten']['gruppen'][$matrixdaten['gruppe']][$matrixdaten['wert']] = true;
if ($translationpossible && !empty($loadElements['translations'])) {
if (!empty($loadElements['translations'])) {
if (empty($gruppenuebersetzung[$matrixdaten['gruppe']])) {
$gruppennamen = $this->app->DB->SelectArr("SELECT
IF(name_external_from<>'',name_external_from,name_from) AS name_from,
@ -2095,17 +2091,16 @@ class Remote
$variantennettopreis = $this->app->erp->GetVerkaufspreis($v['id'], 1, 0);
}
}
if(!empty($loadElements['translations']) && $this->app->erp->ModulVorhanden('artikel_texte')){
$sprachen = ['de','en'];
foreach ($sprachen as $sprache){
$sprachen = ['de','en'];
foreach ($sprachen as $sprache){
$query = sprintf("SELECT * FROM artikel_texte WHERE shop=%d AND sprache='%s' AND artikel=%d AND aktiv=1 LIMIT 1",
$id,strtoupper($sprache),$v['id']);
$id,strtoupper($sprache),$v['id']);
$ersetzeStandardbeschreibung = $this->app->DB->SelectRow($query);
if(!empty($ersetzeStandardbeschreibung)){
$v['name_'.$sprache] = $ersetzeStandardbeschreibung['name'];
if(!empty($ersetzeStandardbeschreibung)) {
$v['name_'.$sprache] = $ersetzeStandardbeschreibung['name'];
}
}
}
$this->app->erp->RunHook('remote_send_article_list_pseudostorage', 3, $id, $v['id'], $v['pseudolager']);
if(is_numeric($v['pseudolager']) && $v['pseudolager'] < 0) {
$v['pseudolager'] = 0;
@ -2342,7 +2337,7 @@ class Remote
vlp.versandpaket = v.id OR v.lieferschein_ohne_pos = l.id
LEFT JOIN shopexport_versandarten sv ON
sv.versandart_wawision = v.versandart AND sv.shop = $shopId
WHERE a.id = $orderId OR a.teillieferungvon = $orderId
WHERE (a.id = $orderId OR a.teillieferungvon = $orderId) AND v.id IS NOT NULL
ORDER BY v.id";
$shipments = $this->app->DB->SelectArr($sql);

View File

@ -62,6 +62,9 @@ abstract class Versanddienstleister
$auftragId = $this->app->DB->Select("SELECT auftragid FROM rechnung WHERE id=$rechnungId LIMIT 1");
if ($sid === 'rechnung' || $sid === 'lieferschein' || $sid === 'adresse') {
$ret['addresstype'] = 0; // 0 = firma, 1 = packstation, 2 = postfiliale, 3 = privatadresse
$docArr = $this->app->DB->SelectRow("SELECT * FROM `$sid` WHERE id = $id LIMIT 1");
$ret['addressId'] = $docArr['adresse'];
$ret['auftragId'] = $auftragId;
@ -73,12 +76,28 @@ abstract class Versanddienstleister
$ret['original'] = array_filter($docArr, fn($key) => in_array($key, $addressfields), ARRAY_FILTER_USE_KEY);
$ret['name'] = empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : trim($docArr['ansprechpartner']);
$ret['name2'] = !empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : '';
$ret['name3'] = join(';', array_filter([
$docArr['abteilung'],
$docArr['unterabteilung']
], fn(string $item) => !empty(trim($item))));
if ($docArr['typ'] == "firma") {
$ret['company_name'] = $docArr['name'];
$ret['addresstype'] = 0;
} else {
$ret['addresstype'] = 3;
}
$ret['contact_name'] = $docArr['ansprechpartner'];
$ret['company_division'] = join(
';',
array_filter(
[
$docArr['abteilung'],
$docArr['unterabteilung']
],
fn(string $item) => !empty(trim($item))
)
);
$ret['name'] = $docArr['name'];
$ret['address2'] = $docArr['adresszusatz'];
$ret['city'] = $docArr['ort'];
@ -86,7 +105,6 @@ abstract class Versanddienstleister
$ret['country'] = $docArr['land'];
$ret['phone'] = $docArr['telefon'];
$ret['email'] = $docArr['email'];
$ret['addresstype'] = 0;
$strasse = trim($docArr['strasse']);
$ret['streetwithnumber'] = $strasse;

View File

@ -1,235 +1,236 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class AdressstammblattPDF extends Dokumentenvorlage {
public $doctype;
function __construct($app,$projekt="")
{
$this->app=$app;
//parent::Dokumentenvorlage();
$this->doctype="adresse";
$this->doctypeOrig="Adressstammblatt";
parent::__construct($this->app,$projekt);
}
public function renderDocument() {
// prepare page details
SuperFPDF::__construct('P','mm','A4');
$this->AddPage();
$this->SetDisplayMode("real","single");
$this->SetMargins(15,50);
$this->SetAutoPageBreak(true,40);
$this->AliasNbPages('{nb}');
// Bei Adressstammblatt immer oben beginnen
$this->abstand_betreffzeileoben=0;
$this->logofile = "";//$this->app->erp->GetTMP()."/".$this->app->Conf->WFdbname."_logo.jpg";
$this->briefpapier="";
$schrift = $this->app->erp->Firmendaten('schriftgroesse');
$this->SetFontSize($schrift);
$this->SetFont($this->GetFont(),'','10');
$this->SetX($this->GetX()+160);
$this->Cell(10,0,date("d.m.Y"),"","","L");
$this->renderDoctype();
$adresse = $this->app->DB->SelectArr("SELECT * FROM adresse WHERE id='".$this->id."'");
$adresse = reset($adresse);
if($adresse['typ']=="firma")
{
$infofields[]=array("Firma",$adresse['name']);
if($adresse['ansprechpartner']!="")
$infofields[]=array("Ansprechpartner",$adresse['ansprechpartner']);
} else {
$infofields[]=array("Name",$adresse['name']);
}
$infofields[]=array("Anschrift",$adresse['land']."-".$adresse['plz']." ".$adresse['ort'].", ".$adresse['strasse']);
$felder = array('telefon','telefax','mobil','email','web');
foreach($felder as $feldname)
{
$infofields[]=array(ucfirst($feldname),$adresse[$feldname=='web'?'internetseite':$feldname]);
}
if($this->app->erp->Firmendaten("modul_mlm")==1)
{
$mlmvertragsbeginn = $this->app->DB->Select("SELECT DATE_FORMAT(mlmvertragsbeginn,'%d.%m.%Y') FROM adresse WHERE id='".$adresse['id']."' LIMIT 1");
if($mlmvertragsbeginn=="00.00.0000") $mlmvertragsbeginn = "kein Vertragsbeginn eingestellt";
$sponsorid = $this->app->DB->Select("SELECT sponsor FROM adresse WHERE id='".$adresse['id']."' LIMIT 1");
if($sponsorid> 0)
$sponsor = $this->app->DB->Select("SELECT CONCAT(kundennummer,' ',name) FROM adresse WHERE id='$sponsorid' LIMIT 1");
else
$sponsor = "Kein Sponsor vorhanden";
$erfasstam = $this->app->DB->Select("SELECT DATE_FORMAT(zeitstempel,'%d.%m.%Y') FROM objekt_protokoll WHERE objekt='adresse' AND objektid='".$adresse['id']."' AND action_long='adresse_create' LIMIT 1");
$infofields[]=array("Sponsor",$sponsor);
$infofields[]=array("Erfasst am",$erfasstam);
$infofields[]=array("Vertragsbeginn am",$mlmvertragsbeginn);
}
$infofields[]=array("UST-ID",$adresse['ustid']);
if($adresse['kundennummer']!="")
$numbers[] = array("Kunden Nr.",$adresse['kundennummer']);
if($adresse['lieferantennummer']!="")
$numbers[] = array("Lieferanten Nr.",$adresse['lieferantennummer']);
if($adresse['mitarbeiternummer']!="")
$numbers[] = array("Mitarbeiter Nr.",$adresse['mitarbeiternummer']);
if(count($numbers)>0)
$this->renderInfoBox($numbers);
$this->Ln(5);
$this->renderHeading("Adressstammblatt",8);
$this->renderInfoBox($infofields);
$ansprechpartner_tmp = $this->app->DB->SelectArr("SELECT CONCAT(name,', ',if(bereich='','-',bereich),
', Telefon: ',telefon,
', Mobil: ',mobil,
', E-Mail: ',email
) as 'value' FROM ansprechpartner WHERE adresse='".$adresse['id']."'");
for($i=0;$i<count($ansprechpartner_tmp);$i++) $ansprechpartner[] = $ansprechpartner_tmp[$i]['value'];
if(count($ansprechpartner) > 0)
{
$this->Ln(5);
$this->renderHeading("Ansprechpartner",8);
$this->renderInfoBoxSingle($ansprechpartner);
}
$lieferadressen_tmp = $this->app->DB->SelectArr("SELECT name,abteilung,unterabteilung,adresszusatz,strasse,plz,ort,land,
telefon,email
FROM lieferadressen WHERE adresse='".$adresse['id']."' ORDER by standardlieferadresse DESC");
for($i=0;$i<count($lieferadressen_tmp);$i++) {
$lieferadressen_tmp[$i]['value']="";
foreach($lieferadressen_tmp[$i] as $key=>$value)
{
switch($key)
{
case "email":
$lieferadressen_tmp[$i]['value'] .= "E-Mail: $value, ";
break;
case "telefon":
$lieferadressen_tmp[$i]['value'] .= "Telefon: $value, ";
break;
case "telefax":
$lieferadressen_tmp[$i]['value'] .= "Telefax: $value, ";
break;
default:
if($value!="")
$lieferadressen_tmp[$i]['value'] .= "$value, ";
}
}
$lieferadressen_tmp[$i]['value'] = trim($lieferadressen_tmp[$i]['value'],', ');
if($i==0) $standard = " (Standard)"; else $standard="";
$lieferadressen[] = $lieferadressen_tmp[$i]['value'].$standard;
}
if(count($lieferadressen) > 0)
{
$this->Ln(5);
$this->renderHeading("Lieferadressen",8);
$this->renderInfoBoxSingle($lieferadressen);
}
$this->Ln(5);
if($adresse['sonstiges']!="")
{
$this->renderHeading("Sonstiges",8);
$this->SetFont($this->GetFont(),'',7);
$this->MultiCell(180,4,$this->WriteHTML($adresse['sonstiges']));
}
$this->renderFooter();
}
function GetAdressstammblatt($id,$info="",$extrafreitext="")
{
$this->id = $id;
// das muss vom reisekosten sein!!!!
//$this->setRecipientLieferadresse($id,"reisekosten");
// OfferNo, customerId, OfferDate
/*$auftrag = $this->app->DB->Select("SELECT auftragid FROM reisekosten WHERE id='$id' LIMIT 1");
$auftrag = $this->app->DB->Select("SELECT belegnr FROM auftrag WHERE id='$auftrag' LIMIT 1");
$bearbeiter = $this->app->DB->Select("SELECT bearbeiter FROM reisekosten WHERE id='$id' LIMIT 1");
$prefix = $this->app->DB->Select("SELECT prefix FROM reisekosten WHERE id='$id' LIMIT 1");
$bestellbestaetigung = $this->app->DB->Select("SELECT bestellbestaetigung FROM reisekosten WHERE id='$id' LIMIT 1");
$this->datum = $this->app->DB->Select("SELECT DATE_FORMAT(datum,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->von = $this->app->DB->Select("SELECT DATE_FORMAT(von,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->bis = $this->app->DB->Select("SELECT DATE_FORMAT(bis,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->von_zeit = $this->app->DB->Select("SELECT von_zeit FROM reisekosten WHERE id='$id' LIMIT 1");
$this->bis_zeit = $this->app->DB->Select("SELECT bis_zeit FROM reisekosten WHERE id='$id' LIMIT 1");
$belegnr = $this->app->DB->Select("SELECT belegnr FROM reisekosten WHERE id='$id' LIMIT 1");
$this->anlass = $this->app->DB->Select("SELECT anlass FROM reisekosten WHERE id='$id' LIMIT 1");
$this->freitext = $this->app->DB->Select("SELECT freitext FROM reisekosten WHERE id='$id' LIMIT 1");
$projekt = $this->app->DB->Select("SELECT projekt FROM reisekosten WHERE id='$id' LIMIT 1");
$mitarbeiter = $this->app->DB->Select("SELECT mitarbeiter FROM reisekosten WHERE id='$id' LIMIT 1");*/
$kunde= $this->app->DB->SelectArr("SELECT name,kundennummer,lieferantennummer FROM adresse WHERE id='$id' LIMIT 1");
$kunde = reset($kunde);
$kundennummer = $kunde['kundennummer'];
$this->name = $kunde['name'];
$this->projektabkuerzung = $this->app->DB->Select("SELECT abkuerzung FROM projekt WHERE id='$projekt'");
$this->firmenname = $this->app->erp->Firmendaten('name');
$this->doctypeOrig="Adresse: ".$kunde['name'];
$this->barcode=$belegnr;
//$ohne_briefpapier = $this->app->DB->Select("SELECT ohne_briefpapier FROM reisekosten WHERE id='$id' LIMIT 1");
//$artikel = $this->app->DB->SelectArr("SELECT *,DATE_FORMAT(datum,'%d.%m.%Y') as datum, CONCAT(rk.nummer,'- ',rk.beschreibung) as reisekostenart FROM reisekosten_position rp LEFT JOIN reisekostenart rk ON rk.id=rp.reisekostenart WHERE rp.reisekosten='$id' ORDER By rp.sort");
//$waehrung = $this->app->DB->Select("SELECT waehrung FROM reisekosten_position WHERE reisekosten='$id' LIMIT 1");
/* Dateiname */
$this->filename = date('Ymd')."_STAMMDATEN_ADRESSE_".$this->app->erp->Dateinamen($kunde['name']).".pdf";
$this->setBarcode($id);
}
}
<?php
class AdressstammblattPDF extends Dokumentenvorlage {
public $doctype;
function __construct($app,$projekt="")
{
$this->app=$app;
//parent::Dokumentenvorlage();
$this->doctype="adresse";
$this->table="adresse";
$this->doctypeOrig="Adressstammblatt";
parent::__construct($this->app,$projekt);
}
public function renderDocument() {
// prepare page details
SuperFPDF::__construct('P','mm','A4');
$this->AddPage();
$this->SetDisplayMode("real","single");
$this->SetMargins(15,50);
$this->SetAutoPageBreak(true,40);
$this->AliasNbPages('{nb}');
// Bei Adressstammblatt immer oben beginnen
$this->abstand_betreffzeileoben=0;
$this->logofile = "";//$this->app->erp->GetTMP()."/".$this->app->Conf->WFdbname."_logo.jpg";
$this->briefpapier="";
$schrift = $this->app->erp->Firmendaten('schriftgroesse');
$this->SetFontSize($schrift);
$this->SetFont($this->GetFont(),'','10');
$this->SetX($this->GetX()+160);
$this->Cell(10,0,date("d.m.Y"),"","","L");
$this->renderDoctype();
$adresse = $this->app->DB->SelectArr("SELECT * FROM adresse WHERE id='".$this->id."'");
$adresse = reset($adresse);
if($adresse['typ']=="firma")
{
$infofields[]=array("Firma",$adresse['name']);
if($adresse['ansprechpartner']!="")
$infofields[]=array("Ansprechpartner",$adresse['ansprechpartner']);
} else {
$infofields[]=array("Name",$adresse['name']);
}
$infofields[]=array("Anschrift",$adresse['land']."-".$adresse['plz']." ".$adresse['ort'].", ".$adresse['strasse']);
$felder = array('telefon','telefax','mobil','email','web');
foreach($felder as $feldname)
{
$infofields[]=array(ucfirst($feldname),$adresse[$feldname=='web'?'internetseite':$feldname]);
}
if($this->app->erp->Firmendaten("modul_mlm")==1)
{
$mlmvertragsbeginn = $this->app->DB->Select("SELECT DATE_FORMAT(mlmvertragsbeginn,'%d.%m.%Y') FROM adresse WHERE id='".$adresse['id']."' LIMIT 1");
if($mlmvertragsbeginn=="00.00.0000") $mlmvertragsbeginn = "kein Vertragsbeginn eingestellt";
$sponsorid = $this->app->DB->Select("SELECT sponsor FROM adresse WHERE id='".$adresse['id']."' LIMIT 1");
if($sponsorid> 0)
$sponsor = $this->app->DB->Select("SELECT CONCAT(kundennummer,' ',name) FROM adresse WHERE id='$sponsorid' LIMIT 1");
else
$sponsor = "Kein Sponsor vorhanden";
$erfasstam = $this->app->DB->Select("SELECT DATE_FORMAT(zeitstempel,'%d.%m.%Y') FROM objekt_protokoll WHERE objekt='adresse' AND objektid='".$adresse['id']."' AND action_long='adresse_create' LIMIT 1");
$infofields[]=array("Sponsor",$sponsor);
$infofields[]=array("Erfasst am",$erfasstam);
$infofields[]=array("Vertragsbeginn am",$mlmvertragsbeginn);
}
$infofields[]=array("UST-ID",$adresse['ustid']);
if($adresse['kundennummer']!="")
$numbers[] = array("Kunden Nr.",$adresse['kundennummer']);
if($adresse['lieferantennummer']!="")
$numbers[] = array("Lieferanten Nr.",$adresse['lieferantennummer']);
if($adresse['mitarbeiternummer']!="")
$numbers[] = array("Mitarbeiter Nr.",$adresse['mitarbeiternummer']);
if($numbers?count($numbers):0>0)
$this->renderInfoBox($numbers);
$this->Ln(5);
$this->renderHeading("Adressstammblatt",8);
$this->renderInfoBox($infofields);
$ansprechpartner_tmp = $this->app->DB->SelectArr("SELECT CONCAT(name,', ',if(bereich='','-',bereich),
', Telefon: ',telefon,
', Mobil: ',mobil,
', E-Mail: ',email
) as 'value' FROM ansprechpartner WHERE adresse='".$adresse['id']."'");
for($i=0;$i<($ansprechpartner_tmp?count($ansprechpartner_tmp):0);$i++) $ansprechpartner[] = $ansprechpartner_tmp[$i]['value'];
if($ansprechpartner_tmp?count($ansprechpartner):0 > 0)
{
$this->Ln(5);
$this->renderHeading("Ansprechpartner",8);
$this->renderInfoBoxSingle($ansprechpartner);
}
$lieferadressen_tmp = $this->app->DB->SelectArr("SELECT name,abteilung,unterabteilung,adresszusatz,strasse,plz,ort,land,
telefon,email
FROM lieferadressen WHERE adresse='".$adresse['id']."' ORDER by standardlieferadresse DESC");
for($i=0;$i<($lieferadressen_tmp?count($lieferadressen_tmp):0);$i++) {
$lieferadressen_tmp[$i]['value']="";
foreach($lieferadressen_tmp[$i] as $key=>$value)
{
switch($key)
{
case "email":
$lieferadressen_tmp[$i]['value'] .= "E-Mail: $value, ";
break;
case "telefon":
$lieferadressen_tmp[$i]['value'] .= "Telefon: $value, ";
break;
case "telefax":
$lieferadressen_tmp[$i]['value'] .= "Telefax: $value, ";
break;
default:
if($value!="")
$lieferadressen_tmp[$i]['value'] .= "$value, ";
}
}
$lieferadressen_tmp[$i]['value'] = trim($lieferadressen_tmp[$i]['value'],', ');
if($i==0) $standard = " (Standard)"; else $standard="";
$lieferadressen[] = $lieferadressen_tmp[$i]['value'].$standard;
}
if($lieferadressen?count($lieferadressen):0 > 0)
{
$this->Ln(5);
$this->renderHeading("Lieferadressen",8);
$this->renderInfoBoxSingle($lieferadressen);
}
$this->Ln(5);
if($adresse['sonstiges']!="")
{
$this->renderHeading("Sonstiges",8);
$this->SetFont($this->GetFont(),'',7);
$this->MultiCell(180,4,$this->WriteHTML($adresse['sonstiges']));
}
$this->renderFooter();
}
function GetAdressstammblatt($id,$info="",$extrafreitext="")
{
$this->id = $id;
// das muss vom reisekosten sein!!!!
//$this->setRecipientLieferadresse($id,"reisekosten");
// OfferNo, customerId, OfferDate
/*$auftrag = $this->app->DB->Select("SELECT auftragid FROM reisekosten WHERE id='$id' LIMIT 1");
$auftrag = $this->app->DB->Select("SELECT belegnr FROM auftrag WHERE id='$auftrag' LIMIT 1");
$bearbeiter = $this->app->DB->Select("SELECT bearbeiter FROM reisekosten WHERE id='$id' LIMIT 1");
$prefix = $this->app->DB->Select("SELECT prefix FROM reisekosten WHERE id='$id' LIMIT 1");
$bestellbestaetigung = $this->app->DB->Select("SELECT bestellbestaetigung FROM reisekosten WHERE id='$id' LIMIT 1");
$this->datum = $this->app->DB->Select("SELECT DATE_FORMAT(datum,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->von = $this->app->DB->Select("SELECT DATE_FORMAT(von,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->bis = $this->app->DB->Select("SELECT DATE_FORMAT(bis,'%d.%m.%Y') FROM reisekosten WHERE id='$id' LIMIT 1");
$this->von_zeit = $this->app->DB->Select("SELECT von_zeit FROM reisekosten WHERE id='$id' LIMIT 1");
$this->bis_zeit = $this->app->DB->Select("SELECT bis_zeit FROM reisekosten WHERE id='$id' LIMIT 1");
$belegnr = $this->app->DB->Select("SELECT belegnr FROM reisekosten WHERE id='$id' LIMIT 1");
$this->anlass = $this->app->DB->Select("SELECT anlass FROM reisekosten WHERE id='$id' LIMIT 1");
$this->freitext = $this->app->DB->Select("SELECT freitext FROM reisekosten WHERE id='$id' LIMIT 1");
$projekt = $this->app->DB->Select("SELECT projekt FROM reisekosten WHERE id='$id' LIMIT 1");
$mitarbeiter = $this->app->DB->Select("SELECT mitarbeiter FROM reisekosten WHERE id='$id' LIMIT 1");*/
$kunde= $this->app->DB->SelectArr("SELECT name,kundennummer,lieferantennummer FROM adresse WHERE id='$id' LIMIT 1");
$kunde = reset($kunde);
$kundennummer = $kunde['kundennummer'];
$this->name = $kunde['name'];
$this->projektabkuerzung = $this->app->DB->Select("SELECT abkuerzung FROM projekt WHERE id='$projekt'");
$this->firmenname = $this->app->erp->Firmendaten('name');
$this->doctypeOrig="Adresse: ".$kunde['name'];
$this->barcode=$belegnr;
//$ohne_briefpapier = $this->app->DB->Select("SELECT ohne_briefpapier FROM reisekosten WHERE id='$id' LIMIT 1");
//$artikel = $this->app->DB->SelectArr("SELECT *,DATE_FORMAT(datum,'%d.%m.%Y') as datum, CONCAT(rk.nummer,'- ',rk.beschreibung) as reisekostenart FROM reisekosten_position rp LEFT JOIN reisekostenart rk ON rk.id=rp.reisekostenart WHERE rp.reisekosten='$id' ORDER By rp.sort");
//$waehrung = $this->app->DB->Select("SELECT waehrung FROM reisekosten_position WHERE reisekosten='$id' LIMIT 1");
/* Dateiname */
$this->filename = date('Ymd')."_STAMMDATEN_ADRESSE_".$this->app->erp->Dateinamen($kunde['name']).".pdf";
$this->setBarcode($id);
}
}

View File

@ -3525,7 +3525,7 @@ class Briefpapier extends SuperFPDF {
($this->doctype == "gutschrift" && $this->getStyleElement("gutschrift_artikelbild")) ||
($this->doctype == "angebot" && $this->getStyleElement("angebot_artikelbild"))
){
$datei = $this->app->DB->Select("SELECT datei FROM `datei_stichwoerter` WHERE subjekt='Shopbild' AND objekt='Artikel' AND parameter='" . $item['artikel'] . "' ORDER by sort ASC LIMIT 1");
$datei = $this->app->erp->GetArtikelStandardbild($item['artikel'],true);
if(!empty($datei)){
$datei = $this->app->DB->Select("SELECT id FROM datei_version WHERE datei = '$datei' ORDER BY id DESC LIMIT 1");
}

View File

@ -474,9 +474,11 @@ class Dokumentenvorlage extends SuperFPDF {
$this->Output($dir."/".$this->table."/".$this->id."_".$this->filename,'F');
}
public function displayDocument() {
public function displayDocument($archive = true) {
$this->renderDocument();
$this->archiveDocument();
if ($archive) {
$this->archiveDocument();
}
$this->Output($this->filename,'D');
exit;
}

View File

@ -18,29 +18,34 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<td>{|Adresstyp|}:</td>
<td>
<select v-model.number="form.addresstype">
<option value="0">Haus</option>
<option value="0">Firma</option>
<option value="1">Packstation</option>
<option value="2">Filiale</option>
<option value="3">Privatadresse</option>
</select>
</td>
</tr>
<tr>
<td>{|Name / Zeile 1|}:</td>
<td><input type="text" size="36" v-model.trim="form.name"></td>
<tr v-if="form.addresstype === 0">
<td>{|Firma|}:</td>
<td><input type="text" size="36" v-model.trim="form.company_name"></td>
</tr>
<tr v-if="form.addresstype === 0">
<td>{|Firmenname / Zeile 2|}:</td>
<td><input type="text" size="36" v-model.trim="form.name2"></td>
<td>{|Abteilung|}:</td>
<td><input type="text" size="36" v-model.trim="form.company_division"></td>
</tr>
<tr v-if="form.addresstype === 3">
<td>{|Name|}:</td>
<td><input type="text" size="36" v-model.trim="form.name"></td>
</tr>
<tr v-if="form.addresstype === 0 || form.addresstype === 3">
<td>{|Ansprechpartner|}:</td>
<td><input type="text" size="36" v-model.trim="form.contact_name"></td>
</tr>
<tr v-if="form.addresstype === 1 || form.addresstype === 2">
<td>{|Postnummer|}:</td>
<td><input type="text" size="36" v-model.trim="form.postnumber"></td>
</tr>
<tr v-if="form.addresstype === 0">
<td>{|Firmenname / Zeile 3|}:</td>
<td><input type="text" size="36" v-model.trim="form.name3"></td>
</tr>
<tr v-if="form.addresstype === 0">
<tr v-if="form.addresstype === 0 || form.addresstype === 3">
<td>{|Strasse/Hausnummer|}:</td>
<td>
<input type="text" size="30" v-model.trim="form.street">
@ -55,7 +60,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<td>{|Postfilialnummer|}:</td>
<td><input type="text" size="10" v-model.trim="form.postofficeNumber"></td>
</tr>
<tr v-if="form.addresstype === 0">
<tr v-if="form.addresstype === 0 || form.addresstype === 3">
<td>{|Adresszeile 2|}:</td>
<td><input type="text" size="36" v-model.trim="form.address2"></td>
</tr>
@ -77,10 +82,6 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
</select>
</td>
</tr>
<tr>
<td>{|Ansprechpartner|}:</td>
<td><input type="text" size="36" v-model="form.contactperson"></td>
</tr>
<tr>
<td>{|E-Mail|}:</td>
<td><input type="text" size="36" v-model.trim="form.email"></td>

View File

@ -102,7 +102,19 @@ class Versandart_dhl extends Versanddienstleister{
switch ($json->addresstype) {
case 0:
$shipment->Receiver->Address = new ReceiverNativeAddress();
$shipment->Receiver->Address->name2 = $json->name2;
$shipment->Receiver->name1 = $json->company_name;
$shipment->Receiver->Address->name2 = join(
';',
array_filter(
[
$json->contact_name,
$json->company_division
],
fn(string $item) => !empty(trim($item))
)
);
$shipment->Receiver->Address->streetName = $json->street ?? '';
$shipment->Receiver->Address->streetNumber = $json->streetnumber;
$shipment->Receiver->Address->city = $json->city ?? '';
@ -127,6 +139,20 @@ class Versandart_dhl extends Versanddienstleister{
$shipment->Receiver->Postfiliale->zip = $json->zip ?? '';
$shipment->Receiver->Postfiliale->Origin = Country::Create($json->country ?? 'DE', $json->state);
break;
case 3:
$shipment->Receiver->Address = new ReceiverNativeAddress();
$shipment->Receiver->name1 = $json->name;
$shipment->Receiver->Address->name2 = $json->contact_name;
$shipment->Receiver->Address->streetName = $json->street ?? '';
$shipment->Receiver->Address->streetNumber = $json->streetnumber;
$shipment->Receiver->Address->city = $json->city ?? '';
$shipment->Receiver->Address->zip = $json->zip ?? '';
$shipment->Receiver->Address->Origin = Country::Create($json->country ?? 'DE', $json->state);
if (isset($json->address2) && !empty($json->address2))
$shipment->Receiver->Address->addressAddition[] = $json->address2;
break;
}
$shipment->Receiver->Communication = new Communication();
$shipment->Receiver->Communication->email = $json->email;

View File

@ -82,8 +82,18 @@ class Versandart_sendcloud extends Versanddienstleister
$parcel->ShippingMethodId = $json->product;
$parcel->Name = $json->name;
switch ($json->addresstype) {
case 0:
$parcel->CompanyName = trim("$json->name2 $json->name3");
case 0:
$parcel->CompanyName = $json->company_name;
$parcel->Name = join(
';',
array_filter(
[
$json->contact_name,
$json->company_division
],
fn(string $item) => !empty(trim($item))
)
);
$parcel->Address = $json->street;
$parcel->Address2 = $json->address2;
$parcel->HouseNumber = $json->streetnumber;
@ -98,6 +108,23 @@ class Versandart_sendcloud extends Versanddienstleister
$parcel->Address = "Postfiliale";
$parcel->HouseNumber = $json->postofficeNumber;
break;
case 3:
$parcel->Name = join(
';',
array_filter(
[
$json->name,
$json->contact_name
],
fn(string $item) => !empty(trim($item))
)
);
$parcel->Address = $json->street;
$parcel->Address2 = $json->address2;
$parcel->HouseNumber = $json->streetnumber;
break;
}
$parcel->Country = $json->country;
$parcel->PostalCode = $json->zip;
@ -164,4 +191,4 @@ class Versandart_sendcloud extends Versanddienstleister
}
}
}

View File

@ -780,7 +780,7 @@ class Adresse extends GenAdresse {
}
$Brief->GetAdressstammblatt($id);
$Brief->displayDocument();
$Brief->displayDocument(archive: false);
$this->app->ExitXentral();
}

View File

@ -7200,6 +7200,9 @@ class Artikel extends GenArtikel {
if ($tmp[0]['matrixprodukt']==1) {
$this->app->erp->MenuEintrag("index.php?module=matrixprodukt&action=artikel&id=$id", 'Matrixprodukt');
}
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=list&artikel=$id",'&Uuml;bersetzung');
$this->app->erp->MenuEintrag("index.php?module=artikel&action=baum&id=$id",'Artikelbaum');
if($rabatt!='1'){
$this->app->erp->MenuEintrag("index.php?module=artikel&action=einkauf&id=$id",'Einkauf');
@ -7261,7 +7264,7 @@ class Artikel extends GenArtikel {
}
$this->app->erp->MenuEintrag('index.php?module=artikel&action=list','Zur&uuml;ck zur &Uuml;bersicht');
$this->app->erp->InsertMenuAfter("index.php?module=artikel&action=baum&id=$id",'Artikelbaum','artikel','eigenschaften');
}
}
$this->app->erp->MenuEintrag('index.php?module=artikel&action=create','Neuen Artikel anlegen');
@ -8432,7 +8435,7 @@ padding: 10px;\">
FROM `datei_stichwoerter` AS `ds`
INNER JOIN `datei_version` AS `dv` ON dv.datei = ds.datei
INNER JOIN `datei` AS `d` ON dv.datei = d.id AND IFNULL(d.geloescht, 0) = 0
WHERE ds.objekt LIKE 'artikel' AND ds.parameter = '%d'
WHERE ds.objekt LIKE 'artikel' AND ds.parameter = '%d' AND d.geloescht = 0
AND
(
ds.subjekt like 'Shopbild'

289
www/pages/artikeltexte.php Normal file
View File

@ -0,0 +1,289 @@
<?php
/*
* Copyright (c) 2022 OpenXE project
*/
use Xentral\Components\Database\Exception\QueryFailureException;
class Artikeltexte {
function __construct($app, $intern = false) {
$this->app = $app;
if ($intern)
return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "artikel_texte_list");
$this->app->ActionHandler("create", "artikel_texte_edit"); // This automatically adds a "New" button
$this->app->ActionHandler("edit", "artikel_texte_edit");
$this->app->ActionHandler("delete", "artikel_texte_delete");
$this->app->DefaultActionHandler("list");
$this->app->ActionHandlerListen($app);
}
public function Install() {
/* Fill out manually later */
}
static function TableSearch(&$app, $name, $erlaubtevars) {
switch ($name) {
case "artikel_texte_list":
$allowed['artikel_texte_list'] = array('list');
$heading = array('','','Nummer','Artikel','Sprache', 'Aktiv', 'Name', 'Kurztext', 'Beschreibung', 'Beschreibung online', 'Meta title', 'Meta description', 'Meta keywords', 'Katalogartikel', 'Katalogbezeichnung', 'Katalogtext', 'Shop', 'Men&uuml;');
$width = array('1%','1%','1%'); // Fill out manually later
$artikel = $app->User->GetParameter('artikeltexte_artikel');
// columns that are aligned right (numbers etc)
// $alignright = array(4,5,6,7,8);
$findcols = array('a.id','a.id','art.nummer', 'art.name_de', 'a.sprache', 'a.aktiv', 'a.name', 'a.kurztext', 'a.beschreibung', 'a.beschreibung_online', 'a.meta_title', 'a.meta_description', 'a.meta_keywords', 'a.katalogartikel', 'a.katalog_bezeichnung', 'a.katalog_text', 'a.shop' );
$searchsql = array('a.artikel', 'a.sprache', 'a.name', 'a.kurztext', 'a.beschreibung', 'a.beschreibung_online', 'a.meta_title', 'a.meta_description', 'a.meta_keywords', 'a.katalog_bezeichnung', 'a.katalog_text');
$defaultorder = 1;
$defaultorderdesc = 0;
$aligncenter = array();
$alignright = array();
$numbercols = array();
$sumcol = array();
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
// $moreinfo = true; // Allow drop down details
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
// $mencol = 11; // Set id col for moredata/menu
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=artikeltexte&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=DeleteDialog(\"index.php?module=artikeltexte&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
$sql = "
SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox,
art.nummer,
art.name_de,
a.sprache,
a.aktiv,
a.name,
a.kurztext,
a.beschreibung,
a.beschreibung_online,
a.meta_title,
a.meta_description,
a.meta_keywords,
a.katalogartikel,
a.katalog_bezeichnung,
a.katalog_text,
shopexport.bezeichnung as shop,
a.id FROM artikel_texte a
INNER JOIN artikel art ON art.id = a.artikel
LEFT JOIN shopexport ON shopexport.id = a.shop
";
$where = "1";
if ($artikel) {
$where .= " AND a.artikel = '".$artikel."'";
}
$count = "SELECT count(DISTINCT id) FROM artikel_texte a WHERE $where";
// $groupby = "";
break;
}
$erg = false;
foreach ($erlaubtevars as $k => $v) {
if (isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
function artikel_texte_list() {
$artikel = $this->app->Secure->GetGET('artikel');
if ($artikel) {
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=create&artikel=".$artikel, "Neu anlegen");
$this->app->erp->MenuEintrag("index.php?module=artikel&action=edit&id=".$artikel."#tabs-2", "Zur&uuml;ck");
}
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=list&artikel=".$artikel, "&Uuml;bersicht");
$this->app->User->SetParameter('artikeltexte_artikel', $artikel);
$this->app->YUI->TableSearch('TAB1', 'artikel_texte_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "artikeltexte_list.tpl");
}
public function artikel_texte_delete() {
$id = (int) $this->app->Secure->GetGET('id');
$artikel = $this->app->DB->Select("SELECT artikel FROM `artikel_texte` WHERE `id` = '{$id}'");
$this->app->DB->Delete("DELETE FROM `artikel_texte` WHERE `id` = '{$id}'");
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Der Eintrag wurde gel&ouml;scht.</div>");
header("Location: index.php?module=artikeltexte&action=list&artikel=".$artikel."&msg=".$msg);
}
/*
* Edit artikel_texte item
* If id is empty, create a new one
*/
function artikel_texte_edit() {
$id = $this->app->Secure->GetGET('id');
$artikel = $this->app->Secure->GetGET('artikel');
// Check if other users are editing this id
/* if($this->app->erp->DisableModul('artikel_texte',$id))
{
return;
} */
$this->app->Tpl->Set('ID', $id);
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=edit&id=$id", "Details");
$id = $this->app->Secure->GetGET('id');
$input = $this->GetInput();
$submit = $this->app->Secure->GetPOST('submit');
if (empty($id)) {
// New item
$id = 'NULL';
$input['artikel'] = $artikel;
$input['aktiv'] = 1;
}
if ($submit != '' || $id == 'NULL')
{
// Write to database
// Add checks here
// $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
$columns = "id, ";
$values = "$id, ";
$update = "";
$fix = "";
foreach ($input as $key => $value) {
$columns = $columns.$fix.$key;
$values = $values.$fix."'".$value."'";
$update = $update.$fix.$key." = '$value'";
$fix = ", ";
}
// echo($columns."<br>");
// echo($values."<br>");
// echo($update."<br>");
$sql = "INSERT INTO artikel_texte (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
// echo($sql);
$this->app->DB->Update($sql);
if ($id == 'NULL') {
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
header("Location: index.php?module=artikeltexte&action=list&artikel=".$artikel."&msg=".$msg);
} else {
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich &uuml;bernommen.');
}
}
// Load values again from database
if ($id != 'NULL') {
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
$result = $this->app->DB->SelectArr("
SELECT SQL_CALC_FOUND_ROWS
a.id,
$dropnbox,
art.name_de,
a.sprache,
a.aktiv,
a.name,
a.kurztext,
a.beschreibung,
a.beschreibung_online,
a.meta_title,
a.meta_description,
a.meta_keywords,
a.katalogartikel,
a.katalog_bezeichnung,
a.katalog_text,
a.shop,
a.id,
a.artikel
FROM
artikel_texte a
INNER JOIN artikel art ON a.artikel = art.id
WHERE a.id=$id
");
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
if (!empty($result)) {
$artikel_texte_from_db = $result[0];
} else {
return;
}
}
if ($artikel_texte_from_db['artikel']) {
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=create&artikel=".$artikel_texte_from_db['artikel'], "Neu anlegen");
$this->app->erp->MenuEintrag("index.php?module=artikeltexte&action=list&artikel=".$artikel_texte_from_db['artikel'], "Zur&uuml;ck");
}
/*
* Add displayed items later
*
$this->app->Tpl->Add('EMAIL', $email);
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
*/
$this->app->Tpl->Set('AKTIV', $artikel_texte_from_db['aktiv']?'checked':'');
$this->app->Tpl->Set('KATALOGARTIKEL', $artikel_texte_from_db['katalogartikel']?'checked':'');
$this->app->YUI->AutoComplete('shop','shopnameid');
$sprachenOptions = $this->app->erp->GetSprachenSelect();
$this->app->Tpl->Set('SPRACHE', $this->app->erp->GetSelectAsso($sprachenOptions, $artikel_texte_from_db['sprache']));
$this->app->Tpl->Parse('PAGE', "artikeltexte_edit.tpl");
}
/**
* Get all paramters from html form and save into $input
*/
public function GetInput(): array {
$input = array();
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
$input['sprache'] = $this->app->Secure->GetPOST('sprache');
$input['name'] = $this->app->Secure->GetPOST('name');
$input['kurztext'] = $this->app->Secure->GetPOST('kurztext');
$input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung');
$input['beschreibung_online'] = $this->app->Secure->GetPOST('beschreibung_online');
$input['meta_title'] = $this->app->Secure->GetPOST('meta_title');
$input['meta_description'] = $this->app->Secure->GetPOST('meta_description');
$input['meta_keywords'] = $this->app->Secure->GetPOST('meta_keywords');
$input['katalogartikel'] = $this->app->Secure->GetPOST('katalogartikel')?'1':'0';
$input['katalog_bezeichnung'] = $this->app->Secure->GetPOST('katalog_bezeichnung');
$input['katalog_text'] = $this->app->Secure->GetPOST('katalog_text');
$input['shop'] = $this->app->Secure->GetPOST('shop');
$input['aktiv'] = $this->app->Secure->GetPOST('aktiv')?'1':'0';
return $input;
}
}

View File

@ -62,10 +62,14 @@
<td>{|E-Mail|}:</td>
<td><input type="text" name="email" value=""></td>
</tr>
<tr>
<td>{|Kunde hat Abo|}</td><td><input type="checkbox" name="abo" value="1" /> {|Marketingsperre|}: <input type="checkbox" name="marketingsperre" value="1" /> {|Lead|}: <input type="checkbox" name="lead" value="1" />
</td>
</tr>
<tr>
<td>{|Lieferadresse|}:</td>
<td><input type="text" name="lieferadresse" value=""></td>
</tr>
<tr>
<td>{|Kunde hat Abo|}</td><td><input type="checkbox" name="abo" value="1" /> {|Marketingsperre|}: <input type="checkbox" name="marketingsperre" value="1" /> {|Lead|}: <input type="checkbox" name="lead" value="1" />
</td>
</tr>
</table>
</div>
@ -150,13 +154,15 @@
[ROLLEN]
</select>
</td>
<td>Gruppen:</td>
<td>
</tr>
<tr>
<td>Gruppen:</td>
<td>
<select name="gruppe">
<option value="">{|Alle|}</option>
[GRUPPEN]
</select>
</td>
</td>
</tr>
</table>
</div>

View File

@ -0,0 +1,145 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<!-- Example for multiple tabs
<ul hidden">
<li><a href="#tabs-1">First Tab</a></li>
<li><a href="#tabs-2">Second Tab</a></li>
</ul>
-->
<div id="tabs-1">
[MESSAGE]
<form action="" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Artikeltexte (&Uuml;bersetzung)|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Artikel|}:
</td>
<td>
<input type="text" value="[NAME_DE]" size="20" disabled>
<input type="text" value="[ARTIKEL]" name="artikel" size="20" hidden>
</td>
</tr>
<tr>
<td>
{|Sprache|}:
</td>
<td>
<select name="sprache">[SPRACHE]</select>
</td>
</tr>
<tr>
<td>
{|Aktiv|}:
</td>
<td>
<input type="checkbox" name="aktiv" id="aktiv" value="1" [AKTIV] size="20">
</td>
</tr>
<tr>
<td>
{|Name|}:
</td>
<td>
<textarea name="name" id="name" cols="160">[NAME]</textarea>
</td>
</tr>
<tr>
<td>
{|Kurztext|}:
</td>
<td>
<textarea name="kurztext" id="kurztext" cols="160">[KURZTEXT]</textarea>
</td>
</tr>
<tr>
<td>
{|Beschreibung|}:
</td>
<td>
<textarea name="beschreibung" id="beschreibung" cols="160">[BESCHREIBUNG]</textarea>
</td>
</tr>
<tr>
<td>
{|Beschreibung online|}:
</td>
<td>
<textarea name="beschreibung_online" id="beschreibung_online" cols="160">[BESCHREIBUNG_ONLINE]</textarea>
</td>
</tr>
<tr>
<td>
{|Meta title|}:
</td>
<td>
<textarea name="meta_title" id="meta_title" cols="160">[META_TITLE]</textarea>
</td>
</tr>
<tr>
<td>
{|Meta description|}:
</td>
<td>
<textarea name="meta_description" id="meta_description" cols="160">[META_DESCRIPTION]</textarea>
</td>
</tr>
<tr>
<td>
{|Meta keywords|}:
</td>
<td>
<textarea name="meta_keywords" id="meta_keywords" cols="160">[META_KEYWORDS]</textarea>
</td>
</tr>
<tr>
<td>
{|Katalogartikel|}:
</td>
<td>
<input type="checkbox" name="katalogartikel" id="katalogartikel" value="1" [KATALOGARTIKEL] size="20">
</td>
</tr>
<tr>
<td>
{|Katalogbezeichnung|}:
</td>
<td>
<textarea name="katalog_bezeichnung" id="katalog_bezeichnung" cols="160">[KATALOG_BEZEICHNUNG]</textarea>
</td>
</tr>
<tr>
<td>
{|Katalogtext|}:
</td>
<td>
<textarea name="katalog_text" id="katalog_text" cols="160">[KATALOG_TEXT]</textarea>
</td>
</tr>
<tr>
<td>
{|Shop|}:
</td>
<td>
<input type="text" name="shop" id="shop" value="[SHOP]" size="20">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right" />
</form>
</div>
</div>

View File

@ -0,0 +1,10 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[TAB1]
[TAB1NEXT]
</div>
</div>

View File

@ -11,7 +11,7 @@
<td colspan="4">[ERROR]</td>
</tr>
<tr id="trdropfiles">
<td colspan="4">
<td colspan="6">
<div id="drop-files" ondragover="return false">
{|Dateien hier einf&uuml;gen|}
</div>
@ -333,8 +333,8 @@ $(document).ready(function() {
}
}
$('#trdatei').before('<tr><td>Datei '+vorschau+'</td><td class="tddateiname"><input type="hidden" name="dateiv[]" value="'+image+'" /><input type="hidden" name="dateiname[]" value="'+filenameEncoded+'" />'+filenameEncoded+'</td><td>Titel: <input type="text" name="dateititel[]" /></td><td><select name="dateistichwort[]">'+$('#stichwort').html()+'</select></td></tr>');
};
$('#trdatei').before(' <tr> <td>Datei '+vorschau+'</td> <td class="tddateiname"><input type="hidden" name="dateiv[]" value="'+image+'" /><input type="hidden" name="dateiname[]" value="'+filenameEncoded+'" />'+filenameEncoded+'</td> <td>Titel: <input type="text" name="dateititel[]" /></td> <td>{|Beschreibung|}:</td> <td><textarea name="dateibeschreibung[]" cols="50"></textarea></td> <td><select name="dateistichwort[]">'+$('#stichwort').html()+'</select></td> </tr> ');
};
})(files[index]);
fileReader.readAsDataURL(file);

View File

@ -51,6 +51,16 @@
<td>Konto f&uuml;r Differenzen:</td>
<td><input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" /></td>
</tr>
<tr>
<td>Format:</td>
<td>
<select name="format">
<option value="ISO-8859-1">ISO-8859-1</option>
<option value="UTF-8">UTF-8</option>
<option value="UTF-8-BOM">UTF-8 mit BOM</option>
</select>
</td>
</tr>
</table>
</fieldset>
</div>

View File

@ -0,0 +1,784 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<!-- Example for multiple tabs
<ul hidden">
<li><a href="#tabs-1">First Tab</a></li>
<li><a href="#tabs-2">Second Tab</a></li>
</ul>
-->
<div id="tabs-1">
[MESSAGE]
<form action="" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Gruppe|}</legend><i>Gruppe f&uuml;r die Zuordnung zu Preislisten, Onlineshop-Preislisten oder Adressgruppen</i>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Aktiv|}:
</td>
<td>
<input type="checkbox" name="aktiv" id="aktiv" value="1" [AKTIV] size="20">
</td>
</tr>
<tr>
<td>
{|Name|}:
</td>
<td>
<input type="text" name="name" id="name" value="[NAME]" required size="20">
</td>
</tr>
<tr>
<td>
{|Kennziffer|}:
</td>
<td>
<input type="text" name="kennziffer" id="kennziffer" pattern="[a-zA-Z0-9_\-]+" value="[KENNZIFFER]" required size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<textarea name="internebemerkung" id="internebemerkung" rows="6" style="width:100%;"></textarea>
</td>
</tr>
<tr>
<td>
{|Art|}:
</td>
<td>
<select name="art" id="art">
[ARTSELECT]
</select>
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Grundrabatt|}:
</td>
<td>
<input type="text" name="grundrabatt" id="grundrabatt" value="[GRUNDRABATT]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Zahlungszieltage|}:
</td>
<td>
<input type="text" name="zahlungszieltage" id="zahlungszieltage" value="[ZAHLUNGSZIELTAGE]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Zahlungszielskonto|}:
</td>
<td>
<input type="text" name="zahlungszielskonto" id="zahlungszielskonto" value="[ZAHLUNGSZIELSKONTO]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Zahlungszieltageskonto|}:
</td>
<td>
<input type="text" name="zahlungszieltageskonto" id="zahlungszieltageskonto" value="[ZAHLUNGSZIELTAGESKONTO]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Portofrei_aktiv|}:
</td>
<td>
<input type="text" name="portofrei_aktiv" id="portofrei_aktiv" value="[PORTOFREI_AKTIV]" size="20">
</td>
</tr>
<tr [PREISGRUPPEHIDDEN]>
<td>
{|Portofreiab|}:
</td>
<td>
<input type="text" name="portofreiab" id="portofreiab" value="[PORTOFREIAB]" size="20">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<!-- Example for 2nd row
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Another legend|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Name|}:
</td>
<td>
<input type="text" name="name" id="name" value="[NAME]" size="20">
</td>
</tr>
<tr>
<td>
{|Art|}:
</td>
<td>
<input type="text" name="art" id="art" value="[ART]" size="20">
</td>
</tr>
<tr>
<td>
{|Kennziffer|}:
</td>
<td>
<input type="text" name="kennziffer" id="kennziffer" value="[KENNZIFFER]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<input type="text" name="internebemerkung" id="internebemerkung" value="[INTERNEBEMERKUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Grundrabatt|}:
</td>
<td>
<input type="text" name="grundrabatt" id="grundrabatt" value="[GRUNDRABATT]" size="20">
</td>
</tr>
<tr>
<td>
{|Rabatt1|}:
</td>
<td>
<input type="text" name="rabatt1" id="rabatt1" value="[RABATT1]" size="20">
</td>
</tr>
<tr>
<td>
{|Rabatt2|}:
</td>
<td>
<input type="text" name="rabatt2" id="rabatt2" value="[RABATT2]" size="20">
</td>
</tr>
<tr>
<td>
{|Rabatt3|}:
</td>
<td>
<input type="text" name="rabatt3" id="rabatt3" value="[RABATT3]" size="20">
</td>
</tr>
<tr>
<td>
{|Rabatt4|}:
</td>
<td>
<input type="text" name="rabatt4" id="rabatt4" value="[RABATT4]" size="20">
</td>
</tr>
<tr>
<td>
{|Rabatt5|}:
</td>
<td>
<input type="text" name="rabatt5" id="rabatt5" value="[RABATT5]" size="20">
</td>
</tr>
<tr>
<td>
{|Sonderrabatt_skonto|}:
</td>
<td>
<input type="text" name="sonderrabatt_skonto" id="sonderrabatt_skonto" value="[SONDERRABATT_SKONTO]" size="20">
</td>
</tr>
<tr>
<td>
{|Provision|}:
</td>
<td>
<input type="text" name="provision" id="provision" value="[PROVISION]" size="20">
</td>
</tr>
<tr>
<td>
{|Kundennummer|}:
</td>
<td>
<input type="text" name="kundennummer" id="kundennummer" value="[KUNDENNUMMER]" size="20">
</td>
</tr>
<tr>
<td>
{|Partnerid|}:
</td>
<td>
<input type="text" name="partnerid" id="partnerid" value="[PARTNERID]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_aktiv|}:
</td>
<td>
<input type="text" name="dta_aktiv" id="dta_aktiv" value="[DTA_AKTIV]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_periode|}:
</td>
<td>
<input type="text" name="dta_periode" id="dta_periode" value="[DTA_PERIODE]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_dateiname|}:
</td>
<td>
<input type="text" name="dta_dateiname" id="dta_dateiname" value="[DTA_DATEINAME]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_mail|}:
</td>
<td>
<input type="text" name="dta_mail" id="dta_mail" value="[DTA_MAIL]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_mail_betreff|}:
</td>
<td>
<input type="text" name="dta_mail_betreff" id="dta_mail_betreff" value="[DTA_MAIL_BETREFF]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_mail_text|}:
</td>
<td>
<input type="text" name="dta_mail_text" id="dta_mail_text" value="[DTA_MAIL_TEXT]" size="20">
</td>
</tr>
<tr>
<td>
{|Dtavariablen|}:
</td>
<td>
<input type="text" name="dtavariablen" id="dtavariablen" value="[DTAVARIABLEN]" size="20">
</td>
</tr>
<tr>
<td>
{|Dta_variante|}:
</td>
<td>
<input type="text" name="dta_variante" id="dta_variante" value="[DTA_VARIANTE]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus1|}:
</td>
<td>
<input type="text" name="bonus1" id="bonus1" value="[BONUS1]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus1_ab|}:
</td>
<td>
<input type="text" name="bonus1_ab" id="bonus1_ab" value="[BONUS1_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus2|}:
</td>
<td>
<input type="text" name="bonus2" id="bonus2" value="[BONUS2]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus2_ab|}:
</td>
<td>
<input type="text" name="bonus2_ab" id="bonus2_ab" value="[BONUS2_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus3|}:
</td>
<td>
<input type="text" name="bonus3" id="bonus3" value="[BONUS3]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus3_ab|}:
</td>
<td>
<input type="text" name="bonus3_ab" id="bonus3_ab" value="[BONUS3_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus4|}:
</td>
<td>
<input type="text" name="bonus4" id="bonus4" value="[BONUS4]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus4_ab|}:
</td>
<td>
<input type="text" name="bonus4_ab" id="bonus4_ab" value="[BONUS4_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus5|}:
</td>
<td>
<input type="text" name="bonus5" id="bonus5" value="[BONUS5]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus5_ab|}:
</td>
<td>
<input type="text" name="bonus5_ab" id="bonus5_ab" value="[BONUS5_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus6|}:
</td>
<td>
<input type="text" name="bonus6" id="bonus6" value="[BONUS6]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus6_ab|}:
</td>
<td>
<input type="text" name="bonus6_ab" id="bonus6_ab" value="[BONUS6_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus7|}:
</td>
<td>
<input type="text" name="bonus7" id="bonus7" value="[BONUS7]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus7_ab|}:
</td>
<td>
<input type="text" name="bonus7_ab" id="bonus7_ab" value="[BONUS7_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus8|}:
</td>
<td>
<input type="text" name="bonus8" id="bonus8" value="[BONUS8]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus8_ab|}:
</td>
<td>
<input type="text" name="bonus8_ab" id="bonus8_ab" value="[BONUS8_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus9|}:
</td>
<td>
<input type="text" name="bonus9" id="bonus9" value="[BONUS9]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus9_ab|}:
</td>
<td>
<input type="text" name="bonus9_ab" id="bonus9_ab" value="[BONUS9_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus10|}:
</td>
<td>
<input type="text" name="bonus10" id="bonus10" value="[BONUS10]" size="20">
</td>
</tr>
<tr>
<td>
{|Bonus10_ab|}:
</td>
<td>
<input type="text" name="bonus10_ab" id="bonus10_ab" value="[BONUS10_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Zahlungszieltage|}:
</td>
<td>
<input type="text" name="zahlungszieltage" id="zahlungszieltage" value="[ZAHLUNGSZIELTAGE]" size="20">
</td>
</tr>
<tr>
<td>
{|Zahlungszielskonto|}:
</td>
<td>
<input type="text" name="zahlungszielskonto" id="zahlungszielskonto" value="[ZAHLUNGSZIELSKONTO]" size="20">
</td>
</tr>
<tr>
<td>
{|Zahlungszieltageskonto|}:
</td>
<td>
<input type="text" name="zahlungszieltageskonto" id="zahlungszieltageskonto" value="[ZAHLUNGSZIELTAGESKONTO]" size="20">
</td>
</tr>
<tr>
<td>
{|Portoartikel|}:
</td>
<td>
<input type="text" name="portoartikel" id="portoartikel" value="[PORTOARTIKEL]" size="20">
</td>
</tr>
<tr>
<td>
{|Portofreiab|}:
</td>
<td>
<input type="text" name="portofreiab" id="portofreiab" value="[PORTOFREIAB]" size="20">
</td>
</tr>
<tr>
<td>
{|Erweiterteoptionen|}:
</td>
<td>
<input type="text" name="erweiterteoptionen" id="erweiterteoptionen" value="[ERWEITERTEOPTIONEN]" size="20">
</td>
</tr>
<tr>
<td>
{|Zentralerechnung|}:
</td>
<td>
<input type="text" name="zentralerechnung" id="zentralerechnung" value="[ZENTRALERECHNUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Zentralregulierung|}:
</td>
<td>
<input type="text" name="zentralregulierung" id="zentralregulierung" value="[ZENTRALREGULIERUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Gruppe|}:
</td>
<td>
<input type="text" name="gruppe" id="gruppe" value="[GRUPPE]" size="20">
</td>
</tr>
<tr>
<td>
{|Preisgruppe|}:
</td>
<td>
<input type="text" name="preisgruppe" id="preisgruppe" value="[PREISGRUPPE]" size="20">
</td>
</tr>
<tr>
<td>
{|Verbandsgruppe|}:
</td>
<td>
<input type="text" name="verbandsgruppe" id="verbandsgruppe" value="[VERBANDSGRUPPE]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_name|}:
</td>
<td>
<input type="text" name="rechnung_name" id="rechnung_name" value="[RECHNUNG_NAME]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_strasse|}:
</td>
<td>
<input type="text" name="rechnung_strasse" id="rechnung_strasse" value="[RECHNUNG_STRASSE]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_ort|}:
</td>
<td>
<input type="text" name="rechnung_ort" id="rechnung_ort" value="[RECHNUNG_ORT]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_plz|}:
</td>
<td>
<input type="text" name="rechnung_plz" id="rechnung_plz" value="[RECHNUNG_PLZ]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_abteilung|}:
</td>
<td>
<input type="text" name="rechnung_abteilung" id="rechnung_abteilung" value="[RECHNUNG_ABTEILUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_land|}:
</td>
<td>
<input type="text" name="rechnung_land" id="rechnung_land" value="[RECHNUNG_LAND]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_email|}:
</td>
<td>
<input type="text" name="rechnung_email" id="rechnung_email" value="[RECHNUNG_EMAIL]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_periode|}:
</td>
<td>
<input type="text" name="rechnung_periode" id="rechnung_periode" value="[RECHNUNG_PERIODE]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_anzahlpapier|}:
</td>
<td>
<input type="text" name="rechnung_anzahlpapier" id="rechnung_anzahlpapier" value="[RECHNUNG_ANZAHLPAPIER]" size="20">
</td>
</tr>
<tr>
<td>
{|Rechnung_permail|}:
</td>
<td>
<input type="text" name="rechnung_permail" id="rechnung_permail" value="[RECHNUNG_PERMAIL]" size="20">
</td>
</tr>
<tr>
<td>
{|Webid|}:
</td>
<td>
<input type="text" name="webid" id="webid" value="[WEBID]" size="20">
</td>
</tr>
<tr>
<td>
{|Portofrei_aktiv|}:
</td>
<td>
<input type="text" name="portofrei_aktiv" id="portofrei_aktiv" value="[PORTOFREI_AKTIV]" size="20">
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Objektname|}:
</td>
<td>
<input type="text" name="objektname" id="objektname" value="[OBJEKTNAME]" size="20">
</td>
</tr>
<tr>
<td>
{|Objekttyp|}:
</td>
<td>
<input type="text" name="objekttyp" id="objekttyp" value="[OBJEKTTYP]" size="20">
</td>
</tr>
<tr>
<td>
{|Parameter|}:
</td>
<td>
<input type="text" name="parameter" id="parameter" value="[PARAMETER]" size="20">
</td>
</tr>
<tr>
<td>
{|Objektname2|}:
</td>
<td>
<input type="text" name="objektname2" id="objektname2" value="[OBJEKTNAME2]" size="20">
</td>
</tr>
<tr>
<td>
{|Objekttyp2|}:
</td>
<td>
<input type="text" name="objekttyp2" id="objekttyp2" value="[OBJEKTTYP2]" size="20">
</td>
</tr>
<tr>
<td>
{|Parameter2|}:
</td>
<td>
<input type="text" name="parameter2" id="parameter2" value="[PARAMETER2]" size="20">
</td>
</tr>
<tr>
<td>
{|Objektname3|}:
</td>
<td>
<input type="text" name="objektname3" id="objektname3" value="[OBJEKTNAME3]" size="20">
</td>
</tr>
<tr>
<td>
{|Objekttyp3|}:
</td>
<td>
<input type="text" name="objekttyp3" id="objekttyp3" value="[OBJEKTTYP3]" size="20">
</td>
</tr>
<tr>
<td>
{|Parameter3|}:
</td>
<td>
<input type="text" name="parameter3" id="parameter3" value="[PARAMETER3]" size="20">
</td>
</tr>
<tr>
<td>
{|Kategorie|}:
</td>
<td>
<input type="text" name="kategorie" id="kategorie" value="[KATEGORIE]" size="20">
</td>
</tr>
<tr>
<td>
{|Aktiv|}:
</td>
<td>
<input type="text" name="aktiv" id="aktiv" value="[AKTIV]" size="20">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div> -->
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
<!-- Example for 2nd tab
<div id="tabs-2">
[MESSAGE]
<form action="" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|...|}</legend>
<table width="100%" border="0" class="mkTableFormular">
...
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
-->
</div>

View File

@ -1,661 +1,10 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
<li><a href="#tabs-2"></a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<div class="filter-box filter-usersave">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="inaktiv" class="switch">
<input type="checkbox" id="inaktiv" title="inaktive">
<span class="slider round"></span>
</label>
<label for="inaktiv">{|nur inaktive|}</label>
</li>
</ul>
</div>
</div>
[TAB1]
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[TAB1]
[TAB1NEXT]
</div>
</div>
<div id="tabs-3">
[TAB3]
</div>
</div>
[EXTRA]
<!--<div id="editGruppen" style="display:none;" title="Bearbeiten">
<form method="post">
<input type="hidden" id="e_id">
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr valign="top" colspan="3">
<td>
<fieldset>
<legend>{|Einstellung|}</legend>
<table width="100%">
<tr>
<td width="200">{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" id="aktiv" value="1">&nbsp;<i>{|Bitte aktivieren|}! ({|Ist die Gruppe nicht aktiv wird diese für die Neuanlage von Verknüpfungen ausgeblendet. Die Gruppe besteht in den aktuellen Verknüpfungen weiterhin|}.)</i></td>
</tr>
<tr>
<td width="200">{|Bezeichnung|}:</td><td><input type="text" name="name" id="name" size="80" rule="notempty" msg="Pflichfeld!" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|Kennziffer|}:</td><td><input type="text" name="kennziffer" id="kennziffer" size="80" tabindex="2" rule="notempty" msg="Pflichfeld!">&nbsp;<i>{|z.B.|} 01, 02, ...</i></td>
</tr>
<tr>
<td width="200">{|Interne Bemerkung|}:</td><td><textarea rows="10" cols="130" name="internebemerkung" id="internebemerkung"></textarea></td><td>
</tr>
<tr>
<td width="200">{|Art|}:</td><td><select name="art" id="art">[ART]<!--<option value="gruppe">Gruppe</option><option value="preisgruppe">Preisgruppe</option>
<!--<option value="verband">Verband</option>--></select></td>
<!--</tr>
<tr>
<td width="200">{|Projekt|}:</td><td><input type="text" name="projekt" id="projekt" size="80" tabindex="2">&nbsp;<i>{|optionale Angabe|}</i></td>
</tr>
<tr>
<td width="200">{|Kategorie|}:</td><td><input type="text" name="kategorie" id="kategorie" size="80" tabindex="2">&nbsp;<i>{|optionale Angabe|}</i></td>
</tr>
</table>
</fieldset>
<div id="rabatte">
<fieldset>
<legend>{|Rabatte / Zahlungen|}</legend>
<table width="100%">
<tr>
<td width="200">{|Grundrabatt|}:</td><td><input type="text" name="grundrabatt" id="grundrabatt" size="20" tabindex="2">&nbsp;%&nbsp;<i>{|z.B.|} 20 {|f&uuml;r|} 20% ({|der Rabatt gilt nur f&uuml;r Standardpreise, nicht f&uuml;r Gruppen- oder Kundenspezifische Preise|}.)</i></td>
</tr>
<tr>
<td width="200">{|Zahlungszieltage|}:</td><td><input type="text" name="zahlungszieltage" id="zahlungszieltage" size="20" tabindex="2">&nbsp;{|Tage|}&nbsp;<i>{|z.B.|} 30</i></td>
</tr>
<tr>
<td width="200">{|Skonto|}:</td><td><input type="text" name="zahlungszielskonto" id="zahlungszielskonto" size="20" tabindex="2">&nbsp;%&nbsp;<i>{|z.B.|} 2</i></td>
</tr>
<tr>
<td width="200">{|Skonto Tage|}:</td><td><input type="text" name="zahlungszieltageskonto" id="zahlungszieltageskonto" size="20" tabindex="2">&nbsp;{|Tage|}&nbsp;<i>{|z.B.|} 10</i></td>
</tr>
<tr>
<td>{|Porto frei aktiv|}:</td><td><input type="checkbox" name="portofrei_aktiv" id="portofrei_aktiv" value="1">&nbsp;{|ab|}&nbsp;<input type="text" name="portofreiab" id="portofreiab" size="12">&nbsp;&euro;&nbsp;<i>{|Porto frei ab bestimmtem Umsatz (netto)|}</i></td>
</tr>
</table>
</fieldset>
</div>
<div id="rabatte2">
<fieldset>
<legend>{|Verbandsoptionen|}</legend>
<table width="100%">
<tr>
<td width="200">{|Rabatte|}*:</td><td>
<table>
<tr>
<td>{|Rabatt 1|}:</td><td><input type="text" name="rabatt1" id="rabatt1" size="5"> %</td><td width="100">&nbsp;</td>
<td>{|Bonus 1|}:</td><td><input type="text" name="bonus1" id="bonus1" size="5"> % {|ab|} <input type="text" name="bonus1_ab" id="bonus1_ab" size="10"> &euro;</td><td width="50">&nbsp;</td>
<td>{|Bonus 6|}:</td><td><input type="text" name="bonus6" id="bonus6" size="5"> % {|ab|} <input type="text" name="bonus6_ab" id="bonus6_ab" size="10"> &euro;</td>
</tr>
<tr>
<td>{|Rabatt 2|}:</td><td><input type="text" name="rabatt2" id="rabatt2" size="5"> %</td><td width="100">&nbsp;</td>
<td>{|Bonus 2|}:</td><td><input type="text" name="bonus2" id="bonus2" size="5"> % {|ab|} <input type="text" name="bonus2_ab" id="bonus2_ab" size="10"> &euro;</td><td width="50">&nbsp;</td>
<td>{|Bonus 7|}:</td><td><input type="text" name="bonus7" id="bonus7" size="5"> % {|ab|} <input type="text" name="bonus7_ab" id="bonus7_ab" size="10"> &euro;</td>
</tr>
<tr>
<td>{|Rabatt 3|}:</td><td><input type="text" name="rabatt3" id="rabatt3" size="5"> %</td><td width="100">&nbsp;</td>
<td>{|Bonus 3|}:</td><td><input type="text" name="bonus3" id="bonus3" size="5"> % {|ab|} <input type="text" name="bonus3_ab" id="bonus3_ab" size="10"> &euro;</td><td width="50">&nbsp;</td>
<td>{|Bonus 8|}:</td><td><input type="text" name="bonus8" id="bonus8" size="5"> % {|ab|} <input type="text" name="bonus8_ab" id="bonus8_ab" size="10"> &euro;</td>
</tr>
<tr>
<td>{|Rabatt 4|}:</td><td><input type="text" name="rabatt4" id="rabatt4" size="5"> %</td><td width="100">&nbsp;</td>
<td>{|Bonus 4|}:</td><td><input type="text" name="bonus4" id="bonus4" size="5"> % {|ab|} <input type="text" name="bonus4_ab" id="bonus4_ab" size="10"> &euro;</td><td width="50">&nbsp;</td>
<td>{|Bonus 9|}:</td><td><input type="text" name="bonus9" id="bonus9" size="5"> % {|ab|} <input type="text" name="bonus9_ab" id="bonus9_ab" size="10"> &euro;</td>
</tr>
<tr>
<td>{|Rabatt 5|}:</td><td><input type="text" name="rabatt5" id="rabatt5" size="5"> %</td><td width="100">&nbsp;</td>
<td>{|Bonus 5|}:</td><td><input type="text" name="bonus5" id="bonus5" size="5"> % {|ab|} <input type="text" name="bonus5_ab" id="bonus5_ab" size="10"> &euro;</td><td width="50">&nbsp;</td>
<td>{|Bonus 10|}:</td><td><input type="text" name="bonus10" id="bonus10" size="5"> % {|ab|} <input type="text" name="bonus10_ab" id="bonus10_ab" size="10"> &euro;</td>
</tr>
<tr>
<td>{|Provision|}:</td><td><input type="text" name="provision" id="provision" size="5"> %</td><td width="100">&nbsp;</td>
<td></td><td></td><td width="50">&nbsp;</td>
<td></td><td></td>
</tr>
<tr>
<td>{|Sonderrabatt|}:</td><td colspan="2"><input type="text" name="sonderrabatt_skonto" id="sonderrabatt_skonto" size="5"> % ({|bei Skonto|})</td>
<td></td><td></td><td width="50">&nbsp;</td>
<td></td><td></td>
</tr>
<tr>
<td colspan="8">* {|der Rabatt gilt nur f&uuml;r Standardpreise, nicht f&uuml;r Gruppen- oder Kundenspezifische Preise|}</td>
</tr>
</table>
</td><td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{|Buchhaltung Einstellungen|}</legend>
<table width="100%">
<tr>
<td width="200">{|Zentralregulierung|}:</td><td><input type="checkbox" name="zentralregulierung" id="zentralregulierung" value="1"></td>
</tr>
<!--<tr><td width="200">{|Zentrale Rechnungsadresse|}:</td><td><input type="checkbox" name="zentralerechnung" value="1"></td></tr>-->
<!--<tr>
<td>{|Periode der Rechnung|}:</td><td><select name="rechnung_periode" id="rechnung_periode"><option value="1">t&auml;glich</option><option value="2">w&ouml;chentlich</option><option value="4">14t&auml;gig</option><option value="5">monatlich</option><option value="6">einzel</option></select></td>
</tr>
<tr>
<td width="200">{|Anzahl Papierrechnungen|}:</td><td><input type="text" name="rechnung_anzahlpapier" id="rechnung_anzahlpapier" size="5" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|Rechnung per Mail|}:</td><td><input type="checkbox" name="rechnung_permail" id="rechnung_permail" value="1" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|Name / Firma|}:</td><td><input type="text" name="rechnung_name" id="rechnung_name" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|Abteilung|}:</td><td><input type="text" name="rechnung_abteilung" id="rechnung_abteilung" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">Strasse + Hausnummer:</td><td><input type="text" name="rechnung_strasse" id="rechnung_strasse" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|PLZ / Ort|}:</td><td><input type="text" name="rechnung_plz" id="rechnung_plz" size="10">&nbsp;<input type="text" name="rechnung_ort" id="rechnung_ort" size="40"></td>
</tr>
<tr>
<td width="200">{|Land|}:</td><td><input type="text" name="rechnung_land" id="rechnung_land"></td>
</tr>
<tr>
<td width="200">{|E-Mail|}:</td><td><input type="text" name="rechnung_email" id="rechnung_email"></td>
</tr>
<tr>
<td width="200">{|Kundennummer im Verband|}:</td><td><input type="text" name="kundennummer" id="kundennummer"></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{|DTA - Datentr&auml;ger Austausch Einstellungen|}</legend>
<table width="100%">
<tr>
<td width="200">{|Aktiv|}:</td><td><input type="checkbox" name="dta_aktiv" id="dta_aktiv" value="1"></td>
</tr>
<tr>
<td>{|Variante|}:</td><td><select name="dta_variante" id="dta_variante">
<option value="1">Variante 1</option>
<option value="2">Variante 2</option>
<option value="3">Variante 3</option>
<option value="4">Variante 4</option>
<option value="5">Variante 5</option>
<option value="6">Variante 6</option>
<option value="7">Variante 7</option>
<option value="8">Variante 8</option>
<option value="9">Variante 9</option>
</select></td>
</tr>
<tr>
<td width="200">{|DTA Variablen|}:</td><td><textarea name="dtavariablen" id="dtavariablen" rows="10" cols="50"></textarea></td>
</tr>
<tr>
<td>{|Periode|}:</td><td><select name="dta_periode" id="dta_periode"><option value="1">15,30</option>
<option value="2">7,15,22,30</option>
<option value="3">Dienstag</option>
<option value="4">Montag</option>
<option value="5">2,11,27</option>
<option value="6">2</option>
<option value="7">Freitags</option>
</select></td>
</tr>
<tr>
<td width="200">{|Partner ID f&uuml;r DTA|}:</td><td><input type="text" name="partnerid" id="partnerid" size="50"></td>
</tr>
<tr>
<td width="200">{|Dateiname|}:</td><td><input type="text" name="dta_dateiname" id="dta_dateiname" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|E-Mail Empf&auml;nger|}:</td><td><input type="text" name="dta_mail" id="dta_mail" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|E-Mail Betreff|}:</td><td><input type="text" name="dta_mail_betreff" id="dta_mail_betreff" size="50" tabindex="2"></td>
</tr>
<tr>
<td width="200">{|E-Mail Textvorlage|}:</td><td><textarea name="dta_mail_text" id="dta_mail_text" rows="10" cols="50"></textarea></td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
<!--<tr valign="" height="" bgcolor="" align="" bordercolor="" class="klein" classname="klein">
<td width="" valign="" height="" bgcolor="" align="right" colspan="3" bordercolor="" classname="orange2" class="orange2">
<input type="submit" value="Speichern" />
</tr>-->
<!--</tbody>
</table>
</div>
</form>-->
<!--<script type="text/javascript">
$(document).ready(function() {
art = document.getElementById('art');
rabatt = document.getElementById('rabatte');
rabatt2 = document.getElementById('rabatte2');
if(art){
// Hide the target field if priority isn't critical
if(art.options[art.selectedIndex].value =='gruppe'){
rabatt.style.display='none';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='preisgruppe'){
rabatt.style.display='';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='verband'){
rabatt.style.display='';
rabatt2.style.display='';
}else{
rabatt.style.display='none';
rabatt2.style.display='none';
}
art.onchange=function(){
if(art.options[art.selectedIndex].value == 'gruppe'){
rabatt.style.display='none';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value == 'preisgruppe'){
rabatt.style.display='';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value == 'verband'){
rabatt.style.display='';
rabatt2.style.display='';
}else{
rabatt.style.display='none';
rabatt2.style.display='none';
}
}
}
$('#aktiv').focus();
$("#editGruppen").dialog({
modal: true,
bgiframe: true,
closeOnEscape:false,
minWidth:1200,
maxHeight:900,
autoOpen: false,
buttons: {
ABBRECHEN: function() {
GruppenReset();
$(this).dialog('close');
},
SPEICHERN: function() {
GruppenEditSave();
}
}
});
$("#editGruppen").dialog({
close: function( event, ui ) { GruppenReset();}
});
});
function GruppenReset()
{
$('#editGruppen').find('#e_id').val('');
$('#editGruppen').find('#aktiv').prop("checked",false);
$('#editGruppen').find('#name').val('');
$('#editGruppen').find('#kennziffer').val('');
$('#editGruppen').find('#internebemerkung').val('');
$('#editGruppen').find('#art').val('gruppe');
$('#editGruppen').find('#projekt').val('');
$('#editGruppen').find('#kategorie').val('');
$('#editGruppen').find('#grundrabatt').val('');
$('#editGruppen').find('#zahlungszieltage').val('');
$('#editGruppen').find('#zahlungszielskonto').val('');
$('#editGruppen').find('#zahlungszieltageskonto').val('');
$('#editGruppen').find('#portofrei_aktiv').prop("checked",false);
$('#editGruppen').find('#portofreiab').val('');
$('#editGruppen').find('#rabatt1').val('');
$('#editGruppen').find('#bonus1').val('');
$('#editGruppen').find('#bonus1_ab').val('');
$('#editGruppen').find('#bonus6').val('');
$('#editGruppen').find('#bonus6_ab').val('');
$('#editGruppen').find('#rabatt2').val('');
$('#editGruppen').find('#bonus2').val('');
$('#editGruppen').find('#bonus2_ab').val('');
$('#editGruppen').find('#bonus7').val('');
$('#editGruppen').find('#bonus7_ab').val('');
$('#editGruppen').find('#rabatt3').val('');
$('#editGruppen').find('#bonus3').val('');
$('#editGruppen').find('#bonus3_ab').val('');
$('#editGruppen').find('#bonus8').val('');
$('#editGruppen').find('#bonus8_ab').val('');
$('#editGruppen').find('#rabatt4').val('');
$('#editGruppen').find('#bonus4').val('');
$('#editGruppen').find('#bonus4_ab').val('');
$('#editGruppen').find('#bonus9').val('');
$('#editGruppen').find('#bonus9_ab').val('');
$('#editGruppen').find('#rabatt5').val('');
$('#editGruppen').find('#bonus5').val('');
$('#editGruppen').find('#bonus5_ab').val('');
$('#editGruppen').find('#bonus10').val('');
$('#editGruppen').find('#bonus10_ab').val('');
$('#editGruppen').find('#provision').val('');
$('#editGruppen').find('#sonderrabatt_skonto').val('');
$('#editGruppen').find('#zentralregulierung').prop("checked",false);
$('#editGruppen').find('#rechnung_periode').val('1');
$('#editGruppen').find('#rechnung_anzahlpapier').val('');
$('#editGruppen').find('#rechnung_permail').prop("checked",false);
$('#editGruppen').find('#rechnung_name').val('');
$('#editGruppen').find('#rechnung_abteilung').val('');
$('#editGruppen').find('#rechnung_strasse').val('');
$('#editGruppen').find('#rechnung_plz').val('');
$('#editGruppen').find('#rechnung_ort').val('');
$('#editGruppen').find('#rechnung_land').val('');
$('#editGruppen').find('#rechnung_email').val('');
$('#editGruppen').find('#kundennummer').val('');
$('#editGruppen').find('#dta_aktiv').prop("checked",false);
$('#editGruppen').find('#dta_variante').val('1');
$('#editGruppen').find('#dtavariablen').val('');
$('#editGruppen').find('#dta_periode').val('1');
$('#editGruppen').find('#partnerid').val('');
$('#editGruppen').find('#dta_dateiname').val('');
$('#editGruppen').find('#dta_mail').val('');
$('#editGruppen').find('#dta_mail_betreff').val('');
$('#editGruppen').find('#dta_mail_text').val('');
art = document.getElementById('art');
rabatt = document.getElementById('rabatte');
rabatt2 = document.getElementById('rabatte2');
if(art){
// Hide the target field if priority isn't critical
if(art.options[art.selectedIndex].value =='gruppe'){
rabatt.style.display='none';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='preisgruppe'){
rabatt.style.display='';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='verband'){
rabatt.style.display='';
rabatt2.style.display='';
}else{
rabatt.style.display='none';
rabatt2.style.display='none';
}
}
}
function GruppenEditSave() {
$.ajax({
url: 'index.php?module=gruppen&action=edit&cmd=save',
data: {
//Alle Felder die fürs editieren vorhanden sind
id: $('#e_id').val(),
eaktiv: $('#aktiv').prop("checked")?1:0,
ename: $('#name').val(),
ekennziffer: $('#kennziffer').val(),
einternebemerkung: $('#internebemerkung').val(),
eart: $('#art').val(),
eprojekt: $('#projekt').val(),
ekategorie: $('#kategorie').val(),
egrundrabatt: $('#grundrabatt').val(),
ezahlungszieltage: $('#zahlungszieltage').val(),
ezahlungszielskonto: $('#zahlungszielskonto').val(),
ezahlungszieltageskonto: $('#zahlungszieltageskonto').val(),
eportofrei_aktiv: $('#portofrei_aktiv').prop("checked")?1:0,
eportofreiab: $('#portofreiab').val(),
erabatt1: $('#rabatt1').val(),
ebonus1: $('#bonus1').val(),
ebonus1_ab: $('#bonus1_ab').val(),
ebonus6: $('#bonus6').val(),
ebonus6_ab: $('#bonus6_ab').val(),
erabatt2: $('#rabatt2').val(),
ebonus2: $('#bonus2').val(),
ebonus2_ab: $('#bonus2_ab').val(),
ebonus7: $('#bonus7').val(),
ebonus7_ab: $('#bonus7_ab').val(),
erabatt3: $('#rabatt3').val(),
ebonus3: $('#bonus3').val(),
ebonus3_ab: $('#bonus3_ab').val(),
ebonus8: $('#bonus8').val(),
ebonus8_ab: $('#bonus8_ab').val(),
erabatt4: $('#rabatt4').val(),
ebonus4: $('#bonus4').val(),
ebonus4_ab: $('#bonus4_ab').val(),
ebonus9: $('#bonus9').val(),
ebonus9_ab: $('#bonus9_ab').val(),
erabatt5: $('#rabatt5').val(),
ebonus5: $('#bonus5').val(),
ebonus5_ab: $('#bonus5_ab').val(),
ebonus10: $('#bonus10').val(),
ebonus10_ab: $('#bonus10_ab').val(),
eprovision: $('#provision').val(),
esonderrabatt_skonto: $('#sonderrabatt_skonto').val(),
ezentralregulierung: $('#zentralregulierung').prop("checked")?1:0,
erechnung_periode: $('#rechnung_periode').val(),
erechnung_anzahlpapier: $('#rechnung_anzahlpapier').val(),
erechnung_permail: $('#rechnung_permail').prop("checked")?1:0,
erechnung_name: $('#rechnung_name').val(),
erechnung_abteilung: $('#rechnung_abteilung').val(),
erechnung_strasse: $('#rechnung_strasse').val(),
erechnung_plz: $('#rechnung_plz').val(),
erechnung_ort: $('#rechnung_ort').val(),
erechnung_land: $('#rechnung_land').val(),
erechnung_email: $('#rechnung_email').val(),
ekundennummer: $('#kundennummer').val(),
edta_aktiv: $('#dta_aktiv').prop("checked")?1:0,
edta_variante: $('#dta_variante').val(),
edtavariablen: $('#dtavariablen').val(),
edta_periode: $('#dta_periode').val(),
epartnerid: $('#partnerid').val(),
edta_dateiname: $('#dta_dateiname').val(),
edta_mail: $('#dta_mail').val(),
edta_mail_betreff: $('#dta_mail_betreff').val(),
edta_mail_text: $('#dta_mail_text').val()
},
method: 'post',
dataType: 'json',
beforeSend: function() {
App.loading.open();
},
success: function(data) {
App.loading.close();
if (data.status == 1) {
GruppenReset();
updateLiveTable();
$("#editGruppen").dialog('close');
} else {
alert(data.statusText);
}
}
});
}
function GruppenEdit(id) {
if(id > 0)
{
$.ajax({
url: 'index.php?module=gruppen&action=edit&cmd=get',
data: {
id: id
},
method: 'post',
dataType: 'json',
beforeSend: function() {
App.loading.open();
},
success: function(data) {
if(data.id > 0)
{
$('#editGruppen').find('#e_id').val(data.id);
$('#editGruppen').find('#aktiv').prop("checked", data.aktiv==1?true:false);
$('#editGruppen').find('#name').val(data.name);
$('#editGruppen').find('#kennziffer').val(data.kennziffer);
$('#editGruppen').find('#internebemerkung').val(data.internebemerkung);
$('#editGruppen').find('#art').val(data.art);
$('#editGruppen').find('#projekt').val(data.projekt);
$('#editGruppen').find('#kategorie').val(data.kategorie);
$('#editGruppen').find('#grundrabatt').val(data.grundrabatt);
$('#editGruppen').find('#zahlungszieltage').val(data.zahlungszieltage);
$('#editGruppen').find('#zahlungszielskonto').val(data.zahlungszielskonto);
$('#editGruppen').find('#zahlungszieltageskonto').val(data.zahlungszieltageskonto);
$('#editGruppen').find('#portofrei_aktiv').prop("checked", data.portofrei_aktiv==1?true:false);
$('#editGruppen').find('#portofreiab').val(data.portofreiab);
$('#editGruppen').find('#rabatt1').val(data.rabatt1);
$('#editGruppen').find('#bonus1').val(data.bonus1);
$('#editGruppen').find('#bonus1_ab').val(data.bonus1_ab);
$('#editGruppen').find('#bonus6').val(data.bonus6);
$('#editGruppen').find('#bonus6_ab').val(data.bonus6_ab);
$('#editGruppen').find('#rabatt2').val(data.rabatt2);
$('#editGruppen').find('#bonus2').val(data.bonus2);
$('#editGruppen').find('#bonus2_ab').val(data.bonus2_ab);
$('#editGruppen').find('#bonus7').val(data.bonus7);
$('#editGruppen').find('#bonus7_ab').val(data.bonus7_ab);
$('#editGruppen').find('#rabatt3').val(data.rabatt3);
$('#editGruppen').find('#bonus3').val(data.bonus3);
$('#editGruppen').find('#bonus3_ab').val(data.bonus3_ab);
$('#editGruppen').find('#bonus8').val(data.bonus8);
$('#editGruppen').find('#bonus8_ab').val(data.bonus8_ab);
$('#editGruppen').find('#rabatt4').val(data.rabatt4);
$('#editGruppen').find('#bonus4').val(data.bonus4);
$('#editGruppen').find('#bonus4_ab').val(data.bonus4_ab);
$('#editGruppen').find('#bonus9').val(data.bonus9);
$('#editGruppen').find('#bonus9_ab').val(data.bonus9_ab);
$('#editGruppen').find('#rabatt5').val(data.rabatt5);
$('#editGruppen').find('#bonus5').val(data.bonus5);
$('#editGruppen').find('#bonus5_ab').val(data.bonus5_ab);
$('#editGruppen').find('#bonus10').val(data.bonus10);
$('#editGruppen').find('#bonus10_ab').val(data.bonus10_ab);
$('#editGruppen').find('#provision').val(data.provision);
$('#editGruppen').find('#sonderrabatt_skonto').val(data.sonderrabatt_skonto);
$('#editGruppen').find('#zentralregulierung').prop("checked", data.zentralregulierung==1?true:false);
$('#editGruppen').find('#rechnung_periode').val(data.rechnung_periode);
$('#editGruppen').find('#rechnung_anzahlpapier').val(data.rechnung_anzahlpapier);
$('#editGruppen').find('#rechnung_permail').prop("checked", data.rechnung_permail==1?true:false);
$('#editGruppen').find('#rechnung_name').val(data.rechnung_name);
$('#editGruppen').find('#rechnung_abteilung').val(data.rechnung_abteilung);
$('#editGruppen').find('#rechnung_strasse').val(data.rechnung_strasse);
$('#editGruppen').find('#rechnung_plz').val(data.rechnung_plz);
$('#editGruppen').find('#rechnung_ort').val(data.rechnung_ort);
$('#editGruppen').find('#rechnung_land').val(data.rechnung_land);
$('#editGruppen').find('#rechnung_email').val(data.rechnung_email);
$('#editGruppen').find('#kundennummer').val(data.kundennummer);
$('#editGruppen').find('#dta_aktiv').prop("checked", data.dta_aktiv==1?true:false);
$('#editGruppen').find('#dta_variante').val(data.dta_variante);
$('#editGruppen').find('#dtavariablen').val(data.dtavariablen);
$('#editGruppen').find('#dta_periode').val(data.dta_periode);
$('#editGruppen').find('#partnerid').val(data.partnerid);
$('#editGruppen').find('#dta_dateiname').val(data.dta_dateiname);
$('#editGruppen').find('#dta_mail').val(data.dta_mail);
$('#editGruppen').find('#dta_mail_betreff').val(data.dta_mail_betreff);
$('#editGruppen').find('#dta_mail_text').val(data.dta_mail_text);
art = document.getElementById('art');
rabatt = document.getElementById('rabatte');
rabatt2 = document.getElementById('rabatte2');
if(art){
// Hide the target field if priority isn't critical
if(art.options[art.selectedIndex].value =='gruppe'){
rabatt.style.display='none';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='preisgruppe'){
rabatt.style.display='';
rabatt2.style.display='none';
}else if(art.options[art.selectedIndex].value =='verband'){
rabatt.style.display='';
rabatt2.style.display='';
}else{
rabatt.style.display='none';
rabatt2.style.display='none';
}
}
}else{
}
App.loading.close();
$("#editGruppen").dialog('open');
}
});
} else {
GruppenReset();
$("#editGruppen").dialog('open');
}
}
function updateLiveTable(i) {
var oTableL = $('#gruppenlist').dataTable();
var tmp = $('.dataTables_filter input[type=search]').val();
oTableL.fnFilter('%');
//oTableL.fnFilter('');
oTableL.fnFilter(tmp);
}
/*function GruppenDelete(id) {
var conf = confirm('Wirklich löschen?');
if (conf) {
$.ajax({
url: 'index.php?module=gruppen&action=delete',
data: {
id: id
},
method: 'post',
dataType: 'json',
beforeSend: function() {
App.loading.open();
},
success: function(data) {
if (data.status == 1) {
updateLiveTable();
} else {
alert(data.statusText);
}
App.loading.close();
}
});
}
return false;
}*/
</script>-->

View File

@ -62,7 +62,7 @@
{|Rechnungsdatum|}:
</td>
<td>
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED] required>
</td>
</tr>
<tr>
@ -103,7 +103,7 @@
{|Zahlbar bis|}:
</td>
<td>
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>&nbsp;<input type="number" name="zahlbarbis_tage" id="zahlbarbis_tage" size="4" [SAVEDISABLED]>&nbsp;Tage
</td>
</tr>
<tr>
@ -119,7 +119,7 @@
{|Skonto bis|}:
</td>
<td>
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>&nbsp;<input type="number" name="skontobis_tage" id="skontobis_tage" size="4" [SAVEDISABLED]>&nbsp;Tage
</td>
</tr>
<tr>

View File

@ -80,6 +80,7 @@ class Exportbuchhaltung
$lgchecked = $this->app->Secure->GetPOST("lieferantengutschrift");
$diffignore = $this->app->Secure->GetPOST("diffignore");
$sachkonto = $this->app->Secure->GetPOST('sachkonto');
$format = $this->app->Secure->GetPOST('format');
$account_id = null;
if (!empty($sachkonto)) {
@ -162,7 +163,7 @@ class Exportbuchhaltung
if ($dataok) {
$filename = "EXTF_".date('Ymd') . "_Buchungsstapel_DATEV_export.csv";
try {
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $lgchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $lgchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung, $format);
header("Content-Disposition: attachment; filename=" . $filename);
header("Pragma: no-cache");
header("Expires: 0");
@ -214,9 +215,10 @@ class Exportbuchhaltung
/*
* Create DATEV Buchhungsstapel
* format: "ISO-8859-1", "UTF-8", "UTF-8-BOM"
* @throws ConsistencyException with string (list of items) if consistency check fails and no sachkonto for differences is given
*/
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, bool $lieferantengutschrift, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences) : string {
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, bool $lieferantengutschrift, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences, string $format = "ISO-8859-1") : string {
$datev_header_definition = array (
'1' => 'Kennzeichen',
@ -671,7 +673,17 @@ class Exportbuchhaltung
$csv .= '"0";"S";"EUR";"0";"";"";"1234";"1370";"";"101";"";"";"";"Testbuchung";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"0";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";""'; // Testbuchung
$csv = mb_convert_encoding($csv, "ISO-8859-1", "UTF-8");
switch ($format) {
case "UTF-8":
break;
case "UTF-8-BOM":
$csv = "\xef\xbb\xbf".$csv;
break;
default:
$csv = mb_convert_encoding($csv, "ISO-8859-1", "UTF-8");
break;
}
return($csv);
}

View File

@ -1,43 +1,322 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
if(!class_exists('Gruppen'))
{
class Gruppen
{
function __construct($app, $intern = false)
{
$this->app=$app;
if($intern) {
return;
}
$this->app->ActionHandlerInit($this);
/*
* Copyright (c) 2022 OpenXE project
*/
$this->app->ActionHandler("list","GruppenList");
$this->app->DefaultActionHandler("list");
use Xentral\Components\Database\Exception\QueryFailureException;
class Gruppen {
$this->app->ActionHandlerListen($app);
}
function GruppenList()
{
$this->app->Tpl->Set('VERS','Professional');
$this->app->Tpl->Set('MODUL','Professional');
$this->app->Tpl->Parse('PAGE', "only_version.tpl");
function __construct($app, $intern = false) {
$this->app = $app;
if ($intern)
return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "gruppen_list");
$this->app->ActionHandler("create", "gruppen_edit"); // This automatically adds a "New" button
$this->app->ActionHandler("edit", "gruppen_edit");
$this->app->ActionHandler("delete", "gruppen_delete");
$this->app->DefaultActionHandler("list");
$this->app->ActionHandlerListen($app);
}
}
}
public function Install() {
/* Fill out manually later */
}
static function TableSearch(&$app, $name, $erlaubtevars) {
switch ($name) {
case "gruppen_list":
$allowed['gruppen_list'] = array('list');
$heading = array(
'',
'',
'Kennziffer',
'Name',
'Art',
'Internebemerkung',
'Projekt',
'Aktiv',
'Men&uuml;');
$width = array('1%','1%','10%'); // Fill out manually later
// columns that are aligned right (numbers etc)
// $alignright = array(4,5,6,7,8);
$findcols = array(
'g.id',
'g.id',
'g.kennziffer',
'g.name',
'g.art',
'g.internebemerkung',
'p.abkuerzung',
'g.aktiv',
'g.id'
);
$searchsql = array('g.name', 'g.art', 'g.kennziffer', 'g.internebemerkung');
$defaultorder = 1;
$defaultorderdesc = 0;
$aligncenter = array();
$alignright = array();
$numbercols = array();
$sumcol = array();
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',g.id,'\" />') AS `auswahl`";
// $moreinfo = true; // Allow drop down details
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
// $menucol = 11; // Set id col for moredata/menu
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=gruppen&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=DeleteDialog(\"index.php?module=gruppen&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS g.id, $dropnbox, g.kennziffer, g.name, g.art, g.internebemerkung, p.abkuerzung, g.aktiv, g.id FROM gruppen g LEFT JOIN projekt p ON g.projekt = p.id";
$where = "1";
$count = "SELECT count(DISTINCT id) FROM gruppen WHERE $where";
// $groupby = "";
break;
}
$erg = false;
foreach ($erlaubtevars as $k => $v) {
if (isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
function gruppen_list() {
$this->app->erp->MenuEintrag("index.php?module=gruppen&action=list", "&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=gruppen&action=create", "Neu anlegen");
$this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck");
$this->app->YUI->TableSearch('TAB1', 'gruppen_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "gruppen_list.tpl");
}
public function gruppen_delete() {
$id = (int) $this->app->Secure->GetGET('id');
$this->app->DB->Delete("DELETE FROM `gruppen` WHERE `id` = '{$id}'");
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gel&ouml;scht.</div>");
$this->gruppen_list();
}
/*
* Edit gruppen item
* If id is empty, create a new one
*/
function gruppen_edit() {
$id = $this->app->Secure->GetGET('id');
// Check if other users are editing this id
/* if($this->app->erp->DisableModul('gruppen',$id))
{
return;
} */
$this->app->Tpl->Set('ID', $id);
$this->app->erp->MenuEintrag("index.php?module=gruppen&action=edit&id=$id", "Details");
$this->app->erp->MenuEintrag("index.php?module=gruppen&action=list", "Zur&uuml;ck zur &Uuml;bersicht");
$id = $this->app->Secure->GetGET('id');
$input = $this->GetInput();
// Convert here
$input['aktiv'] = !empty($this->app->Secure->GetPOST('aktiv'))?"1":"0";
$submit = $this->app->Secure->GetPOST('submit');
if (empty($id)) {
// New item
$id = 'NULL';
}
if ($submit != '')
{
// Write to database
// Add checks here
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
$columns = "id, ";
$values = "$id, ";
$update = "";
$fix = "";
foreach ($input as $key => $value) {
$columns = $columns.$fix.$key;
$values = $values.$fix."'".$value."'";
$update = $update.$fix.$key." = '$value'";
$fix = ", ";
}
// echo($columns."<br>");
// echo($values."<br>");
// echo($update."<br>");
$sql = "INSERT INTO gruppen (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
// echo($sql);
$this->app->DB->Update($sql);
if ($id == 'NULL') {
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
header("Location: index.php?module=gruppen&action=list&msg=$msg");
} else {
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich &uuml;bernommen.</div>");
}
}
// Load values again from database
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',g.id,'\" />') AS `auswahl`";
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS g.id, $dropnbox, g.name, g.art, g.kennziffer, g.internebemerkung, g.grundrabatt, g.rabatt1, g.rabatt2, g.rabatt3, g.rabatt4, g.rabatt5, g.sonderrabatt_skonto, g.provision, g.kundennummer, g.partnerid, g.dta_aktiv, g.dta_periode, g.dta_dateiname, g.dta_mail, g.dta_mail_betreff, g.dta_mail_text, g.dtavariablen, g.dta_variante, g.bonus1, g.bonus1_ab, g.bonus2, g.bonus2_ab, g.bonus3, g.bonus3_ab, g.bonus4, g.bonus4_ab, g.bonus5, g.bonus5_ab, g.bonus6, g.bonus6_ab, g.bonus7, g.bonus7_ab, g.bonus8, g.bonus8_ab, g.bonus9, g.bonus9_ab, g.bonus10, g.bonus10_ab, g.zahlungszieltage, g.zahlungszielskonto, g.zahlungszieltageskonto, g.portoartikel, g.portofreiab, g.erweiterteoptionen, g.zentralerechnung, g.zentralregulierung, g.gruppe, g.preisgruppe, g.verbandsgruppe, g.rechnung_name, g.rechnung_strasse, g.rechnung_ort, g.rechnung_plz, g.rechnung_abteilung, g.rechnung_land, g.rechnung_email, g.rechnung_periode, g.rechnung_anzahlpapier, g.rechnung_permail, g.webid, g.portofrei_aktiv, g.projekt, g.objektname, g.objekttyp, g.parameter, g.objektname2, g.objekttyp2, g.parameter2, g.objektname3, g.objekttyp3, g.parameter3, g.kategorie, g.aktiv, g.id FROM gruppen g"." WHERE id=$id");
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
if (!empty($result)) {
$gruppen_from_db = $result[0];
} else {
}
/*
* Add displayed items later
*
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
$this->app->Tpl->Add('EMAIL', $email);
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
*/
$this->app->YUI->AutoComplete("kennziffer", "gruppekennziffer");
if ($gruppen_from_db['art'] != 'preisgruppe') {
$this->app->Tpl->Set('PREISGRUPPEHIDDEN','hidden');
}
$art_select = Array(
'gruppe' => 'Gruppe',
'preisgruppe' => 'Preisgruppe'
);
$art_select = $this->app->erp->GetSelectAsso($art_select,$gruppen_from_db['art']);
$this->app->Tpl->Set('ARTSELECT',$art_select);
$this->app->YUI->AutoComplete("projekt","projektname",1);
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$gruppen_from_db['projekt'],false));
$this->app->Tpl->Set('AKTIV', $gruppen_from_db['aktiv']==1?"checked":"");
$this->app->Tpl->Parse('PAGE', "gruppen_edit.tpl");
}
/**
* Get all paramters from html form and save into $input
*/
public function GetInput(): array {
$input = array();
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
$input['name'] = $this->app->Secure->GetPOST('name');
$input['art'] = $this->app->Secure->GetPOST('art');
$input['kennziffer'] = $this->app->Secure->GetPOST('kennziffer');
$input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung');
$input['grundrabatt'] = $this->app->Secure->GetPOST('grundrabatt');
$input['rabatt1'] = $this->app->Secure->GetPOST('rabatt1');
$input['rabatt2'] = $this->app->Secure->GetPOST('rabatt2');
$input['rabatt3'] = $this->app->Secure->GetPOST('rabatt3');
$input['rabatt4'] = $this->app->Secure->GetPOST('rabatt4');
$input['rabatt5'] = $this->app->Secure->GetPOST('rabatt5');
$input['sonderrabatt_skonto'] = $this->app->Secure->GetPOST('sonderrabatt_skonto');
$input['provision'] = $this->app->Secure->GetPOST('provision');
$input['kundennummer'] = $this->app->Secure->GetPOST('kundennummer');
$input['partnerid'] = $this->app->Secure->GetPOST('partnerid');
$input['dta_aktiv'] = $this->app->Secure->GetPOST('dta_aktiv');
$input['dta_periode'] = $this->app->Secure->GetPOST('dta_periode');
$input['dta_dateiname'] = $this->app->Secure->GetPOST('dta_dateiname');
$input['dta_mail'] = $this->app->Secure->GetPOST('dta_mail');
$input['dta_mail_betreff'] = $this->app->Secure->GetPOST('dta_mail_betreff');
$input['dta_mail_text'] = $this->app->Secure->GetPOST('dta_mail_text');
$input['dtavariablen'] = $this->app->Secure->GetPOST('dtavariablen');
$input['dta_variante'] = $this->app->Secure->GetPOST('dta_variante');
$input['bonus1'] = $this->app->Secure->GetPOST('bonus1');
$input['bonus1_ab'] = $this->app->Secure->GetPOST('bonus1_ab');
$input['bonus2'] = $this->app->Secure->GetPOST('bonus2');
$input['bonus2_ab'] = $this->app->Secure->GetPOST('bonus2_ab');
$input['bonus3'] = $this->app->Secure->GetPOST('bonus3');
$input['bonus3_ab'] = $this->app->Secure->GetPOST('bonus3_ab');
$input['bonus4'] = $this->app->Secure->GetPOST('bonus4');
$input['bonus4_ab'] = $this->app->Secure->GetPOST('bonus4_ab');
$input['bonus5'] = $this->app->Secure->GetPOST('bonus5');
$input['bonus5_ab'] = $this->app->Secure->GetPOST('bonus5_ab');
$input['bonus6'] = $this->app->Secure->GetPOST('bonus6');
$input['bonus6_ab'] = $this->app->Secure->GetPOST('bonus6_ab');
$input['bonus7'] = $this->app->Secure->GetPOST('bonus7');
$input['bonus7_ab'] = $this->app->Secure->GetPOST('bonus7_ab');
$input['bonus8'] = $this->app->Secure->GetPOST('bonus8');
$input['bonus8_ab'] = $this->app->Secure->GetPOST('bonus8_ab');
$input['bonus9'] = $this->app->Secure->GetPOST('bonus9');
$input['bonus9_ab'] = $this->app->Secure->GetPOST('bonus9_ab');
$input['bonus10'] = $this->app->Secure->GetPOST('bonus10');
$input['bonus10_ab'] = $this->app->Secure->GetPOST('bonus10_ab');
$input['zahlungszieltage'] = $this->app->Secure->GetPOST('zahlungszieltage');
$input['zahlungszielskonto'] = $this->app->Secure->GetPOST('zahlungszielskonto');
$input['zahlungszieltageskonto'] = $this->app->Secure->GetPOST('zahlungszieltageskonto');
$input['portoartikel'] = $this->app->Secure->GetPOST('portoartikel');
$input['portofreiab'] = $this->app->Secure->GetPOST('portofreiab');
$input['erweiterteoptionen'] = $this->app->Secure->GetPOST('erweiterteoptionen');
$input['zentralerechnung'] = $this->app->Secure->GetPOST('zentralerechnung');
$input['zentralregulierung'] = $this->app->Secure->GetPOST('zentralregulierung');
$input['gruppe'] = $this->app->Secure->GetPOST('gruppe');
$input['preisgruppe'] = $this->app->Secure->GetPOST('preisgruppe');
$input['verbandsgruppe'] = $this->app->Secure->GetPOST('verbandsgruppe');
$input['rechnung_name'] = $this->app->Secure->GetPOST('rechnung_name');
$input['rechnung_strasse'] = $this->app->Secure->GetPOST('rechnung_strasse');
$input['rechnung_ort'] = $this->app->Secure->GetPOST('rechnung_ort');
$input['rechnung_plz'] = $this->app->Secure->GetPOST('rechnung_plz');
$input['rechnung_abteilung'] = $this->app->Secure->GetPOST('rechnung_abteilung');
$input['rechnung_land'] = $this->app->Secure->GetPOST('rechnung_land');
$input['rechnung_email'] = $this->app->Secure->GetPOST('rechnung_email');
$input['rechnung_periode'] = $this->app->Secure->GetPOST('rechnung_periode');
$input['rechnung_anzahlpapier'] = $this->app->Secure->GetPOST('rechnung_anzahlpapier');
$input['rechnung_permail'] = $this->app->Secure->GetPOST('rechnung_permail');
$input['webid'] = $this->app->Secure->GetPOST('webid');
$input['portofrei_aktiv'] = $this->app->Secure->GetPOST('portofrei_aktiv');
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
$input['objektname'] = $this->app->Secure->GetPOST('objektname');
$input['objekttyp'] = $this->app->Secure->GetPOST('objekttyp');
$input['parameter'] = $this->app->Secure->GetPOST('parameter');
$input['objektname2'] = $this->app->Secure->GetPOST('objektname2');
$input['objekttyp2'] = $this->app->Secure->GetPOST('objekttyp2');
$input['parameter2'] = $this->app->Secure->GetPOST('parameter2');
$input['objektname3'] = $this->app->Secure->GetPOST('objektname3');
$input['objekttyp3'] = $this->app->Secure->GetPOST('objekttyp3');
$input['parameter3'] = $this->app->Secure->GetPOST('parameter3');
$input['kategorie'] = $this->app->Secure->GetPOST('kategorie');
$input['aktiv'] = $this->app->Secure->GetPOST('aktiv');
return $input;
}
}

View File

@ -3990,7 +3990,6 @@ class Importvorlage extends GenImportvorlage {
if($this->app->DB->Select("SELECT id FROM artikel WHERE id ='$artikelid' LIMIT 1")){
//Sprachen
if($this->app->erp->ModulVorhanden('artikel_texte')){
$erlaubtefelder= array('name','kurztext','beschreibung','beschreibung_online','meta_title',
'meta_description','meta_keywords','katalog_bezeichnung','katalog_text','katalogartikel','shop','aktiv');
$zuImportierendeSprachen = [];
@ -4066,8 +4065,7 @@ class Importvorlage extends GenImportvorlage {
}
}
}
}
}
} // Sprachen
//freifelduebersetzungen
foreach ($tmp as $feldname => $feldwerte) {

View File

@ -1,134 +1,133 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\TOTPLogin\TOTPLoginService;
class Totp
{
/** @var Application */
private $app;
/**
* Totp constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false)
{
$this->app = $app;
if($intern) return;
$app->ActionHandlerInit($this);
$app->ActionHandler('generate', 'TOTPGenerateSecretJSON');
$app->ActionHandler('enable', 'TOTPEnable');
$app->ActionHandler('disable', 'TOTPDisable');
$app->ActionHandlerListen($app);
}
public function Install()
{
$tableName = 'user_totp';
$this->app->erp->CheckTable($tableName);
$this->app->erp->CheckColumn('id', 'UNSIGNED INT', $tableName, 'NOT NULL AUTO_INCREMENT');
$this->app->erp->CheckColumn('user_id', 'INT', $tableName, 'UNSIGNED NOT NULL');
$this->app->erp->CheckColumn('active', 'TINYINT(1)', $tableName, 'UNSIGNED DEFAULT 0');
$this->app->erp->CheckColumn('secret', 'VARCHAR(100)', $tableName, 'NOT NULL');
$this->app->erp->CheckColumn('created_at', 'TIMESTAMP', $tableName, 'DEFAULT NOW()');
$this->app->erp->CheckColumn('modified_at', 'TIMESTAMP', $tableName);
$this->app->erp->CheckIndex($tableName, 'user_id', true);
$this->app->erp->RegisterHook('login_password_check_otp', 'totp', 'TOTPCheckLogin', 1, false, null, 3);
}
function TOTPDisable(){
$action = $this->app->Secure->GetPOST('action');
if($action !== 'disable'){
return new JsonResponse(['status' => 'error', 'msg' => 'muss POST sein'], 400);
}
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
$userId = $this->app->User->GetID();
$totpLoginService->disableTotp($userId);
return new JsonResponse(['status' => 'success']);
}
function TOTPEnable(){
$secret = $this->app->Secure->GetPOST('secret');
if(empty($secret)){
return new JsonResponse(['status' => 'error', 'msg' => 'Secret Empty'], 400);
}
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
$userId = $this->app->User->GetID();
$totpLoginService->enableTotp($userId);
$totpLoginService->setUserSecret($userId, $secret);
return new JsonResponse(['status' => 'success']);
}
/**
* @param $userID
* @param $token
* @param $passwordValid
*
* @throws Exception
*/
public function TOTPCheckLogin($userID, $token, &$passwordValid)
{
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
if(!$totpLoginService->isTOTPEnabled($userID)){
return;
}
$passwordValid = $totpLoginService->isTokenValid($userID, $token);
}
public function TOTPGenerateSecretJSON(){
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
/** @var \Xentral\Components\Token\TOTPTokenManager $tokenManager */
$tokenManager = $this->app->Container->get('TOTPTokenManager');
$secret = $tokenManager->generateBase32Secret();
$label = 'Xentral' . ' | ' . $this->app->erp->GetFirmaName();
$qr = $totpLoginService->generatePairingQrCode($this->app->User->GetID(), $label, $secret);
return new JsonResponse(
[
'secret' => $secret,
'qr' => $qr->toHtml(4, 4)
]
);
}
}
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\TOTPLogin\TOTPLoginService;
class Totp
{
/** @var Application */
private $app;
/**
* Totp constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false)
{
$this->app = $app;
if($intern) return;
$app->ActionHandlerInit($this);
$app->ActionHandler('generate', 'TOTPGenerateSecretJSON');
$app->ActionHandler('enable', 'TOTPEnable');
$app->ActionHandler('disable', 'TOTPDisable');
$app->ActionHandlerListen($app);
}
public function Install()
{
$tableName = 'user_totp';
$this->app->erp->CheckTable($tableName);
$this->app->erp->CheckColumn('id', 'UNSIGNED INT', $tableName, 'NOT NULL AUTO_INCREMENT');
$this->app->erp->CheckColumn('user_id', 'INT', $tableName, 'UNSIGNED NOT NULL');
$this->app->erp->CheckColumn('active', 'TINYINT(1)', $tableName, 'UNSIGNED DEFAULT 0');
$this->app->erp->CheckColumn('secret', 'VARCHAR(100)', $tableName, 'NOT NULL');
$this->app->erp->CheckColumn('created_at', 'TIMESTAMP', $tableName, 'DEFAULT NOW()');
$this->app->erp->CheckColumn('modified_at', 'TIMESTAMP', $tableName);
$this->app->erp->CheckIndex($tableName, 'user_id', true);
$this->app->erp->RegisterHook('login_password_check_otp', 'totp', 'TOTPCheckLogin', 1, false, null, 3);
}
function TOTPDisable(){
$action = $this->app->Secure->GetPOST('action');
if($action !== 'disable'){
return new JsonResponse(['status' => 'error', 'msg' => 'muss POST sein'], 400);
}
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
$userId = $this->app->User->GetID();
$totpLoginService->disableTotp($userId);
return new JsonResponse(['status' => 'success']);
}
function TOTPEnable(){
$secret = $this->app->Secure->GetPOST('secret');
if(empty($secret)){
return new JsonResponse(['status' => 'error', 'msg' => 'Secret Empty'], 400);
}
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
$userId = $this->app->User->GetID();
$totpLoginService->enableTotp($userId);
$totpLoginService->setUserSecret($userId, $secret);
return new JsonResponse(['status' => 'success']);
}
/**
* @param $userID
* @param $token
* @param $passwordValid
*
* @throws Exception
*/
public function TOTPCheckLogin($userID, $token, &$passwordValid)
{
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
if(!$totpLoginService->isTOTPEnabled($userID)){
return;
}
$passwordValid = $totpLoginService->isTokenValid($userID, $token);
}
public function TOTPGenerateSecretJSON(){
/** @var TOTPLoginService $totpLoginService */
$totpLoginService = $this->app->Container->get('TOTPLoginService');
/** @var \Xentral\Components\Token\TOTPTokenManager $tokenManager */
$tokenManager = $this->app->Container->get('TOTPTokenManager');
$secret = $tokenManager->generateBase32Secret();
$label = 'OpenXE' . ':' . $this->app->User->Getname();
$qr = $totpLoginService->generatePairingQrCode($this->app->User->GetID(), $label, $secret);
return new JsonResponse(
[
'secret' => $secret,
'qr' => $qr->toHtml(4, 4)
]
);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
<svg width="14" height="12" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.625 4.03125L5.25 0.96875" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.375 4.03125L8.75 0.96875" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.0455 11.0312H2.95353C2.56348 11.0242 2.2295 10.7498 2.14678 10.3686L0.899611 5.11858C0.831972 4.86388 0.884041 4.59223 1.04107 4.38059C1.1981 4.16894 1.44298 4.04036 1.70636 4.03125H12.2927C12.5561 4.04036 12.801 4.16894 12.958 4.38059C13.115 4.59223 13.1671 4.86388 13.0994 5.11858L11.8523 10.3686C11.7696 10.7498 11.4356 11.0242 11.0455 11.0312Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.375 5.78125V9.28125" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7 5.78125V9.28125" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.625 5.78125V9.28125" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -566,11 +566,13 @@
<div class="inside inside-full-height">
<fieldset><legend>&nbsp;{|Beschreibung|}&nbsp;</legend>
<fieldset>
<legend>&nbsp;{|Beschreibung|}&nbsp;</legend>
<table class="mkTableFormular" border="0">
<tr valign="top"><td width="500">{|Artikel (DE) (Bitte im ersten Tab bearbeiten)|}:<br>[ARTIKEL_DE_ANZEIGE]</td><td width="20"></td>
<td width="500">{|Artikel (EN)|}:<br>[NAME_EN][MSGNAME_EN]</td></tr>
<td width="500">{|Artikel (EN)|}:<br>[NAME_EN][MSGNAME_EN]</td>
</tr>
<tr><td>{|Kurztext (DE) (Bitte im ersten Tab bearbeiten)|}:<br>[KURZTEXT_DE_ANZEIGE]</td><td width="20"></td>