Compare commits

..

No commits in common. "master" and "wareneingang" have entirely different histories.

153 changed files with 30120 additions and 39745 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ conf/user.inc.php
conf/user_defined.php
userdata
www/cache/
www/themes/new/css/custom.css

View File

@ -54,11 +54,14 @@ memory_limit = 256M
## Install additional zip
`sudo apt-get install zip`
## Install mysql client
`sudo apt-get install mysql-client`
## Install database server
`sudo apt-get install mariadb-server`
## Configure database server
`sudo mariadb-secure-installation`
`sudo mysql_secure_installation`
```
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

View File

@ -20,7 +20,7 @@ final class ErrorPageData implements JsonSerializable
public function __construct($exception, $title = null)
{
$this->exception = $exception;
$this->title = !empty($title) ? (string)$title : 'DBXE: Es ist ein unerwarteter Fehler aufgetreten!';
$this->title = !empty($title) ? (string)$title : 'OpenXE: Es ist ein unerwarteter Fehler aufgetreten!';
}

View File

@ -73,7 +73,7 @@ final class Shopware6Client
$request = new ClientRequest(
$method,
$this->url . $endpoint,
$this->url . 'v2/' . $endpoint,
$headerInformation,
empty($body) ? null : json_encode($body)
);

View File

@ -31,14 +31,14 @@ class SubscriptionModule implements SubscriptionModuleInterface
aa.id,
@start := GREATEST(aa.startdatum, aa.abgerechnetbis) as start,
@end := IF(aa.enddatum = '0000-00-00' OR aa.enddatum > :calcdate, :calcdate, aa.enddatum) as end,
@cycles := GREATEST(aa.zahlzyklus, CASE
@cycles := CASE
WHEN aa.preisart = 'monat' THEN
TIMESTAMPDIFF(MONTH, @start, @end)
WHEN aa.preisart = 'jahr' THEN
TIMESTAMPDIFF(YEAR, @start, @end)
WHEN aa.preisart = '30tage' THEN
FLOOR(TIMESTAMPDIFF(DAY, @start, @end) / 30)
END+1) as cycles,
END+1 as cycles,
CASE
WHEN aa.preisart = 'monat' THEN
DATE_ADD(@start, INTERVAL @cycles MONTH)

View File

@ -285,7 +285,6 @@ class TicketImportHelper
tr.dsgvo AS `is_gdpr_relevant`,
tr.prio AS `priority`,
tr.persoenlich AS `is_private`,
tr.adresse,
tr.warteschlange AS `queue_id`
FROM `ticket_regeln` AS `tr`
WHERE
@ -465,7 +464,7 @@ class TicketImportHelper
$status = 'neu';
}
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."',`adresse` = '".$rule['adresse']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
$this->logger->debug('ticket rule sql',['sql' => $sql]);

View File

@ -223,7 +223,7 @@ if ($task) {
} catch (Exception $e) {
$app->erp->LogFile(
$app->DB->real_escape_string(
'Prozessstarter Fehler bei Aufruf des Moduls ' . $task[$task_index]['parameter'] . ': ' . $e->getMessage()." Trace: ".$e->GetTraceAsString()
'Prozessstarter Fehler bei Aufruf des Moduls ' . $task[$task_index]['parameter'] . ': ' . $e->getMessage()
)
);
}

View File

@ -16729,9 +16729,7 @@ INSERT INTO `firmendaten_werte` (`id`, `name`, `typ`, `typ1`, `typ2`, `wert`, `d
(386, 'cleaner_shopimport_tage', 'int', '11', '', '90', '90', 0, 0),
(387, 'cleaner_adapterbox', 'tinyint', '1', '', '1', '1', 0, 0),
(388, 'cleaner_adapterbox_tage', 'int', '11', '', '90', '90', 0, 0),
(389, 'bcc3', 'varchar', '128', '', '', '', 0, 0),
(390, 'rechnungersatz_standard', 'int', '1', '', '0', '0', 0, 0)
(389, 'bcc3', 'varchar', '128', '', '', '', 0, 0)
;
INSERT INTO `geschaeftsbrief_vorlagen` (`id`, `sprache`, `betreff`, `text`, `subjekt`, `projekt`, `firma`) VALUES
@ -16751,44 +16749,6 @@ INSERT INTO `geschaeftsbrief_vorlagen` (`id`, `sprache`, `betreff`, `text`, `sub
(16, 'deutsch', 'Zusammenstellung Ihrer Bestellung', '{ANSCHREIBEN},<br><br>soeben wurde Ihr Bestellung zusammengestellt. Sie können Ihre Ware jetzt abholen. Sind Sie bereits bei uns gewesen, so sehen Sie diese E-Mail bitte als gegenstandslos an.<br><br>{VERSAND}<br><br>Ihr {FIRMA} Team<br>', 'Selbstabholer', 0, 1),
(17, 'deutsch', 'Ihre Gutschrift {BELEGNR} von {FIRMA}', '{ANSCHREIBEN},<br><br>anbei finden Sie Ihre Gutschrift. Gerne stehen wir Ihnen weiterhin zur Verfügung.<br><br>Ihre Gutschrift ist im PDF-Format erstellt worden. Um sich die Gutschrift ansehen zu können, klicken Sie auf den Anhang und es öffnet sich automatisch der Acrobat Reader. Sollten Sie keinen Acrobat Reader besitzen, haben wir für Sie den Link zum kostenlosen Download von Adobe Acrobat Reader mit angegeben. Er führt Sie automatisch auf die Downloadseite von Adobe. So können Sie sich Ihre Gutschrift auch für Ihre Unterlagen ausdrucken.<br><br>http://www.adobe.com/products/acrobat/readstep2.html<br><br>{IF}{INTERNET}{THEN}Internet-Bestellnr.: {INTERNET}{ELSE}{ENDIF}', 'Gutschrift', 1, 1);
/* DBXE 2024-01-24 für datatablelabel */
INSERT INTO `hook` (`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
('eproosystem_ende', 1, 0, '', ''),
('parseuservars', 1, 0, '', ''),
('dokumentsend_ende', 1, 0, '', ''),
('auftrag_versand_ende', 1, 0, '', ''),
('transfer_document_incoming', 1, 0, '', '')
;
INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
(0, 'DataTableLabelsInclude', 1, 3, (SELECT id FROM hook WHERE name = 'eproosystem_ende'), 'Datatablelabels', 0),
(0, 'DatatablelabelsParseUserVars', 1, 2, (SELECT id FROM hook WHERE name = 'parseuservars'), 'Datatablelabels', 0),
(0, 'DataTableLabelsDokumentSendHook', 1, 1, (SELECT id FROM hook WHERE name = 'dokumentsend_ende'), 'Datatablelabels', 0),
(0, 'DatatablelabelsOrderSent', 1, 1, (SELECT id FROM hook WHERE name = 'auftrag_versand_ende'), 'Datatablelabels', 0),
(0, 'DatatablelabelsTransferDocumentIncomming', 1, 1, (SELECT id FROM hook WHERE name = 'transfer_document_incoming'), 'Datatablelabels', 0);
/* DBXE 2024-01-24 für datatablelabel */
/* OpenXE 2024-02-03 für belegvorlagen */
INSERT INTO `hook` (`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
('BelegPositionenButtons', 1, 3, '', ''),
('AARLGPositionen_cmds_end', 1, 1, '', ''),
('ajax_filter_hook1', 1, 1, '', '');
INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
(0, 'BelegevorlagenAARLGPositionen_cmds_end', 1, 2, (SELECT id FROM hook WHERE name = 'AARLGPositionen_cmds_end' LIMIT 1), 'belegevorlagen', 0),
(0, 'Belegevorlagenajax_filter_hook1', 1, 2, (SELECT id FROM hook WHERE name = 'ajax_filter_hook1' LIMIT 1), 'belegevorlagen', 0),
(0, 'BelegevorlagenBelegPositionenButtons', 1, 2, (SELECT id FROM hook WHERE name = 'BelegPositionenButtons' LIMIT 1), 'belegevorlagen', 0)
;
/* DBXE 2024-02-03 für belegvorlagen */
/*
BelegPositionenButtons
Id,Hook_action,Function,Aktiv,Position,Hook,Module,Module_parameter
20,0,BelegevorlagenBelegPositionenButtons,1,2,16,belegevorlagen,0
*/
INSERT INTO `hook_menu` (`id`, `module`, `aktiv`) VALUES
(1, 'artikel', 1),
(2, 'provisionenartikel', 1),
@ -18210,7 +18170,7 @@ INSERT INTO `wiedervorlage_stages` (`id`, `kurzbezeichnung`, `name`, `hexcolor`,
(12, 'Stay', 'Stay (Erhalt)', '#A2D624', 0, 1, 4, 4, NULL),
(13, 'Okay', 'Okay (Befürwortung)', '#A2D624', 0, 1, 5, 4, NULL);
INSERT INTO `wiki` (`id`, `name`, `content`, `lastcontent`) VALUES
(1, 'StartseiteWiki', '\n<p>Herzlich Willkommen in Ihrem DBXE, dem freien ERP.<br><br>Wir freuen uns Sie als Benutzer begrüßen zu dürfen. Mit DBXE organisieren Sie Ihre Firma schnell und einfach. Sie haben alle wichtigen Zahlen und Vorgänge im Überblick.<br><br>Für Einsteiger sind die folgenden Themen wichtig:<br><br></p>\n<ul>\n<li> <a href="index.php?module=firmendaten&amp;action=edit" target="_blank"> Firmendaten</a> (dort richten Sie Ihr Briefpapier ein)</li>\n<li> <a href="index.php?module=adresse&amp;action=list" target="_blank"> Stammdaten / Adressen</a> (Kunden und Lieferanten anlegen)</li>\n<li> <a href="index.php?module=artikel&amp;action=list" target="_blank"> Artikel anlegen</a> (Ihr Artikelstamm)</li>\n<li> <a href="index.php?module=angebot&amp;action=list" target="_blank"> Angebot</a> / <a href="index.php?module=auftrag&amp;action=list" target="_blank"> Auftrag</a> (Alle Dokumente für Ihr Geschäft)</li>\n<li> <a href="index.php?module=rechnung&amp;action=list" target="_blank"> Rechnung</a> / <a href="index.php?module=gutschrift&amp;action=list" target="_blank"> Gutschrift</a></li>\n<li> <a href="index.php?module=lieferschein&amp;action=list" target="_blank"> Lieferschein</a></li>\n</ul>\n<p><br><br>Kennen Sie unsere Zusatzmodule die Struktur und Organisation in das tägliche Geschäft bringen?<br><br></p>\n<ul>\n<li> <a href="index.php?module=kalender&amp;action=list" target="_blank"> Kalender</a></li>\n<li> <a href="index.php?module=wiki&amp;action=list" target="_blank"> Wiki</a></li>\n</ul>', NULL);
(1, 'StartseiteWiki', '\n<p>Herzlich Willkommen in Ihrem OpenXE, dem freien ERP.<br><br>Wir freuen uns Sie als Benutzer begrüßen zu dürfen. Mit OpenXE organisieren Sie Ihre Firma schnell und einfach. Sie haben alle wichtigen Zahlen und Vorgänge im Überblick.<br><br>Für Einsteiger sind die folgenden Themen wichtig:<br><br></p>\n<ul>\n<li> <a href="index.php?module=firmendaten&amp;action=edit" target="_blank"> Firmendaten</a> (dort richten Sie Ihr Briefpapier ein)</li>\n<li> <a href="index.php?module=adresse&amp;action=list" target="_blank"> Stammdaten / Adressen</a> (Kunden und Lieferanten anlegen)</li>\n<li> <a href="index.php?module=artikel&amp;action=list" target="_blank"> Artikel anlegen</a> (Ihr Artikelstamm)</li>\n<li> <a href="index.php?module=angebot&amp;action=list" target="_blank"> Angebot</a> / <a href="index.php?module=auftrag&amp;action=list" target="_blank"> Auftrag</a> (Alle Dokumente für Ihr Geschäft)</li>\n<li> <a href="index.php?module=rechnung&amp;action=list" target="_blank"> Rechnung</a> / <a href="index.php?module=gutschrift&amp;action=list" target="_blank"> Gutschrift</a></li>\n<li> <a href="index.php?module=lieferschein&amp;action=list" target="_blank"> Lieferschein</a></li>\n</ul>\n<p><br><br>Kennen Sie unsere Zusatzmodule die Struktur und Organisation in das tägliche Geschäft bringen?<br><br></p>\n<ul>\n<li> <a href="index.php?module=kalender&amp;action=list" target="_blank"> Kalender</a></li>\n<li> <a href="index.php?module=wiki&amp;action=list" target="_blank"> Wiki</a></li>\n</ul>', NULL);
INSERT INTO `konten` (`id`, `bezeichnung`, `kurzbezeichnung`, `type`, `erstezeile`, `datevkonto`, `blz`, `konto`, `swift`, `iban`, `lastschrift`, `hbci`, `hbcikennung`, `inhaber`, `aktiv`, `keineemail`, `firma`, `schreibbar`, `importletztenzeilenignorieren`, `liveimport`, `liveimport_passwort`, `liveimport_online`, `importtrennzeichen`, `codierung`, `importerstezeilenummer`, `importdatenmaskierung`, `importnullbytes`, `glaeubiger`, `geloescht`, `projekt`, `saldo_summieren`, `saldo_betrag`, `saldo_datum`, `importfelddatum`, `importfelddatumformat`, `importfelddatumformatausgabe`, `importfeldbetrag`, `importfeldbetragformat`, `importfeldbuchungstext`, `importfeldbuchungstextformat`, `importfeldwaehrung`, `importfeldwaehrungformat`, `importfeldhabensollkennung`, `importfeldkennunghaben`, `importfeldkennungsoll`, `importextrahabensoll`, `importfeldhaben`, `importfeldsoll`, `cronjobaktiv`, `cronjobverbuchen`) VALUES

View File

@ -765,7 +765,6 @@ $tooltip['firmendaten']['edit']['bezeichnungangebotersatz']="Im Angebot gibt es
$tooltip['firmendaten']['edit']['angebotersatz_standard']="Mit dieser Option setzen Sie die alternative Bezeichnung im Angebot (Option drüber) als Standard. Dadurch ist der Haken beim Erstellen eines neuen Angebots immer gesetzt.";
$tooltip['firmendaten']['edit']['bezeichnungauftragersatz']="Im Auftrag gibt es einen Haken um den Betreff des Augtrag-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
$tooltip['firmendaten']['edit']['bezeichnungrechnungersatz']="In der Rechnung gibt es einen Haken um den Betreff des Rechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
$tooltip['firmendaten']['edit']['rechnungersatz_standard']="Mit dieser Option setzen Sie die alternative Bezeichnung in der Rechnung (Option drüber) als Standard. Dadurch ist der Haken beim Erstellen einer neuen Rechnung immer gesetzt.";
$tooltip['firmendaten']['edit']['bezeichnunglieferscheinersatz']="Im Lieferschein gibt es einen Haken um den Betreff des Lieferschein-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
$tooltip['firmendaten']['edit']['bezeichnungbestellungersatz']="In der Bestellung gibt es einen Haken um den Betreff des Bestell-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
$tooltip['firmendaten']['edit']['bezeichnungproformarechnungersatz']="In der Proformarechnung gibt es einen Haken um den Betreff der Proformarechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";

View File

@ -1,361 +1,361 @@
<?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
/// represent a HTML Form structure
class HTMLForm
{
var $action;
var $method;
var $name;
var $id;
var $FieldList;
function __construct($action="",$method="post",$name="",$id="")
{
$this->action=$action;
$this->name=$name;
$this->method=$method;
$this->id=$id;
}
function Set($value)
{
}
function Get()
{
}
function GetClose()
{
}
}
class HTMLTextarea
{
var $name;
var $rows;
var $value;
var $cols;
var $id="";
var $readonly="";
var $disabled="";
var $class;
function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="")
{
$this->name = $name;
$this->rows = $rows;
$this->cols = $cols;
$this->class = $class;
$this->value = $defvalue;
$this->id = $id;
if($id=="")
$this->id = $name;
$this->readonly = $readonly;
$this->disabled = $disabled;
}
function Get()
{
// TEMP ACHTUNG HIER IST MIST!!!
$value = $this->value;
/*
if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('/<br\\s*?\/??>/i', "\n", $value);
*/
// $value = str_replace("\\r\\n","\n",$value);
$html = "<textarea rows=\"{$this->rows}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" cols=\"{$this->cols}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>$value</textarea>";
return $html;
}
function GetClose()
{
}
}
/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den
/// user in irgendeiner art und weise gesehen und manipuliert werden koennen
class BlindField
{
var $name;
var $value;
function __construct($name,$value)
{
$this->name = $name;
$this->value = $value;
}
function Get(){}
function GetClose(){}
}
class HTMLInput
{
var $name;
var $type;
var $value;
var $dbvalue;
var $checkvalue;
var $onchange;
var $onclick;
var $defvalue;
var $size;
var $maxlength;
var $tabindex;
var $id="";
var $readonly="";
var $disabled="";
var $placeholder="";
var $class;
var $checked;
function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="")
{
$this->name = $name;
$this->type = $type;
$this->value = $value;
$this->size = $size;
$this->maxlength = $maxlength;
$this->id = $id;
$this->readonly = $readonly;
$this->disabled = $disabled;
$this->class=$class;
$this->checked=$checked;
$this->tabindex=$tabindex;
$this->placeholder=$placeholder;
$this->defvalue=$defvalue; // if value is empty use this
$this->onclick=$onclick;
}
function Get()
{
if($this->id=="") $this->id = $this->name;
switch($this->type)
{
case "text":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"".preg_replace("/\"/","&quot;",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "password":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "checkbox":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "radio":
if($this->value==$this->defvalue) $this->checked="checked";
$tmpname = str_replace('_'.$this->defvalue,'',$this->name);
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "submit":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" value=\"{$this->value}\"
{$this->readonly} {$this->disabled}>";
break;
case "hidden":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>";
break;
}
return $html;
}
function GetClose()
{
}
}
class HTMLCheckbox extends HTMLInput
{
function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="")
{
if($checkvalue!="")
$this->checkvalue=$checkvalue;
else
$this->checkvalue=$value;
$this->name = $name;
$this->type = "checkbox";
$this->checkradiovalue = isset($okvalue)?$okvalue:null;
$this->defvalue = $defvalue;
$this->value = $value;
$this->onclick= $onclick;
$this->tabindex= $tabindex;
$this->orgvalue = $value;
}
function Get()
{
if(($this->value=="" && $this->defvalue==$this->checkvalue)) {
}
if($this->checkvalue==$this->value) {
$this->checked="checked";
}
if($this->value=="" && $this->defvalue!=$this->checkvalue)
$this->checked="";
$this->value = $this->checkvalue;
//$this->value=1;
return parent::Get();
}
function GetClose()
{
}
};
class HTMLSelect
{
var $name;
var $size;
var $id;
var $readonly;
var $disabled;
var $options;
var $onchange;
var $selected;
var $tabindex;
var $class;
function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="")
{
$this->name=$name;
$this->size=$size;
$this->id=$id;
$this->readonly=$readonly;
$this->disabled=$disabled;
$this->tabindex=$tabindex;
$this->class="";
if($id=="")
$this->id = $name;
}
function AddOption($option,$value)
{
$this->options[] = array($option,$value);
}
function AddOptionsDimensionalArray($values)
{
foreach($values as $key=>$value)
{
$this->options[] = array($value[wert],$value[schluessel]);
}
}
function AddOptionsAsocSimpleArray($values)
{
foreach($values as $key=>$value)
$this->options[] = array($value,$key);
}
function AddOptionsSimpleArray($values)
{
if(is_array($values))
{
foreach($values as $key=>$value)
{
if(!is_numeric($key))
$this->options[] = array($value,$key);
else
$this->options[] = array($value,$value);
}
}
}
function AddOptions($values)
{
$number=0;
if(count($values)>0)
{
foreach($values as $key=>$row)
foreach($row as $value)
{
if($number==0){
$option=$value;
$number=1;
}
else {
$this->options[] = array($option,$value);
$number=0;
$option="";
}
}
}
}
function Get()
{
$html = "<select name=\"{$this->name}\" size=\"{$this->size}\" tabindex=\"{$this->tabindex}\"
id=\"{$this->id}\" class=\"{$this->class}\" onchange=\"{$this->onchange}\" [COMMONREADONLYSELECT]>";
if($this->options && count($this->options)>0)
{
foreach($this->options as $key=>$value)
{
if($this->value==$value[1])
$html .="<option value=\"{$value[1]}\" selected>{$value[0]}</option>";
else
$html .="<option value=\"{$value[1]}\">{$value[0]}</option>";
}
}
$html .="</select>";
return $html;
}
function GetClose()
{
}
}
<?php
/// represent a HTML Form structure
class HTMLForm
{
var $action;
var $method;
var $name;
var $id;
var $FieldList;
function __construct($action="",$method="post",$name="",$id="")
{
$this->action=$action;
$this->name=$name;
$this->method=$method;
$this->id=$id;
}
function Set($value)
{
}
function Get()
{
}
function GetClose()
{
}
}
class HTMLTextarea
{
var $name;
var $rows;
var $value;
var $cols;
var $id="";
var $readonly="";
var $disabled="";
var $class;
function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="")
{
$this->name = $name;
$this->rows = $rows;
$this->cols = $cols;
$this->class = $class;
$this->value = $defvalue;
$this->id = $id;
if($id=="")
$this->id = $name;
$this->readonly = $readonly;
$this->disabled = $disabled;
}
function Get()
{
// TEMP ACHTUNG HIER IST MIST!!!
$value = $this->value;
/*
if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('/<br\\s*?\/??>/i', "\n", $value);
*/
// $value = str_replace("\\r\\n","\n",$value);
$html = "<textarea rows=\"{$this->rows}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" cols=\"{$this->cols}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>$value</textarea>";
return $html;
}
function GetClose()
{
}
}
/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den
/// user in irgendeiner art und weise gesehen und manipuliert werden koennen
class BlindField
{
var $name;
var $value;
function __construct($name,$value)
{
$this->name = $name;
$this->value = $value;
}
function Get(){}
function GetClose(){}
}
class HTMLInput
{
var $name;
var $type;
var $value;
var $dbvalue;
var $checkvalue;
var $onchange;
var $onclick;
var $defvalue;
var $size;
var $maxlength;
var $tabindex;
var $id="";
var $readonly="";
var $disabled="";
var $placeholder="";
var $class;
var $checked;
function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="")
{
$this->name = $name;
$this->type = $type;
$this->value = $value;
$this->size = $size;
$this->maxlength = $maxlength;
$this->id = $id;
$this->readonly = $readonly;
$this->disabled = $disabled;
$this->class=$class;
$this->checked=$checked;
$this->tabindex=$tabindex;
$this->placeholder=$placeholder;
$this->defvalue=$defvalue; // if value is empty use this
$this->onclick=$onclick;
}
function Get()
{
if($this->id=="") $this->id = $this->name;
switch($this->type)
{
case "text":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"".preg_replace("/\"/","&quot;",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "password":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "checkbox":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "radio":
if($this->value==$this->defvalue) $this->checked="checked";
$tmpname = str_replace('_'.$this->defvalue,'',$this->name);
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\"
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
break;
case "submit":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" value=\"{$this->value}\"
{$this->readonly} {$this->disabled}>";
break;
case "hidden":
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>";
break;
}
return $html;
}
function GetClose()
{
}
}
class HTMLCheckbox extends HTMLInput
{
function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="")
{
if($checkvalue!="")
$this->checkvalue=$checkvalue;
else
$this->checkvalue=$value;
$this->name = $name;
$this->type = "checkbox";
$this->checkradiovalue = isset($okvalue)?$okvalue:null;
$this->defvalue = $defvalue;
$this->value = $value;
$this->onclick= $onclick;
$this->tabindex= $tabindex;
$this->orgvalue = $value;
}
function Get()
{
if(($this->value=="" && $this->defvalue==$this->checkvalue)) {
}
if($this->checkvalue==$this->value) {
$this->checked="checked";
}
if($this->value=="" && $this->defvalue!=$this->checkvalue)
$this->checked="";
$this->value = $this->checkvalue;
//$this->value=1;
return parent::Get();
}
function GetClose()
{
}
};
class HTMLSelect
{
var $name;
var $size;
var $id;
var $readonly;
var $disabled;
var $options;
var $onchange;
var $selected;
var $tabindex;
var $class;
function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="")
{
$this->name=$name;
$this->size=$size;
$this->id=$id;
$this->readonly=$readonly;
$this->disabled=$disabled;
$this->tabindex=$tabindex;
$this->class="";
if($id=="")
$this->id = $name;
}
function AddOption($option,$value)
{
$this->options[] = array($option,$value);
}
function AddOptionsDimensionalArray($values)
{
foreach($values as $key=>$value)
{
$this->options[] = array($value[wert],$value[schluessel]);
}
}
function AddOptionsAsocSimpleArray($values)
{
foreach($values as $key=>$value)
$this->options[] = array($value,$key);
}
function AddOptionsSimpleArray($values)
{
if(is_array($values))
{
foreach($values as $key=>$value)
{
if(!is_numeric($key))
$this->options[] = array($value,$key);
else
$this->options[] = array($value,$value);
}
}
}
function AddOptions($values)
{
$number=0;
if(count($values)>0)
{
foreach($values as $key=>$row)
foreach($row as $value)
{
if($number==0){
$option=$value;
$number=1;
}
else {
$this->options[] = array($option,$value);
$number=0;
$option="";
}
}
}
}
function Get()
{
$html = "<select name=\"{$this->name}\" size=\"{$this->size}\" tabindex=\"{$this->tabindex}\"
id=\"{$this->id}\" class=\"{$this->class}\" onchange=\"{$this->onchange}\" [COMMONREADONLYSELECT]>";
if($this->options && count($this->options)>0)
{
foreach($this->options as $key=>$value)
{
if($this->value==$value[1])
$html .="<option value=\"{$value[1]}\" selected>{$value[0]}</option>";
else
$html .="<option value=\"{$value[1]}\">{$value[0]}</option>";
}
}
$html .="</select>";
return $html;
}
function GetClose()
{
}
}

View File

@ -1230,7 +1230,7 @@ class DB{
$sql = "UPDATE `$tablename` SET ";
foreach($ArrCols as $key=>$value) {
if($key!=$pkname && (isset($ziel[$key]) || !$zielspalten)) {
$sqla[] = "`".$key."` = '".($escape?$this->real_escape_string($value):$value)."' ";
$sqla[] = $key." = '".($escape?$this->real_escape_string($value):$value)."' ";
}
}
if(!empty($sqla)) {

View File

@ -1,453 +1,451 @@
<?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 StringCleaner
{
private $elements;
private $htmlpuriferconfig;
private $htmlpurifer;
private $ruleregexps;
/** @var Application */
private $app;
/**
* StringCleaner constructor.
*
* @param null|Application $app
*/
public function __construct($app = null)
{
$this->app = $app;
if(class_exists('HTMLPurifier_Config')) {
$this->htmlpuriferconfig = HTMLPurifier_Config::createDefault();
$this->htmlpuriferconfig->set('Core.Encoding', 'UTF-8');
$this->htmlpuriferconfig->set('Attr.AllowedFrameTargets', ['_blank']); // Allow hyperlinks with target="_blank"
//$this->htmlpuriferconfig->set('HTML.AllowedElements', 'h1,h2,h3,h4,h5,h6,p,a,strong,em,ol,ul,li,img,param,div,br,form,label,fieldset,input,textarea,select,option');
$this->htmlpurifer = new HTMLPurifier($this->htmlpuriferconfig);
}
$this->elements = array('nohtml'=> array('ust_befreit','abweichendelieferadresse','bestellungsart','bearbeiter','datum','lieferdatum','name','anrede','partner','packstation_inhaber','packstation_station','packstation_ident','packstation_plz','packstation_ort','partnerid','kennen','ihrebestellnummer'
,'abteilung','unterabteilung','ansprechpartner','adresszusatz','strasse','land','bundesstaat','plz','ort','versandart','internet','transaktionsnummer','vertrieb','zahlungsweise'
,'lieferabteilung','lieferunterabteilung','lieferansprechpartner','lieferadresszusatz','lieferstrasse','lieferland','lieferbundesstaat','lieferplz','lieferort'
,'bank_inhaber','bank_institut','bank_blz','bank_konto'
,'email','telefon','telefax','ustid','partner','projekt','herstellernummer','ean','nummer','name_de','name_ean'),
'nojs' => array('anabregstext','anabregstext_en','uebersicht_de','uebersicht_en','kurztext_de','kurztext_en','internebemerkung','internebezeichnung','freitext'));
$this->rulechecks = array('digit'=>'/^[0-9]+$/'
,'alpha'=>'/^[a-zA-Z]+$/'
,'alphadigit'=>'/^[0-9a-zA-Z]+$/'
,'username'=>'/^[0-9a-zA-Z\.\-]+$/'
,'space'=>'/^[\x20]+$/'
,'module'=>'/^[0-9a-zA-Z\_]$/'
,'password'=>'/^[^\s\n]{1}[^\n]{5}.*$/'
,'email'=>'/^[^@\s\x00-\x20]+@[^@\s\x00-\x20\.]+\.[^@\s\x00-\x20\.]+[^@\s\x00-\x20]*$/'
);
$this->ruleregexps = array(
'digit'=>'/[^0-9]/'
,'username'=>'/[^0-9a-zA-Z\.\-]/'
,'alpha'=>'/[^a-zA-Z]/'
,'alphadigits'=>'/[^0-9a-zA-Z]/'
,'module'=>'/[^0-9a-zA-Z\_]/'
,'moduleminus'=>'/[^0-9a-zA-Z\_\-]/'
,'alphadigitsspecial'=>'/[^0-9a-zA-Z\_\.\(\)]/'
,'base64'=>'/[^0-9a-zA-Z\=\+\-\_\/]/'
);
}
function SyntaxByElement($key, $default = '')
{
foreach($this->elements as $type => $arr) {
if(in_array($key, $arr)) {
return $type;
}
}
return $default;
}
function CleanSQLReturn($value, $columnname, $default = '')
{
if($value == '' || is_numeric($value))
{
return $value;
}
if(in_array($columnname, array('nummer','name','kundennummer','bezeichnung','bezeichnunglieferant','lieferantennummer','mitarbeiternummer','name_de','name_en',
'kurzbezeichnung','abkuerzung',
'strasse','plz','ort','land','ansprechpartner','abteilung','unterabteilung',
'liefername','lieferstrasse','lieferplz','lieferort','lieferland','lieferansprechpartner','lieferabteilung','lieferunterabteilung'))){
return strip_tags($value);
}
if($default == 'xss_clean')
{
return $this->xss_clean($value, false);
}
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($value);
}
return $value;
}
function RuleCheck($string, $rule = null, &$found = false)
{
if(isset($this->rulechecks[$rule]))
{
$found = true;
return preg_match_all($this->rulechecks[$rule], $string, $dummy);
}
switch($rule)
{
case 'datum':
$found = true;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try {
if($x = new DateTime($string)) {
return $x->format('Y') > 0;
}
}
catch (Exception $e) {
return false;
}
return false;
break;
}
}
function CheckSQLHtml($sql)
{
$start = 0;
$len = strlen($sql);
$lvl = 0;
$col = 0;
$ret = array(0);
$instring = false;
for($i = $start; $i < $len; $i++)
{
$char = $sql[$i];
switch($char)
{
case "'":
if($instring)
{
if($sql[$i-1] != '\\')
{
$instring = false;
}
}else{
if($sql[$i-1] != '\\'){
$instring = true;
}
}
break;
case "(":
if($instring)
{
}else{
$lvl++;
}
break;
case ")":
if($instring)
{
}else{
$lvl--;
}
break;
case "<":
if($instring)
{
if(preg_match('/<[a-zA-Z]/',$char.$sql[$i+1]))
{
if($ret[$col] != 2)
{
$ret[$col] = 1;
}
}
}
break;
case ',':
if($instring)
{
}else{
if($lvl == 0)
{
$col++;
$ret[$col] = 0;
}
}
break;
case 'o':
case 'O':
if($instring)
{
if($i < $len -4)
{
if(strtolower(substr($sql, $i, 2)) == 'on')
{
if(preg_match('/^on[a-z]+(\s*)=/', substr($sql, $i)))
{
$ret[$col] = 2;
}
}
}
}
break;
case 'F':
case 'f':
if($instring)
{
}else{
if($lvl == 0)
{
if($i < $len - 4)
{
if(strtolower(substr($sql, $i, 4)) == 'from')
{
break 2;
}
}
}
}
break;
}
}
$where = strripos($sql, 'where');
$restsql = substr($sql, $i, $where - $i);
if(preg_match('/<[a-zA-Z]/', $restsql))
{
if(preg_match('/on[a-z]+(\s*)=/',$restsql))
{
if($ret)
{
foreach($ret as $k => $v)
{
$ret[$k] = 2;
}
}
}else{
if($ret)
{
foreach($ret as $k => $v)
{
if($v != 2)
{
$ret[$k] = 1;
}
}
}
}
}
return $ret;
}
public function CleanString($string, $rule = null, &$found = false)
{
if(is_null($rule))
{
$rule = 'nothml';
}
switch($rule)
{
case 'email':
if($this->RuleCheck($string, $rule))
{
return $string;
}
return '';
break;
case 'nohtml':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false)
{
return $string;
}
return strip_tags($string);
break;
case 'datum':
$found = true;
$string_ = $string;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string_ = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try
{
if($x = new DateTime($string_))
{
if($x->format('Y') <= 0)
{
return '';
}
return $string;
}
} catch (Exception $e) {
return '';
}
return '';
break;
case 'xss_clean':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false){
return $string;
}
return $this->xss_clean($string, false);
break;
case 'nojs':
$found = true;
if($string == '' || is_numeric($string))return $string;
if(strpos($string,'<') === false)return $string;
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($string);
}
return $this->xss_clean($string);
break;
case 'id':
$found = true;
if((String)$string === '')
{
return $string;
}
return (int)$string;
break;
case 'doppelid':
$found = true;
if((String)$string === '')
{
return $string;
}
$stringa = explode('-', $string, 2);
if(count($stringa) == 1)return (int)$stringa[0];
return ($stringa[0]===''?'':(int)$stringa[0]).'-'.(int)$stringa[1];
break;
case 'module':
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
break;
default:
if(isset($this->ruleregexps[$rule]))
{
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
}
break;
}
return $string;
}
public function xss_clean($data, $usepurify = true)
{
if($usepurify && !empty($this->htmlpurifer))
{
return $this->htmlpurifer->purify($data);
}
// Fix &entity\n;
$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');
return $data;
// Remove any attribute starting with "on" or xmlns
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
// Remove javascript: and vbscript: protocols
$data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data);
// Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data);
// Remove namespaced elements (we do not need them)
$data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
do
{
// Remove really unwanted tags
$old_data = $data;
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
}
while ($old_data !== $data);
return $data;
}
function XMLArray_clean(&$xml, $lvl = 0)
{
if(is_string($xml))
{
}elseif(is_array($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(is_string($v))
{
$xml[$k] = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}
}
}elseif(is_object($xml))
{
$xml = (array) $xml;
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
$v = (array) $v;
if(count($v) > 0)
{
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}elseif((String)$v != '')
{
if(isset($xml->$k))
{
//$xml->$k = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
}
}
}
}
return $xml;
}
}
<?php
class StringCleaner
{
private $elements;
private $htmlpuriferconfig;
private $htmlpurifer;
private $ruleregexps;
/** @var Application */
private $app;
/**
* StringCleaner constructor.
*
* @param null|Application $app
*/
public function __construct($app = null)
{
$this->app = $app;
if(class_exists('HTMLPurifier_Config')) {
$this->htmlpuriferconfig = HTMLPurifier_Config::createDefault();
$this->htmlpuriferconfig->set('Core.Encoding', 'UTF-8');
$this->htmlpuriferconfig->set('Attr.AllowedFrameTargets', ['_blank']); // Allow hyperlinks with target="_blank"
//$this->htmlpuriferconfig->set('HTML.AllowedElements', 'h1,h2,h3,h4,h5,h6,p,a,strong,em,ol,ul,li,img,param,div,br,form,label,fieldset,input,textarea,select,option');
$this->htmlpurifer = new HTMLPurifier($this->htmlpuriferconfig);
}
$this->elements = array('nohtml'=> array('ust_befreit','abweichendelieferadresse','bestellungsart','bearbeiter','datum','lieferdatum','name','anrede','partner','packstation_inhaber','packstation_station','packstation_ident','packstation_plz','packstation_ort','partnerid','kennen','ihrebestellnummer'
,'abteilung','unterabteilung','ansprechpartner','adresszusatz','strasse','land','bundesstaat','plz','ort','versandart','internet','transaktionsnummer','vertrieb','zahlungsweise'
,'lieferabteilung','lieferunterabteilung','lieferansprechpartner','lieferadresszusatz','lieferstrasse','lieferland','lieferbundesstaat','lieferplz','lieferort'
,'bank_inhaber','bank_institut','bank_blz','bank_konto'
,'email','telefon','telefax','ustid','partner','projekt','herstellernummer','ean','nummer','name_de','name_ean'),
'nojs' => array('anabregstext','anabregstext_en','uebersicht_de','uebersicht_en','kurztext_de','kurztext_en','internebemerkung','internebezeichnung','freitext'));
$this->rulechecks = array('digit'=>'/^[0-9]+$/'
,'alpha'=>'/^[a-zA-Z]+$/'
,'alphadigit'=>'/^[0-9a-zA-Z]+$/'
,'username'=>'/^[0-9a-zA-Z\.\-]+$/'
,'space'=>'/^[\x20]+$/'
,'module'=>'/^[0-9a-zA-Z\_]$/'
,'password'=>'/^[^\s\n]{1}[^\n]{5}.*$/'
,'email'=>'/^[^@\s\x00-\x20]+@[^@\s\x00-\x20\.]+\.[^@\s\x00-\x20\.]+[^@\s\x00-\x20]*$/'
);
$this->ruleregexps = array(
'digit'=>'/[^0-9]/'
,'username'=>'/[^0-9a-zA-Z\.\-]/'
,'alpha'=>'/[^a-zA-Z]/'
,'alphadigits'=>'/[^0-9a-zA-Z]/'
,'module'=>'/[^0-9a-zA-Z\_]/'
,'moduleminus'=>'/[^0-9a-zA-Z\_\-]/'
,'alphadigitsspecial'=>'/[^0-9a-zA-Z\_\.\(\)]/'
,'base64'=>'/[^0-9a-zA-Z\=\+\-\_\/]/'
);
}
function SyntaxByElement($key, $default = '')
{
foreach($this->elements as $type => $arr) {
if(in_array($key, $arr)) {
return $type;
}
}
return $default;
}
function CleanSQLReturn($value, $columnname, $default = '')
{
if($value == '' || is_numeric($value))
{
return $value;
}
if(in_array($columnname, array('nummer','name','kundennummer','bezeichnung','bezeichnunglieferant','lieferantennummer','mitarbeiternummer','name_de','name_en',
'kurzbezeichnung','abkuerzung',
'strasse','plz','ort','land','ansprechpartner','abteilung','unterabteilung',
'liefername','lieferstrasse','lieferplz','lieferort','lieferland','lieferansprechpartner','lieferabteilung','lieferunterabteilung'))){
return strip_tags($value);
}
if($default == 'xss_clean')
{
return $this->xss_clean($value, false);
}
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($value);
}
return $value;
}
function RuleCheck($string, $rule = null, &$found = false)
{
if(isset($this->rulechecks[$rule]))
{
$found = true;
return preg_match_all($this->rulechecks[$rule], $string, $dummy);
}
switch($rule)
{
case 'datum':
$found = true;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try {
if($x = new DateTime($string)) {
return $x->format('Y') > 0;
}
}
catch (Exception $e) {
return false;
}
return false;
break;
}
}
function CheckSQLHtml($sql)
{
$start = 0;
$len = strlen($sql);
$lvl = 0;
$col = 0;
$ret = array(0);
$instring = false;
for($i = $start; $i < $len; $i++)
{
$char = $sql[$i];
switch($char)
{
case "'":
if($instring)
{
if($sql[$i-1] != '\\')
{
$instring = false;
}
}else{
if($sql[$i-1] != '\\'){
$instring = true;
}
}
break;
case "(":
if($instring)
{
}else{
$lvl++;
}
break;
case ")":
if($instring)
{
}else{
$lvl--;
}
break;
case "<":
if($instring)
{
if(preg_match('/<[a-zA-Z]/',$char.$sql[$i+1]))
{
if($ret[$col] != 2)
{
$ret[$col] = 1;
}
}
}
break;
case ',':
if($instring)
{
}else{
if($lvl == 0)
{
$col++;
$ret[$col] = 0;
}
}
break;
case 'o':
case 'O':
if($instring)
{
if($i < $len -4)
{
if(strtolower(substr($sql, $i, 2)) == 'on')
{
if(preg_match('/^on[a-z]+(\s*)=/', substr($sql, $i)))
{
$ret[$col] = 2;
}
}
}
}
break;
case 'F':
case 'f':
if($instring)
{
}else{
if($lvl == 0)
{
if($i < $len - 4)
{
if(strtolower(substr($sql, $i, 4)) == 'from')
{
break 2;
}
}
}
}
break;
}
}
$where = strripos($sql, 'where');
$restsql = substr($sql, $i, $where - $i);
if(preg_match('/<[a-zA-Z]/', $restsql))
{
if(preg_match('/on[a-z]+(\s*)=/',$restsql))
{
if($ret)
{
foreach($ret as $k => $v)
{
$ret[$k] = 2;
}
}
}else{
if($ret)
{
foreach($ret as $k => $v)
{
if($v != 2)
{
$ret[$k] = 1;
}
}
}
}
}
return $ret;
}
public function CleanString($string, $rule = null, &$found = false)
{
if(is_null($rule))
{
$rule = 'nothml';
}
switch($rule)
{
case 'email':
if($this->RuleCheck($string, $rule))
{
return $string;
}
return '';
break;
case 'nohtml':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false)
{
return $string;
}
return strip_tags($string);
break;
case 'datum':
$found = true;
$string_ = $string;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string_ = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try
{
if($x = new DateTime($string_))
{
if($x->format('Y') <= 0)
{
return '';
}
return $string;
}
} catch (Exception $e) {
return '';
}
return '';
break;
case 'xss_clean':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false){
return $string;
}
return $this->xss_clean($string, false);
break;
case 'nojs':
$found = true;
if($string == '' || is_numeric($string))return $string;
if(strpos($string,'<') === false)return $string;
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($string);
}
return $this->xss_clean($string);
break;
case 'id':
$found = true;
if((String)$string === '')
{
return $string;
}
return (int)$string;
break;
case 'doppelid':
$found = true;
if((String)$string === '')
{
return $string;
}
$stringa = explode('-', $string, 2);
if(count($stringa) == 1)return (int)$stringa[0];
return ($stringa[0]===''?'':(int)$stringa[0]).'-'.(int)$stringa[1];
break;
case 'module':
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
break;
default:
if(isset($this->ruleregexps[$rule]))
{
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
}
break;
}
return $string;
}
public function xss_clean($data, $usepurify = true)
{
if($usepurify && !empty($this->htmlpurifer))
{
return $this->htmlpurifer->purify($data);
}
// Fix &entity\n;
$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');
return $data;
// Remove any attribute starting with "on" or xmlns
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
// Remove javascript: and vbscript: protocols
$data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data);
// Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data);
// Remove namespaced elements (we do not need them)
$data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
do
{
// Remove really unwanted tags
$old_data = $data;
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
}
while ($old_data !== $data);
return $data;
}
function XMLArray_clean(&$xml, $lvl = 0)
{
if(is_string($xml))
{
}elseif(is_array($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(is_string($v))
{
$xml[$k] = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}
}
}elseif(is_object($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(count($v) > 0)
{
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}elseif((String)$v != '')
{
if(isset($xml->$k))
{
//$xml->$k = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
}
}
}
}
return $xml;
}
}

View File

@ -28,15 +28,6 @@ class YUI {
$this->app = $app;
}
function dateien_module_objekt_map($module) : string {
$dateien_module_objekt_map_array = array(
'adresse' => 'adressen',
'ticket' => 'ticket_header'
);
return (isset($dateien_module_objekt_map_array[$module]) ? $dateien_module_objekt_map_array[$module] : $module);
}
function PasswordCheck($passwordFieldID, $repassFieldID, $accountNameFieldID, $submitButtonID, $extra = ''){
$this->app->Tpl->Add('JQUERYREADY', "
function checkPassword(){
@ -736,10 +727,9 @@ class YUI {
if($value == '')$value = '0';
$this->app->DB->Update("UPDATE $table SET rabatt='$value',keinrabatterlaubt=1 WHERE id='$id' LIMIT 1");
$result = $this->app->DB->Select("SELECT ".$this->FormatPreis('rabatt')." FROM $table WHERE id='$id' LIMIT 1");
//$sort = $this->app->DB->Select("SELECT sort FROM $table WHERE id='$id' LIMIT 1");
//$parent = $this->app->DB->Select("SELECT $module FROM $table WHERE id='$id' LIMIT 1");
//if($parent && $sort == 1)$this->app->DB->Update("UPDATE $module SET rabatt = '$value',keinrabatterlaubt=1 WHERE id = '$parent' LIMIT 1");
$sort = $this->app->DB->Select("SELECT sort FROM $table WHERE id='$id' LIMIT 1");
$parent = $this->app->DB->Select("SELECT $module FROM $table WHERE id='$id' LIMIT 1");
if($parent && $sort == 1)$this->app->DB->Update("UPDATE $module SET rabatt = '$value',keinrabatterlaubt=1 WHERE id = '$parent' LIMIT 1");
if(in_array($module, array('auftrag','rechnung','gutschrift')))
{
$tmptable_value = $this->app->DB->Select("SELECT $module FROM $table WHERE id = '$id' LIMIT 1");
@ -2564,7 +2554,7 @@ class YUI {
$anzeigebrutto = true;
}
}
$sortcol = ' b.sort ';
$schreibschutz = !empty($docArr)?$docArr['schreibschutz']:$this->app->DB->Select("SELECT schreibschutz FROM $module WHERE id='$id'");
if(!$schreibschutz)$sortcol = " concat('<input type=\"checkbox\" name=\"belegsort[]\" value=\"',b.id,'\" />',b.sort) as sort ";
@ -2588,19 +2578,11 @@ class YUI {
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung))
) $erweiterte_ansicht)
as Artikel,
p.abkuerzung as projekt,
b.nummer as nummer,
DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,
trim(b.menge)+0 as menge,
".$this->FormatPreis($preiscell)." as preis,
b.waehrung,
".$this->FormatPreis('b.rabatt')." as rabatt,";
if ($this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$sql .= $this->FormatPreis('einkaufspreis')." as einkaufspreis,
CONCAT(".$this->app->erp->FormatPreis("ROUND(deckungsbeitrag*100,2)",2).",'%') AS DB,
";
}
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
$sql .= "b.id as id
FROM $table b
@ -2839,94 +2821,22 @@ class YUI {
,b.waehrung, b.rabatt as rabatt,";
if ($this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$sql .= $this->FormatPreis('einkaufspreis')." as einkaufspreis,
CONCAT(".$this->app->erp->FormatPreis("ROUND(deckungsbeitrag*100,2)",2).",'%') AS DB,
";
}
} else {
}else{
$sql = "SELECT $sortcol, CONCAT($hersteller_ansicht if(b.beschreibung!='',
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnung,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnung,' *')),
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung)) $erweiterte_ansicht)
as Artikel,
p.abkuerzung as projekt,
a.nummer as nummer,
b.nummer as nummer,
DATE_FORMAT(lieferdatum,
'%d.%m.%Y') as lieferdatum,
trim(b.menge)+0 as menge,
".$this->FormatPreis($preiscell)." as preis,
b.waehrung,
b.rabatt as rabatt,
'' AS Einkaufspreis,
'' AS DB,
";
p.abkuerzung as projekt, a.nummer as nummer, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis
,b.waehrung, b.rabatt as rabatt,";
}
$sql .= "b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
}
else if ($module == "verbindlichkeit") // OpenXE
{
$sql = "
SELECT
$sortcol,
IF(
b.beschreibung != '',
IF(
CHAR_LENGTH(b.bezeichnung) > " . $this->app->erp->MaxArtikelbezeichnung() . ",
CONCAT(
SUBSTR(
CONCAT(b.bezeichnung, ' *'),
1,
" . $this->app->erp->MaxArtikelbezeichnung() . "
),
'...'
),
CONCAT(b.bezeichnung, ' *')
),
IF(
CHAR_LENGTH(b.bezeichnung) > " . $this->app->erp->MaxArtikelbezeichnung() . ",
CONCAT(
SUBSTR(
b.bezeichnung,
1,
" . $this->app->erp->MaxArtikelbezeichnung() . "
),
'...'
),
b.bezeichnung
)
) AS Artikel,
p.abkuerzung AS projekt,
a.nummer,
".$this->app->erp->FormatDate('lieferdatum')." AS lieferdatum,
TRIM(b.menge) +0 AS menge,
" . $this->FormatPreis($preiscell) . " AS preis,
" . $this->FormatPreis($preiscell."*menge") . " AS Betrag,
CONCAT(
k.sachkonto,
' - ',
k.beschriftung
) AS sachkonto,
b.id AS id
FROM
$table b
LEFT JOIN artikel a ON
a.id = b.artikel
LEFT JOIN projekt p ON
b.projekt = p.id
LEFT JOIN kontorahmen k ON
k.id = b.sachkonto
WHERE
b.$module = '$id'
";
}
else {
$sql .= "b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
} else {
$sql = null;
$this->app->erp->RunHook('yui_position_sql', 3, $table, $id, $sql);
if($sql === null){
@ -3612,26 +3522,34 @@ class YUI {
function IconsSQLVerbindlichkeit() {
$go_ware = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" style=\"margin-right:1px\" title=\"Wareneingangspr&uuml;fung OK\" border=\"0\">";
$stop_ware = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagerstop.png\" style=\"margin-right:1px\" title=\"Wareneingangspr&uuml;fung fehlt\" border=\"0\">";
$go_pdf = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" style=\"margin-right:1px\" title=\"Anhang OK\" border=\"0\">";
$stop_pdf = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_stop.png\" style=\"margin-right:1px\" title=\"Anhang fehlt\" border=\"0\">";
$go_summe = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/check_go.png\" style=\"margin-right:1px\" title=\"Rechnungseingangspr&uuml;fung OK\" border=\"0\">";
$stop_summe = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/check_stop.png\" style=\"margin-right:1px\" title=\"Rechnungseingangspr&uuml;fung fehlt\" border=\"0\">";
$go_ware = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/ware_go.png\" style=\"margin-right:1px\" title=\"Wareneingangspr&uuml;fung OK\" border=\"0\">";
$stop_ware = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/ware_stop.png\" style=\"margin-right:1px\" title=\"Wareneingangspr&uuml;fung fehlt\" border=\"0\">";
$go_summe = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" style=\"margin-right:1px\" title=\"Rechnungseingangspr&uuml;fung OK\" border=\"0\">";
$stop_summe = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_stop.png\" style=\"margin-right:1px\" title=\"Rechnungseingangspr&uuml;fung fehlt\" border=\"0\">";
$go_zahlung = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/bank_go.svg\" style=\"margin-right:1px\" title=\"Kontoverkn&uuml;pfung OK\" border=\"0\">";
$stop_zahlung = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/bank_stop.svg\" style=\"margin-right:1px\" title=\"Kontoverkn&uuml;pfung fehlt\" border=\"0\">";
$stop_betragbezahlt = "<img alt=\"Zahlung fehlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassestop.png\" style=\"margin-right:1px\" title=\"Zahlung fehlt\" border=\"0\">";
$gostop_betragbezahlt = "<img alt=\"teilweise bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassegostop.png\" style=\"margin-right:1px\" title=\"teilweise bezahlt\" border=\"0\">";
$go_betragbezahlt = "<img alt=\"nicht bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"bezahlt\" border=\"0\">";
$go_betragbezahlt = "<img alt=\"nicht bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"komplett bezahlt\" border=\"0\">";
return "CONCAT('<table><tr><td nowrap>',
if(datei_anzahl > 0,'$go_pdf','$stop_pdf'),
if(v.freigabe,'$go_ware','$stop_ware'),
if(v.rechnungsfreigabe,'$go_summe','$stop_summe'),
if(v.bezahlt,'$go_betragbezahlt','$stop_betragbezahlt'),
IF( v.betragbezahlt = 0 OR (v.betrag > 0 AND v.betragbezahlt < 0),'$stop_betragbezahlt',
IF(v.betrag > 0 AND (v.betragbezahlt + v.skonto_erhalten) >= v.betrag, '$go_betragbezahlt',
IF(v.betrag - v.betragbezahlt <= v.betrag-((v.betrag/100.0)*v.skonto),
'$gostop_betragbezahlt',
'$go_betragbezahlt'
)
)
),
if((
(SELECT COUNT(ka.id)
FROM kontoauszuege_zahlungsausgang ka WHERE ka.parameter=v.id AND ka.objekt='verbindlichkeit') +
(SELECT COUNT(ke.id) FROM kontoauszuege_zahlungseingang ke WHERE ke.parameter=v.id AND ke.objekt='verbindlichkeit')) > 0,
'$go_zahlung','$stop_zahlung'
),
'</td></tr></table>')";
}
@ -3696,121 +3614,6 @@ class YUI {
'</td></tr></table>')";
}
function IconsSQL_versandpaket() {
/*
status:
neu ->
Lagergo
lagergo_stop
lagerstop
Schein
summe_go
summe_stop
Auto
liefersperrego
liefersperrestop
marke
portogo
portostop
produktion_usn_gut
storno*/
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_stop.png\" title=\"Kein Lieferschein\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_ohne_pos = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" title=\"Lieferschein ohne Positionen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Lieferschein vollst&auml;ndig\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_teil.png\" title=\"Lieferschein teilweise\" border=\"0\" style=\"margin-right:1px\">";
$versendet = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrego.png\" title=\"Versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrestop.png\" title=\"Nicht versendet\" border=\"0\" style=\"margin-right:1px\">";
$paketmarke = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/portogo.png\" style=\"margin-right:1px\" title=\"Paketmarke\" border=\"0\">";
$paketmarke_keine = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/portostop.png\" style=\"margin-right:1px\" title=\"Keine Paketmarke\" border=\"0\">";
$ausgeliefert = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_ok.png\" style=\"margin-right:1px\" title=\"Ausgeliefert\" border=\"0\">";
$ausgeliefert_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery.png\" style=\"margin-right:1px\" title=\"Nicht ausgeliefert\" border=\"0\">";
$storno = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/storno.png\" style=\"margin-right:1px\" title=\"Storniert\" border=\"0\">";
for ($z = 0;$z < 4;$z++) {
$abgeschlossen .= $ausgeliefert;
$storniert .= $storno;
}
return "CONCAT('<table><tr><td nowrap>',
CASE
WHEN status = 'storniert' THEN '$storniert'
ELSE CONCAT(
CASE
WHEN lieferscheine <> '' AND vmenge = lmenge THEN '$lieferschein_voll'
WHEN lieferschein_ohne_pos <> '' AND vmenge IS NULL THEN '$lieferschein_ohne_pos'
WHEN lieferscheine <> '' THEN '$lieferschein_teil'
ELSE
'$lieferschein_kein'
END,
CASE
WHEN tracking <> '' THEN '$paketmarke'
ELSE
'$paketmarke_keine'
END,
CASE
WHEN status = 'versendet' THEN '$versendet'
WHEN status = 'abgeschlossen' THEN '$versendet'
ELSE
'$versendet_nicht'
END,
CASE
WHEN status = 'abgeschlossen' THEN '$ausgeliefert'
ELSE
'$ausgeliefert_nicht'
END
)
END,
'</td></tr></table>')";
}
function IconsSQL_lieferung() {
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagerstop.png\" title=\"Keine Artikel in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_ohne_pos = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" title=\"Lieferschein ohne Positionen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Artikel vollst&auml;ndig in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_stop.png\" title=\"Artikel teilweise in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$versendet = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrego.png\" title=\"Versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrestop.png\" title=\"Nicht versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperregostop.png\" title=\"Teilweise versendet\" border=\"0\" style=\"margin-right:1px\">";
$ausgeliefert = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_ok.png\" style=\"margin-right:1px\" title=\"Ausgeliefert\" border=\"0\">";
$ausgeliefert_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery.png\" style=\"margin-right:1px\" title=\"Nicht ausgeliefert\" border=\"0\">";
$ausgeliefert_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_pending.png\" style=\"margin-right:1px\" title=\"Teilweise ausgeliefert\" border=\"0\">";
$storno = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/storno.png\" style=\"margin-right:1px\" title=\"Storniert\" border=\"0\">";
return "CONCAT(
'<table><tr><td nowrap>',
CASE
WHEN vmenge >= lmenge THEN '$lieferschein_voll'
WHEN vmenge < lmenge AND vmenge <> 0 THEN '$lieferschein_teil'
ELSE '$lieferschein_kein'
END,
CASE
WHEN alle_abgeschlossen THEN '$versendet'
WHEN alle_versendet THEN '$versendet'
WHEN eins_versendet THEN '$versendet_teil'
ELSE '$versendet_nicht'
END,
CASE
WHEN alle_abgeschlossen THEN '$ausgeliefert'
WHEN eins_abgeschlossen THEN '$ausgeliefert_teil'
ELSE '$ausgeliefert_nicht'
END,
'</td></tr></table>')";
}
function TablePositionSearch($parsetarget, $name, $callback = "show", $gener) {
$id = $this->app->Secure->GetGET("id");
@ -4148,7 +3951,6 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
$allowed['wiki'] = array('dateien');
$allowed['geschaeftsbrief_vorlagen'] = array('dateien');
$allowed['kasse'] = array('dateien');
$allowed['ticket'] = array('dateien');
$id = $this->app->Secure->GetGET("id");
$sid = $this->app->Secure->GetGET("sid");
@ -4157,8 +3959,13 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
}
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $queries);
switch($queries['module'])
{
case "adresse": $objekt="adressen"; break;
default: $objekt=$queries['module'];
}
$objekt = $this->dateien_module_objekt_map($queries['module']);
//if(!ctype_alpha($objekt))$objekt="";
if(!preg_match('/[A-Za-z_]/', $objekt)) {
$objekt='';
@ -5895,8 +5702,12 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
}
}
// Fester filter
$more_data6 = $this->app->Secure->GetGET("more_data6");
$more_data7 = $this->app->Secure->GetGET("more_data7");
$more_data8 = $this->app->Secure->GetGET("more_data8");
$more_data4 = $this->app->Secure->GetGET("more_data4");
/*
$versandjoin = "";
if(isset($parameter['offenversandzentrum']) && !empty($parameter['offenversandzentrum']))
{
@ -5930,8 +5741,8 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
}
if($versandjoin)$sql .= $versandjoin;
*/
if($more_data4 || (isset($parameter['ohnerechnung']) && !empty($parameter['ohnerechnung']))) {
$paramsArray[] = " l.status !='storniert' ";
@ -6006,21 +5817,6 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
if ($more_data3 == 1) $subwhere[] = " l.lieferantenretoure=1 ";
// ENDE EXTRA more
$more_data6 = $this->app->Secure->GetGET("more_data6");
$more_data7 = $this->app->Secure->GetGET("more_data7");
$more_data8 = $this->app->Secure->GetGET("more_data8");
if ($more_data6) {
$subwhere[] = "l.versand_status = 3";
}
if ($more_data7) {
$subwhere[] = "l.versand_status = 1";
}
if ($more_data8) {
$subwhere[] = "l.versand_status IN (2,3)";
}
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
$where = " l.id!='' AND l.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte('p.id', true, 'l.vertriebid');
@ -14137,7 +13933,11 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$sid = (int)$this->app->Secure->GetPOST("sid");
$sort = $this->app->DB->Select("SELECT sort FROM datei_stichwoerter WHERE id = '$sid' LIMIT 1");
$id = (int)$this->app->Secure->GetGET("id");
$objekt = $this->dateien_module_objekt_map($module);
switch($module)
{
case "adresse": $objekt="adressen"; break;
default: $objekt=$module;
}
if(!preg_match('/[A-Za-z_]/', $objekt))$objekt="";
$parameter=$id;
@ -14166,7 +13966,11 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$sid = (int)$this->app->Secure->GetPOST("sid");
$sort = $this->app->DB->Select("SELECT sort FROM datei_stichwoerter WHERE id = '$sid' LIMIT 1");
$id = (int)$this->app->Secure->GetGET("id");
$objekt = $this->dateien_module_objekt_map($module);
switch($module)
{
case "adresse": $objekt="adressen"; break;
default: $objekt=$module;
}
if(!preg_match('/[A-Za-z_]/', $objekt))$objekt="";
$parameter=$id;
@ -14265,7 +14069,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$this->app->Tpl->Add('MESSAGE','<div class="error">Keine Dateien ausgew&auml;hlt!</div>');
}else{
$objekt = $this->app->Secure->GetGET('module');
$objekt = $this->dateien_module_objekt_map($objekt);
if($objekt == 'adresse')$objekt = 'adressen';
$parameter = (int)$this->app->Secure->GetGET('id');
$alledateien = $this->app->DB->SelectArr("SELECT v.datei, v.id FROM
datei d INNER JOIN datei_stichwoerter s ON d.id=s.datei INNER JOIN datei_version v ON v.datei=d.id WHERE s.objekt LIKE '$objekt' AND s.parameter='$parameter' AND d.geloescht=0 ");
@ -14332,7 +14136,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$this->app->Tpl->Add('MESSAGE','<div class="error">Keine Dateien ausgew&auml;hlt!</div>');
}else{
$objekt = $this->app->Secure->GetGET('module');
$objekt = $this->dateien_module_objekt_map($objekt);
if($objekt == 'adresse')$objekt = 'adressen';
$typmodul = $this->app->Secure->GetPOST('typ');
if($objekt == 'dateien' && $typmodul == 'geschaeftsbrief_vorlagen'){
$objekt = $typmodul;
@ -14788,7 +14592,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift" || $module == "proformarechnung") {
if ($schreibschutz != 1) {
$addrow = array('<form action="" method="post" id="myform">', '[ARTIKELSTART]<input type="text" size="30" name="artikel" id="artikel" onblur="window.setTimeout(\'selectafterblur()\',200);">[ARTIKELENDE]', '<input type="text" name="projekt" id="projekt" size="10" readonly onclick="checkhere()" >', '<input type="text" name="nummer" id="nummer" size="7">', '<input type="text" size="8" name="lieferdatum" id="lieferdatum">', '<input type="text" name="menge" id="menge" size="5" onblur="window.setTimeout(\'selectafterblurmenge()\',200); document.getElementById(\'preis\').style.background =\'none\';">', '<input type="text" name="preis" id="preis" size="10" onclick="checkhere();">', '<input type="text" name="waehrung" id="waehrung" size="10" onclick="checkhere();">' ,'<input type="text" name="rabatt" id="rabatt" size="7">','','');
$addrow = array('<form action="" method="post" id="myform">', '[ARTIKELSTART]<input type="text" size="30" name="artikel" id="artikel" onblur="window.setTimeout(\'selectafterblur()\',200);">[ARTIKELENDE]', '<input type="text" name="projekt" id="projekt" size="10" readonly onclick="checkhere()" >', '<input type="text" name="nummer" id="nummer" size="7">', '<input type="text" size="8" name="lieferdatum" id="lieferdatum">', '<input type="text" name="menge" id="menge" size="5" onblur="window.setTimeout(\'selectafterblurmenge()\',200); document.getElementById(\'preis\').style.background =\'none\';">', '<input type="text" name="preis" id="preis" size="10" onclick="checkhere();">', '<input type="text" name="waehrung" id="waehrung" size="10" onclick="checkhere();">' ,'<input type="text" name="rabatt" id="rabatt" size="7">');
$addrow[] = '<input type="submit" value="einf&uuml;gen" name="ajaxbuchen">
<script type="text/javascript">
document.onkeydown = function(evt) {
@ -14927,6 +14731,8 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
$table->headings[4] = 'Abr. bei Kd';
$table->headings[5] = 'sonst. MwSt'; // kann man auch umbenennen in Keine
$table->headings[6] = 'MwSt';
$table->headings[7] = 'Kommentar';
$table->headings[8] = 'Bezahlt';
@ -14949,11 +14755,9 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
}
$table->headings[6] = 'Preis';
$mengencol = 5;
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") {
$table->headings[7] = 'W&auml;hrung';
$table->headings[8] = 'Rabatt';
$rabattcol = 8;
}
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[7] = 'W&auml;hrung';
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[8] = 'Rabatt';
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $rabattcol = 8;
}
$__arr = array($summencol, $mengencol, $rabattcol, $ecol, $dcol,$zwischensumme);
$this->app->erp->RunHook('yui_sortlistadd_draw', 2,$table,$__arr);

View File

@ -388,7 +388,7 @@ class EasyTable {
{
$editcols = array(4,5,6,7);
}else{
$einkaufspreiseerlaubt = true;
$einkaufspreiseerlaubt = false;
if($einkaufspreiseerlaubt)
{
$editcols =array(4,5,6,7,8,9);

View File

@ -41,16 +41,8 @@ class PLACEHOLDER_MODULECLASSNAME {
$defaultorder = 1;
$defaultorderdesc = 0;
$aligncenter = array();
$alignright = array();
$numbercols = array();
$sumcol = array();
$dropnbox = "PLACEHOLDER_DROPNBOX";
// $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
$dropnbox = "PLACEHOLDER_DROPNBOX";
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=PLACEHOLDER_MODULENAME&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=PLACEHOLDER_MODULENAME&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
@ -101,7 +93,7 @@ class PLACEHOLDER_MODULECLASSNAME {
$id = $this->app->Secure->GetGET('id');
// Check if other users are editing this id
if($this->app->erp->DisableModul('PLACEHOLDER_MODULENAME',$id))
if($this->app->erp->DisableModul('artikel',$id))
{
return;
}
@ -126,8 +118,6 @@ class PLACEHOLDER_MODULECLASSNAME {
// Add checks here
// $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
$columns = "id, ";
$values = "$id, ";
$update = "";
@ -163,17 +153,11 @@ class PLACEHOLDER_MODULECLASSNAME {
// Load values again from database
$dropnbox = "PLACEHOLDER_DROPNBOX";
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
if (!empty($result)) {
$PLACEHOLDER_MODULENAME_from_db = $result[0];
} else {
return;
}
/*
* Add displayed items later
@ -182,11 +166,9 @@ class PLACEHOLDER_MODULECLASSNAME {
$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->SetInput($input);
$this->app->Tpl->Parse('PAGE', "PLACEHOLDER_MODULENAME_edit.tpl");
}
@ -201,4 +183,14 @@ class PLACEHOLDER_MODULECLASSNAME {
return $input;
}
}
/*
* Set all fields in the page corresponding to $input
*/
function SetInput($input) {
// $this->app->Tpl->Set('EMAIL', $input['email']);
PLACEHOLDER_SET_INPUT
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
{
"host": "http://repo.dbxe.de/dbxe/dbxe.git",
"host": "https://github.com/openxe-org/openxe.git",
"branch": "master"
}

View File

@ -112,12 +112,6 @@ if (php_sapi_name() == "cli") {
$check_db = true;
} else {
}
if (in_array('-strict', $argv)) {
$strict_db = true;
} else {
$strict_db = false;
}
if (in_array('-do', $argv)) {
if (!$check_git && !$check_db) {
@ -133,17 +127,7 @@ if (php_sapi_name() == "cli") {
}
if ($check_git || $check_db || $do_git || $do_db) {
upgrade_main( directory: $directory,
verbose: $verbose,
check_git: $check_git,
do_git: $do_git,
export_db: $export_db,
check_db: $check_db,
strict_db: $strict_db,
do_db: $do_db,
force: $force,
connection: $connection,
origin: $origin);
upgrade_main($directory,$verbose,$check_git,$do_git,$export_db,$check_db,$do_db,$force,$connection,$origin);
} else {
info();
}
@ -155,7 +139,7 @@ if (php_sapi_name() == "cli") {
}
// -------------------------------- END
function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do_git, bool $export_db, bool $check_db, bool $strict_db, bool $do_db, bool $force, bool $connection, bool $origin) {
function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do_git, bool $export_db, bool $check_db, bool $do_db, bool $force, bool $connection, bool $origin) {
$mainfolder = dirname($directory);
$datafolder = $directory."/data";
@ -163,7 +147,7 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
$remote_file_name = $datafolder."/remote.json";
$schema_file_name = "db_schema.json";
echo_out("--------------- DBXE upgrade ---------------\n");
echo_out("--------------- OpenXE upgrade ---------------\n");
echo_out("--------------- ".date("Y-m-d H:i:s")." ---------------\n");
//require_once($directory.'/../cronjobs/githash.php');
@ -395,7 +379,7 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
echo_out("--------------- Calculating database upgrade for '$schema@$host'... ---------------\n");
$upgrade_sql = array();
$result = mustal_calculate_db_upgrade($compare_def, $db_def, $upgrade_sql, $mustal_replacers, $strict_db);
$result = mustal_calculate_db_upgrade($compare_def, $db_def, $upgrade_sql, $mustal_replacers);
if (!empty($result)) {
abort(count($result)." errors.\n");
@ -485,8 +469,8 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
}
function info() {
echo_out("DBXE upgrade tool\n");
echo_out("Copyright 2024 (c) DBXE project\n");
echo_out("OpenXE upgrade tool\n");
echo_out("Copyright 2022 (c) OpenXE project\n");
echo_out("\n");
echo_out("Upgrade files and database\n");
echo_out("Options:\n");
@ -498,7 +482,6 @@ function info() {
echo_out("\t-f: force override of existing files\n");
echo_out("\t-o: update from origin instead of remote.json\n");
echo_out("\t-connection use connection.json in data folder instead of user.inc.php\n");
echo_out("\t-strict: innodb_strict_mode=ON\n");
echo_out("\t-clean: (not yet implemented) create the needed SQL to remove items from the database not in the JSON\n");
echo_out("\n");
}

View File

@ -21,7 +21,7 @@ function mustal_compare_table_array(array $nominal, string $nominal_name, array
Compare two database structures
Returns a structured array containing information on all the differences.
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, bool $strict) : int
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql) : int
Generate the SQL needed to upgrade the database to match the definition, based on a comparison.
Data structure in Array and JSON
@ -542,7 +542,7 @@ function mustal_implode_with_quote(string $quote, string $delimiter, array $arra
// 11 Table type upgrade not supported
// 12 Upgrade type not supported
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, array $replacers, bool $strict) : array {
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, array $replacers) : array {
$result = array();
$upgrade_sql = array();
@ -752,10 +752,8 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
$upgrade_sql = array_unique($upgrade_sql);
if (count($upgrade_sql) > 0) {
array_unshift($upgrade_sql,"SET SQL_MODE='ALLOW_INVALID_DATES';");
if (!$strict) {
array_unshift($upgrade_sql,"SET SESSION innodb_strict_mode=OFF;");
}
array_unshift($upgrade_sql,"SET SQL_MODE='ALLOW_INVALID_DATES';","SET SESSION innodb_strict_mode=OFF;");
}
return($result);

View File

@ -1,7 +1,7 @@
<?php
$version="OSS";
$version_revision="1.0.2";
$version_revision="1.10";
$githash = file_get_contents("../githash.txt");
if (!empty($githash)) {
$version_revision .= " (".substr($githash,0,8).")";

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1586,20 +1586,14 @@ class Remote
$data[$i]['crosssellingartikel'] = [];
}
$sql =
"SELECT a.id, a.nummer, ak.bezeichnung as kategorie, a.name_de, a.name_en, ca.art, ca.gegenseitigzuweisen, af.nummer AS fremdnummer
$gegenseitigzugewiesen = $this->app->DB->SelectArr("SELECT a.id, a.nummer, ak.bezeichnung as kategorie, a.name_de, a.name_en, ca.art, ca.gegenseitigzuweisen, af.nummer AS fremdnummer
FROM crossselling_artikel ca
JOIN artikel a ON ca.artikel = a.id
LEFT JOIN artikelkategorien ak ON CONCAT(ak.id,'_kat') = a.typ
LEFT JOIN (SELECT af.id,af.nummer,af.artikel,af.shopid FROM artikelnummer_fremdnummern af JOIN (SELECT artikel, MAX(shopid) AS maxid FROM artikelnummer_fremdnummern WHERE aktiv=1 AND (shopid=0 OR shopid=2) GROUP BY artikel) x ON x.artikel = af.artikel AND af.shopid=x.maxid WHERE af.aktiv = 1) af ON af.artikel = a.id
LEFT JOIN (SELECT nummer,artikel FROM artikelnummer_fremdnummern WHERE shopid=0 OR shopid='$id' ORDER BY shopid DESC LIMIT 1 ) af2 ON af2.artikel = a.id
WHERE ca.crosssellingartikel='" . $tmp->GetId() . "' AND ca.gegenseitigzuweisen=1 AND (ca.shop='$id' OR ca.shop='0')
GROUP BY ca.artikel, ca.art";
$gegenseitigzugewiesen = $this->app->DB->SelectArr($sql);
LEFT JOIN (SELECT nummer,artikel FROM artikelnummer_fremdnummern WHERE shopid=0 OR shopid='$id' ORDER BY shopid DESC LIMIT 1 ) af ON af.artikel = a.id
GROUP BY ca.artikel, ca.art");
if (!empty($gegenseitigzugewiesen)) {
foreach ($gegenseitigzugewiesen as $gegenseitigzugewiesenercrosssellingartikel) {
$data[$i]['crosssellingartikel'][] = $gegenseitigzugewiesenercrosssellingartikel;

View File

@ -75,8 +75,7 @@ abstract class Versanddienstleister
$ret['lieferscheinId'] = $lieferscheinId;
$addressfields = ['name', 'adresszusatz', 'abteilung', 'ansprechpartner', 'unterabteilung', 'ort', 'plz',
'strasse', 'land'];
'strasse', 'land'];
$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']);
@ -128,7 +127,7 @@ abstract class Versanddienstleister
if (!empty($docArr['ihrebestellnummer'])) {
$orderNumberParts[] = $docArr['ihrebestellnummer'];
}
$orderNumberParts[] = ucfirst($sid)." ".$docArr['belegnr'];
$orderNumberParts[] = $docArr['belegnr'];
$ret['order_number'] = implode(' / ', $orderNumberParts);
}
@ -370,7 +369,7 @@ abstract class Versanddienstleister
return true;
}
public function Paketmarke(string $target, string $docType, int $docId, $versandpaket = null): void
public function Paketmarke(string $target, string $docType, int $docId): void
{
$address = $this->GetAdressdaten($docId, $docType);
if (isset($_SERVER['CONTENT_TYPE']) && ($_SERVER['CONTENT_TYPE'] === 'application/json')) {
@ -379,65 +378,25 @@ abstract class Versanddienstleister
if ($json->submit == 'print') {
$result = $this->CreateShipment($json, $address);
if ($result->Success) {
if (empty($versandpaket)) {
$sql = "INSERT INTO versandpakete
(
lieferschein_ohne_pos,
gewicht,
tracking,
tracking_link,
status,
versandart,
versender
)
VALUES
(
{$address['lieferscheinId']},
'$json->weight',
'$result->TrackingNumber',
'$result->TrackingUrl',
'neu',
'$this->type',
'".$this->app->User->GetName()."'
)";
$this->app->DB->Insert($sql);
$versandpaket = $this->app->DB->GetInsertID();
}
else {
$sql = "UPDATE versandpakete SET
gewicht = '".$json->weight."',
tracking = '".$result->TrackingNumber."',
tracking_link = '".$result->TrackingUrl."'
WHERE id = '".$versandpaket."'
";
$this->app->DB->Update($sql);
}
$sql = "INSERT INTO versand
(adresse, lieferschein, versandunternehmen, gewicht, tracking, tracking_link, anzahlpakete)
VALUES
({$address['addressId']}, {$address['lieferscheinId']}, '$this->type',
'$json->weight', '$result->TrackingNumber', '$result->TrackingUrl', 1)";
$this->app->DB->Insert($sql);
$filename = join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
$filefullpath = $this->app->erp->GetTMP() . $filename;
file_put_contents($filefullpath, $result->Label);
$this->app->erp->CreateDateiWithStichwort(
$filename,
'Paketmarke '.$this->type.' '.$result->TrackingNumber,
'Paketmarke Versandpaket Nr. '.$versandpaket,
'',
$filefullpath,
$this->app->User->GetName(),
'paketmarke',
'versandpaket',
$versandpaket
);
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
file_put_contents($filename, $result->Label);
$this->app->printer->Drucken($this->labelPrinterId, $filename);
$this->app->printer->Drucken($this->labelPrinterId, $filefullpath);
if (isset($result->ExportDocuments)) {
$filefullpath = $this->app->erp->GetTMP() . join('_', [$this->type, 'ExportDoc', $result->TrackingNumber]) . '.pdf';
file_put_contents($filefullpath, $result->ExportDocuments);
$this->app->printer->Drucken($this->documentPrinterId, $filefullpath);
}
$ret['messages'][] = ['class' => 'info', 'text' => "Paketmarke wurde erfolgreich erstellt: $result->TrackingNumber"];
if (isset($result->ExportDocuments)) {
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'ExportDoc', $result->TrackingNumber]) . '.pdf';
file_put_contents($filename, $result->ExportDocuments);
$this->app->printer->Drucken($this->documentPrinterId, $filename);
}
$ret['messages'][] = ['class' => 'info', 'text' => "Paketmarke wurde erfolgreich erstellt: $result->TrackingNumber"];
} else {
$ret['messages'] = array_map(fn(string $item) => ['class' => 'error', 'text' => $item], array_unique($result->Errors));
$ret['messages'] = array_map(fn(string $item) => ['class' => 'error', 'text' => $item], array_unique($result->Errors));
}
}
header('Content-Type: application/json');
@ -451,12 +410,7 @@ abstract class Versanddienstleister
$address['product'] = $products[0]->Id ?? '';
$countries = $this->app->DB->SelectArr("SELECT iso, bezeichnung_de name, eu FROM laender ORDER BY bezeichnung_de");
if(!empty($countries)) {
$countries = array_combine(array_column($countries, 'iso'), $countries);
} else {
$countries = Array();
$this->app->Tpl->addMessage('error', 'L&auml;nderliste ist leer. Siehe Einstellungen -> L&auml;nderliste.', false, 'PAGE');
}
$countries = array_combine(array_column($countries, 'iso'), $countries);
$json['form'] = $address;
$json['countries'] = $countries;

View File

@ -41,15 +41,8 @@ class AngebotPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');
@ -498,29 +491,30 @@ class AngebotPDF extends BriefpapierCustom {
"rabatt"=>$value['rabatt'],
"steuertext"=>$value['steuertext']));
if($positionenkaufmaenischrunden == 3){
if (!$value['nicht_einrechnen']) {
$netto_gesamt = $value['menge'] * round($value['preis'] - ($value['preis'] / 100 * $value['rabatt']),2);
}
}else if (!$value['nicht_einrechnen']) {
$netto_gesamt = $value['menge'] * round($value['preis'] - ($value['preis'] / 100 * $value['rabatt']),2);
}else{
$netto_gesamt = $value['menge'] * ($value['preis'] - ($value['preis'] / 100 * $value['rabatt']));
}
if($positionenkaufmaenischrunden)
{
$netto_gesamt = round($netto_gesamt, 2);
}
if(!isset($summen[$value['steuersatz']])) {
$summen[$value['steuersatz']] = 0;
}
if($value['optional']!="1"){
if($value['optional']!="1"){
if($value['explodiert_parent'] == 0 || !$berechnen_aus_teile)
{
$summe = $summe + $netto_gesamt;
if(!isset($summen[$value['steuersatz']]))$summen[$value['steuersatz']] = 0;
$summen[$value['steuersatz']] += ($netto_gesamt/100)*$value['steuersatz'];
$summe = $summe + $netto_gesamt;
$gesamtsteuern +=($netto_gesamt/100)*$value['steuersatz'];
}
} else {
$summe_netto_optional += $netto_gesamt;
$steuern_optional +=($netto_gesamt/100)*$value['steuersatz'];
}
/*
if($value['umsatzsteuer']=="" || $value['umsatzsteuer']=="normal")
{
$summeV = $summeV + (($netto_gesamt/100)*$this->app->erp->GetSteuersatzNormal(false,$id,"angebot"));
}
else {
$summeR = $summeR + (($netto_gesamt/100)*$this->app->erp->GetSteuersatzErmaessigt(false,$id,"angebot"));
}*/
}
}
@ -542,7 +536,7 @@ class AngebotPDF extends BriefpapierCustom {
if($this->app->erp->AngebotMitUmsatzeuer($id))
{
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $gesamtsteuern,"summen"=>$summen,"totalTaxV"=>0,"totalTaxR"=>0,"optional"=>$summe_netto_optional+$steuern_optional,"optional_netto"=>$summe_netto_optional));
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $gesamtsteuern,"summen"=>$summen,"totalTaxV"=>0,"totalTaxR"=>0));
//$this->setTotals(array("totalArticles"=>$summe,"totalTaxV"=>$summeV,"totalTaxR"=>$summeR,"total"=>$summe+$summeV+$summeR));
} else {
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe));

View File

@ -43,13 +43,8 @@ class AuftragPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -1,406 +1,406 @@
<?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
if(!class_exists('BriefpapierCustom'))
{
class BriefpapierCustom extends Briefpapier
{
}
}
class BestellungPDF extends BriefpapierCustom {
public $doctype;
function __construct($app,$projekt="")
{
$this->app=$app;
//parent::Briefpapier();
$this->doctype="bestellung";
$this->doctypeOrig="Bestellung";
$this->bestellungohnepreis=0;
parent::__construct($this->app,$projekt);
}
function GetBestellung($id)
{
$this->doctypeid = $id;
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');
$this->setRecipientLieferadresse($id,"bestellung");
$data = $this->app->DB->SelectRow(
"SELECT adresse,projekt, sprache, angebot, ustid, keineartikelnummern, bestellbestaetigung, artikelnummerninfotext,
einkaeufer, belegnr, freitext, bodyzusatz, ohne_briefpapier, abweichendebezeichnung, bestellungohnepreis,
kundennummerlieferant AS kundennummer, DATE_FORMAT(datum,'%d.%m.%Y') AS datum, DATE_FORMAT(datum,'%Y%m%d') as datum2,
lieferantennummer
FROM bestellung
WHERE id='$id'
LIMIT 1"
);
extract($data,EXTR_OVERWRITE);
$adresse = $data['adresse'];
$sprache = $data['sprache'];
$angebot = $data['angebot'];
$ustid = $data['ustid'];
$projekt = $data['projekt'];
$keineartikelnummern = $data['keineartikelnummern'];
$bestellbestaetigung = $data['bestellbestaetigung'];
$artikelnummerninfotext = $data['artikelnummerninfotext'];
$einkaeufer = $data['einkaeufer'];
$belegnr = $data['belegnr'];
$freitext = $data['freitext'];
$bodyzusatz = $data['bodyzusatz'];
$ohne_briefpapier = $data['ohne_briefpapier'];
$abweichendebezeichnung = $data['abweichendebezeichnung'];
$bestellungohnepreis = $data['bestellungohnepreis'];
$kundennummer = $data['kundennummer'];
$datum = $data['datum'];
$datum2 = $data['datum2'];
$lieferantennummer = $data['lieferantennummer'];
$this->bestellungohnepreis=$data['bestellungohnepreis'];
if(empty($kundennummer)) {
$kundennummer = $this->app->DB->Select("SELECT kundennummerlieferant FROM adresse WHERE id='$adresse' LIMIT 1");
}
if($einkaeufer=='') {
$einkaeufer = $this->app->DB->Select("SELECT bearbeiter FROM bestellung WHERE id='$id' LIMIT 1");
}
if(empty($sprache)) {
$sprache = $this->app->DB->Select("SELECT sprache FROM adresse WHERE id='$adresse' LIMIT 1");
}
$kundennummer = $this->app->erp->ReadyForPDF($kundennummer);
$einkaeufer = $this->app->erp->ReadyForPDF($einkaeufer);
$angebot = $this->app->erp->ReadyForPDF($angebot);
$this->app->erp->BeschriftungSprache($sprache);
$this->sprache = $sprache;
$projektabkuerzung = $this->app->DB->Select(sprintf('SELECT abkuerzung FROM projekt WHERE id = %d', $projekt));
if($this->bestellungohnepreis) {
$this->nichtsichtbar_summe = 1;
}
if($ohne_briefpapier=='1') {
$this->logofile = '';
$this->briefpapier='';
$this->briefpapier2='';
}
if($belegnr=='' || $belegnr=='0') {
$belegnr = '- '.$this->app->erp->Beschriftung('dokument_entwurf');
}
$this->doctypeOrig=$this->app->erp->Beschriftung('dokument_bestellung')." $belegnr";
if($abweichendebezeichnung)
{
$this->doctypeOrig=($this->app->erp->Beschriftung('bezeichnungbestellungersatz')?$this->app->erp->Beschriftung('bezeichnungbestellungersatz'):$this->app->erp->Beschriftung('dokument_bestellung'))." $belegnr";
}
else {
$this->doctypeOrig=$this->app->erp->Beschriftung('dokument_bestellung')." $belegnr";
}
if($angebot=='') {
$angebot = '-';
}
if($kundennummer=='') {
$kundennummer= '-';
}
if(!$this->app->erp->BestellungMitUmsatzeuer($id)) {
$this->ust_befreit=true;
}
/** @var \Xentral\Modules\Company\Service\DocumentCustomizationService $service */
$service = $this->app->Container->get('DocumentCustomizationService');
if($block = $service->findActiveBlock('corr', 'suppliers_order', $projekt)) {
$sCD = $service->parseBlockAsArray($this->getLanguageCodeFrom($this->sprache),'corr', 'suppliers_order',[
'BESTELLNUMMER' => $belegnr,
'DATUM' => $datum,
'KUNDENNUMMER' => $kundennummer,
'EINKAEUFER' => $einkaeufer,
'LIEFERANTENNUMMER' => $lieferantennummer,
'PROJEKT' => $projektabkuerzung,
'EMAIL' => '',
'TELEFON' => '',
'BEARBEITER' => '',
'VERTRIEB' => '',
], $projekt);
if(!empty($sCD)) {
switch($block['fontstyle']) {
case 'f':
$this->setBoldCorrDetails($sCD);
break;
case 'i':
$this->setItalicCorrDetails($sCD);
break;
case 'fi':
$this->setItalicBoldCorrDetails($sCD);
break;
default:
$this->setCorrDetails($sCD, true);
break;
}
}
}
else{
if($briefpapier_bearbeiter_ausblenden){
$this->setCorrDetails(array($this->app->erp->Beschriftung("dokument_bestellung_angebotnummer") => $angebot,
$this->app->erp->Beschriftung("dokument_bestellung_unserekundennummer") => $kundennummer,
$this->app->erp->Beschriftung("dokument_bestelldatum") => $datum));
}else{
$this->setCorrDetails(array($this->app->erp->Beschriftung("dokument_bestellung_angebotnummer") => $angebot,
$this->app->erp->Beschriftung("dokument_bestellung_unserekundennummer") => $kundennummer,
$this->app->erp->Beschriftung("dokument_bestelldatum") => $datum,
$this->app->erp->Beschriftung("dokument_bestellung_einkauf") => $einkaeufer));
}
}
if(!$this->app->erp->BestellungMitUmsatzeuer($id) && $ustid!='' ) {
//$steuer = "\nSteuerfreie innergemeinschaftliche Lieferung. Ihre USt-IdNr. $ustid Land: $land";
$this->ust_befreit=true;
if($keinsteuersatz!='1') {
$steuer = $this->app->erp->Beschriftung('eu_lieferung_vermerk');
}
$steuer = str_replace('{USTID}',$ustid,$steuer);
$steuer = str_replace('{LAND}',$land,$steuer);
}
$body=$this->app->erp->Beschriftung('bestellung_header');
if($bodyzusatz!='') {
$body=$body."\r\n".$bodyzusatz;
}
$body = $this->app->erp->ParseUserVars('bestellung',$id,$body);
if($this->app->erp->Firmendaten('footer_reihenfolge_bestellung_aktivieren')=='1')
{
$footervorlage = $this->app->erp->Firmendaten('footer_reihenfolge_bestellung');
if($footervorlage==''){
$footervorlage = "{FOOTERFREITEXT}\r\n{FOOTERTEXTVORLAGEBESTELLUNG}";
}
$footervorlage = str_replace('{FOOTERFREITEXT}',$freitext,$footervorlage);
$footervorlage = str_replace('{FOOTERTEXTVORLAGEBESTELLUNG}',$this->app->erp->Beschriftung("bestellung_footer"),$footervorlage);
$footervorlage = $this->app->erp->ParseUserVars("bestellung",$id,$footervorlage);
$footer = $footervorlage;
} else {
$footer = $freitext."\r\n".$this->app->erp->ParseUserVars('bestellung',$id,$this->app->erp->Beschriftung("bestellung_footer"));
}
if($bestellbestaetigung) {
$this->setTextDetails(array(
"body"=>$body,
"footer"=>$footer."\r\n".$this->app->erp->Beschriftung('dokument_bestellung_bestaetigung')));
} else
{
$this->setTextDetails(array(
"body"=>$body,
"footer"=>$footer));
}
$artikel = $this->app->DB->SelectArr(
"SELECT bp.*, art.ean AS artean, art.nummer AS artnummer, art.herstellernummer AS artherstellernummer,
art.einheit as arteinheit, art.hersteller AS arthersteller
FROM bestellung_position AS bp
LEFT JOIN artikel AS art ON bp.artikel = art.id
WHERE bp.bestellung='$id'
ORDER By bp.sort"
);
if(empty($artikel)) {
$artikel = [];
}
$steuersatzV = $this->app->erp->GetSteuersatzNormal(false,$id,'bestellung');
$steuersatzR = $this->app->erp->GetSteuersatzErmaessigt(false,$id,'bestellung');
$gesamtsteuern = 0;
$mitumsatzsteuer = $this->app->erp->BestellungMitUmsatzeuer($id);
//$waehrung = $this->app->DB->Select("SELECT waehrung FROM bestellung_position WHERE bestellung='$id' LIMIT 1");
$summe = 0;
foreach($artikel as $key=>$value) {
$lieferdatum = $this->app->String->Convert($value['lieferdatum'],'%1-%2-%3','%3.%2.%1');
if($lieferdatum==='00.00.0000') {
$lieferdatum ='';
}//$this->app->erp->Beschriftung("dokument_lieferdatum_sofort");
if($value['umsatzsteuer'] !== 'ermaessigt' && $value['umsatzsteuer'] !== 'befreit') {
$value['umsatzsteuer'] = 'normal';
}
$tmpsteuersatz = null;
$tmpsteuertext = null;
$this->app->erp->GetSteuerPosition('bestellung', $value['id'],$tmpsteuersatz, $tmpsteuertext);
if($value['steuersatz'] === null || $value['steuersatz'] < 0) {
if($value['umsatzsteuer'] === 'ermaessigt') {
$value['steuersatz'] = $steuersatzR;
}
elseif($value['umsatzsteuer'] === 'befreit') {
$value['steuersatz'] = 0;
}else{
$value['steuersatz'] = $steuersatzV;
}
if($tmpsteuersatz !== null) {
$value['steuersatz'] = $tmpsteuersatz;
}
}
if($tmpsteuertext && !$value['steuertext']) {
$value['steuertext'] = $tmpsteuertext;
}
if(!$mitumsatzsteuer) {
$value['steuersatz'] = 0;
}
// if(!$this->app->erp->BestellungMitUmsatzeuer($id)) $value[umsatzsteuer] = "";
if($keineartikelnummern==1) {
$value['bestellnummer'] = $this->app->erp->Beschriftung('dokument_bestellung_keineartikelnummer');
}
$ohne_artikeltext = $this->app->DB->Select("SELECT ohne_artikeltext FROM ".$this->table." WHERE id='".$this->id."' LIMIT 1");
if($ohne_artikeltext=='1') {
$value['beschreibung']='';
}
$value['artikelnummer']= $value['artnummer'];// $this->app->DB->Select("SELECT nummer FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
if($artikelnummerninfotext) {
if($value['bestellnummer']!=''){
$value['beschreibung'] = $value['beschreibung'] . "\n" . $this->app->erp->Beschriftung('dokument_bestellung_bestellnummer') . ': ' . $value['bestellnummer'];
}
$value['bestellnummer']=$value['artikelnummer'];
} else {
if($value['artikelnummer']!=''){
$value['beschreibung'] = $value['beschreibung'] . "\n" . $this->app->erp->Beschriftung('dokument_bestellung_unsereartikelnummer') . ': ' . $value['artikelnummer'];
}
}
if($value['vpe'] > 1 && is_numeric($value['vpe'])) {
$value['beschreibung'] = $value['beschreibung']."\n".$this->app->erp->Beschriftung('dokument_bestellung_mengeinvpe').': '.$value['vpe'];
//umschalbar in der Zukunft
$value['preis'] = $value['preis']*$value['menge']/($value['menge'] / $value['vpe']);
$value['menge'] = round($value['menge'] / $value['vpe'],2);
$value['einheit'] = "VPE";
}
elseif((String)$value['einheit'] === '') {
$value['einheit'] = $value['arteinheit'];// $this->app->DB->Select("SELECT einheit FROM artikel WHERE id = '".$value['artikel']."' LIMIT 1");
if((String)$value['einheit'] === '') {
$value['einheit'] = $this->app->erp->Firmendaten('artikeleinheit_standard');
}
}
if($value['beschreibung']!='') {
$newline="\n";
}
if($this->bestellungohnepreis) {
$value['preis'] = null;
}
if($value['waehrung']!='' && $value['waehrung']!=$this->waehrung){
$this->waehrung = $value['waehrung'];
}
$value['menge'] = (float)$value['menge'];
$value['herstellernummer'] = $value['artherstellernummer'];// $this->app->DB->Select("SELECT herstellernummer FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
$value['hersteller'] = $value['arthersteller'];//$this->app->DB->Select("SELECT hersteller FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
$this->addItem(
array(
'belegposition'=>$value['id'],
'artikel'=>$value['artikel'],
'currency'=>$value['waehrung'],
'amount'=>$value['menge'],
'price'=>$value['preis'],
'tax'=>$value['umsatzsteuer'],'steuersatz'=>$value['steuersatz'],
'steuertext'=>$value['steuertext'],
'vpe'=>$value['vpe'],
'unit'=>$value['einheit'],
'itemno'=>$value['bestellnummer'],
'desc'=>$value['beschreibung'].($lieferdatum!=''?$newline.$this->app->erp->Beschriftung('dokument_lieferdatum').': '.$lieferdatum:''),
'hersteller'=>$value['hersteller'],
'herstellernummer'=>$value['herstellernummer'],
'freifeld1'=>$value['freifeld1'],
'freifeld2'=>$value['freifeld2'],
'freifeld3'=>$value['freifeld3'],
'freifeld4'=>$value['freifeld4'],
'freifeld5'=>$value['freifeld5'],
'freifeld6'=>$value['freifeld6'],
'freifeld7'=>$value['freifeld7'],
'freifeld8'=>$value['freifeld8'],
'freifeld9'=>$value['freifeld9'],
'freifeld10'=>$value['freifeld10'],
'freifeld11'=>$value['freifeld11'],
'freifeld12'=>$value['freifeld12'],
'freifeld13'=>$value['freifeld13'],
'freifeld14'=>$value['freifeld14'],
'freifeld15'=>$value['freifeld15'],
'freifeld16'=>$value['freifeld16'],
'freifeld17'=>$value['freifeld17'],
'freifeld18'=>$value['freifeld18'],
'freifeld19'=>$value['freifeld19'],
'freifeld20'=>$value['freifeld20'],
'freifeld21'=>$value['freifeld21'],
'freifeld22'=>$value['freifeld22'],
'freifeld23'=>$value['freifeld23'],
'freifeld24'=>$value['freifeld24'],
'freifeld25'=>$value['freifeld25'],
'freifeld26'=>$value['freifeld26'],
'freifeld27'=>$value['freifeld27'],
'freifeld28'=>$value['freifeld28'],
'freifeld29'=>$value['freifeld29'],
'freifeld30'=>$value['freifeld30'],
'freifeld31'=>$value['freifeld31'],
'freifeld32'=>$value['freifeld32'],
'freifeld33'=>$value['freifeld33'],
'freifeld34'=>$value['freifeld34'],
'freifeld35'=>$value['freifeld35'],
'freifeld36'=>$value['freifeld36'],
'freifeld37'=>$value['freifeld37'],
'freifeld38'=>$value['freifeld38'],
'freifeld39'=>$value['freifeld39'],
'freifeld40'=>$value['freifeld40'],
"name"=>$value['bezeichnunglieferant']
)
);
$netto_gesamt = $value['menge']*$value['preis'];
$summe += $netto_gesamt;
if(!isset($summen[$value['steuersatz']])) {
$summen[$value['steuersatz']] = 0;
}
$summen[$value['steuersatz']] += ($netto_gesamt/100)*$value['steuersatz'];
$gesamtsteuern +=($netto_gesamt/100)*$value['steuersatz'];
}
/*
$summe = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id'");
$summeV = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id' AND (umsatzsteuer='normal' || umsatzsteuer='') ")/100 * $this->app->erp->GetSteuersatzNormal(false,$id,"bestellung");
$summeR = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id' AND umsatzsteuer='ermaessigt'")/100 * $this->app->erp->GetSteuersatzErmaessigt(false,$id,"bestellung");
*/
if($this->bestellungohnepreis!=1)
{
if($this->app->erp->BestellungMitUmsatzeuer($id))
{
$this->setTotals(
array('totalArticles'=>$summe,'total'=>$summe + $gesamtsteuern,'summen'=>$summen,'totalTaxV'=>0,'totalTaxR'=>0)
);
//$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $summeV + $summeR,"totalTaxV"=>$summeV,"totalTaxR"=>$summeR));
} else{
$this->setTotals(array('totalArticles' => $summe, 'total' => $summe));
}
}
/* Dateiname */
//$tmp_name = str_replace([' ','.'],'', trim($this->recipient['enterprise']));
$this->filename = $datum2.'_BE'.$belegnr.'.pdf';
$this->setBarcode($belegnr);
}
}
<?php
if(!class_exists('BriefpapierCustom'))
{
class BriefpapierCustom extends Briefpapier
{
}
}
class BestellungPDF extends BriefpapierCustom {
public $doctype;
function __construct($app,$projekt="")
{
$this->app=$app;
//parent::Briefpapier();
$this->doctype="bestellung";
$this->doctypeOrig="Bestellung";
$this->bestellungohnepreis=0;
parent::__construct($this->app,$projekt);
}
function GetBestellung($id)
{
$this->doctypeid = $id;
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');
$this->setRecipientLieferadresse($id,"bestellung");
$data = $this->app->DB->SelectRow(
"SELECT adresse,projekt, sprache, angebot, ustid, keineartikelnummern, bestellbestaetigung, artikelnummerninfotext,
einkaeufer, belegnr, freitext, bodyzusatz, ohne_briefpapier, abweichendebezeichnung, bestellungohnepreis,
kundennummerlieferant AS kundennummer, DATE_FORMAT(datum,'%d.%m.%Y') AS datum, DATE_FORMAT(datum,'%Y%m%d') as datum2,
lieferantennummer
FROM bestellung
WHERE id='$id'
LIMIT 1"
);
extract($data,EXTR_OVERWRITE);
$adresse = $data['adresse'];
$sprache = $data['sprache'];
$angebot = $data['angebot'];
$ustid = $data['ustid'];
$projekt = $data['projekt'];
$keineartikelnummern = $data['keineartikelnummern'];
$bestellbestaetigung = $data['bestellbestaetigung'];
$artikelnummerninfotext = $data['artikelnummerninfotext'];
$einkaeufer = $data['einkaeufer'];
$belegnr = $data['belegnr'];
$freitext = $data['freitext'];
$bodyzusatz = $data['bodyzusatz'];
$ohne_briefpapier = $data['ohne_briefpapier'];
$abweichendebezeichnung = $data['abweichendebezeichnung'];
$bestellungohnepreis = $data['bestellungohnepreis'];
$kundennummer = $data['kundennummer'];
$datum = $data['datum'];
$datum2 = $data['datum2'];
$lieferantennummer = $data['lieferantennummer'];
$this->bestellungohnepreis=$data['bestellungohnepreis'];
if(empty($kundennummer)) {
$kundennummer = $this->app->DB->Select("SELECT kundennummerlieferant FROM adresse WHERE id='$adresse' LIMIT 1");
}
if($einkaeufer=='') {
$einkaeufer = $this->app->DB->Select("SELECT bearbeiter FROM bestellung WHERE id='$id' LIMIT 1");
}
if(empty($sprache)) {
$sprache = $this->app->DB->Select("SELECT sprache FROM adresse WHERE id='$adresse' LIMIT 1");
}
$kundennummer = $this->app->erp->ReadyForPDF($kundennummer);
$einkaeufer = $this->app->erp->ReadyForPDF($einkaeufer);
$angebot = $this->app->erp->ReadyForPDF($angebot);
$this->app->erp->BeschriftungSprache($sprache);
$this->sprache = $sprache;
$projektabkuerzung = $this->app->DB->Select(sprintf('SELECT abkuerzung FROM projekt WHERE id = %d', $projekt));
if($this->bestellungohnepreis) {
$this->nichtsichtbar_summe = 1;
}
if($ohne_briefpapier=='1') {
$this->logofile = '';
$this->briefpapier='';
$this->briefpapier2='';
}
if($belegnr=='' || $belegnr=='0') {
$belegnr = '- '.$this->app->erp->Beschriftung('dokument_entwurf');
}
$this->doctypeOrig=$this->app->erp->Beschriftung('dokument_bestellung')." $belegnr";
if($abweichendebezeichnung)
{
$this->doctypeOrig=($this->app->erp->Beschriftung('bezeichnungbestellungersatz')?$this->app->erp->Beschriftung('bezeichnungbestellungersatz'):$this->app->erp->Beschriftung('dokument_bestellung'))." $belegnr";
}
else {
$this->doctypeOrig=$this->app->erp->Beschriftung('dokument_bestellung')." $belegnr";
}
if($angebot=='') {
$angebot = '-';
}
if($kundennummer=='') {
$kundennummer= '-';
}
if(!$this->app->erp->BestellungMitUmsatzeuer($id)) {
$this->ust_befreit=true;
}
/** @var \Xentral\Modules\Company\Service\DocumentCustomizationService $service */
$service = $this->app->Container->get('DocumentCustomizationService');
if($block = $service->findActiveBlock('corr', 'suppliers_order', $projekt)) {
$sCD = $service->parseBlockAsArray($this->getLanguageCodeFrom($this->sprache),'corr', 'suppliers_order',[
'BESTELLNUMMER' => $belegnr,
'DATUM' => $datum,
'KUNDENNUMMER' => $kundennummer,
'EINKAEUFER' => $einkaeufer,
'LIEFERANTENNUMMER' => $lieferantennummer,
'PROJEKT' => $projektabkuerzung,
'EMAIL' => '',
'TELEFON' => '',
'BEARBEITER' => '',
'VERTRIEB' => '',
], $projekt);
if(!empty($sCD)) {
switch($block['fontstyle']) {
case 'f':
$this->setBoldCorrDetails($sCD);
break;
case 'i':
$this->setItalicCorrDetails($sCD);
break;
case 'fi':
$this->setItalicBoldCorrDetails($sCD);
break;
default:
$this->setCorrDetails($sCD, true);
break;
}
}
}
else{
if($briefpapier_bearbeiter_ausblenden){
$this->setCorrDetails(array($this->app->erp->Beschriftung("dokument_bestellung_angebotnummer") => $angebot,
$this->app->erp->Beschriftung("dokument_bestellung_unserekundennummer") => $kundennummer,
$this->app->erp->Beschriftung("dokument_bestelldatum") => $datum));
}else{
$this->setCorrDetails(array($this->app->erp->Beschriftung("dokument_bestellung_angebotnummer") => $angebot,
$this->app->erp->Beschriftung("dokument_bestellung_unserekundennummer") => $kundennummer,
$this->app->erp->Beschriftung("dokument_bestelldatum") => $datum,
$this->app->erp->Beschriftung("dokument_bestellung_einkauf") => $einkaeufer));
}
}
if(!$this->app->erp->BestellungMitUmsatzeuer($id) && $ustid!='' ) {
//$steuer = "\nSteuerfreie innergemeinschaftliche Lieferung. Ihre USt-IdNr. $ustid Land: $land";
$this->ust_befreit=true;
if($keinsteuersatz!='1') {
$steuer = $this->app->erp->Beschriftung('eu_lieferung_vermerk');
}
$steuer = str_replace('{USTID}',$ustid,$steuer);
$steuer = str_replace('{LAND}',$land,$steuer);
}
$body=$this->app->erp->Beschriftung('bestellung_header');
if($bodyzusatz!='') {
$body=$body."\r\n".$bodyzusatz;
}
$body = $this->app->erp->ParseUserVars('bestellung',$id,$body);
if($this->app->erp->Firmendaten('footer_reihenfolge_bestellung_aktivieren')=='1')
{
$footervorlage = $this->app->erp->Firmendaten('footer_reihenfolge_bestellung');
if($footervorlage==''){
$footervorlage = "{FOOTERFREITEXT}\r\n{FOOTERTEXTVORLAGEBESTELLUNG}";
}
$footervorlage = str_replace('{FOOTERFREITEXT}',$freitext,$footervorlage);
$footervorlage = str_replace('{FOOTERTEXTVORLAGEBESTELLUNG}',$this->app->erp->Beschriftung("bestellung_footer"),$footervorlage);
$footervorlage = $this->app->erp->ParseUserVars("bestellung",$id,$footervorlage);
$footer = $footervorlage;
} else {
$footer = $freitext."\r\n".$this->app->erp->ParseUserVars('bestellung',$id,$this->app->erp->Beschriftung("bestellung_footer"));
}
if($bestellbestaetigung) {
$this->setTextDetails(array(
"body"=>$body,
"footer"=>$footer."\r\n".$this->app->erp->Beschriftung('dokument_bestellung_bestaetigung')));
} else
{
$this->setTextDetails(array(
"body"=>$body,
"footer"=>$footer));
}
$artikel = $this->app->DB->SelectArr(
"SELECT bp.*, art.ean AS artean, art.nummer AS artnummer, art.herstellernummer AS artherstellernummer,
art.einheit as arteinheit, art.hersteller AS arthersteller
FROM bestellung_position AS bp
LEFT JOIN artikel AS art ON bp.artikel = art.id
WHERE bp.bestellung='$id'
ORDER By bp.sort"
);
if(empty($artikel)) {
$artikel = [];
}
$steuersatzV = $this->app->erp->GetSteuersatzNormal(false,$id,'bestellung');
$steuersatzR = $this->app->erp->GetSteuersatzErmaessigt(false,$id,'bestellung');
$gesamtsteuern = 0;
$mitumsatzsteuer = $this->app->erp->BestellungMitUmsatzeuer($id);
//$waehrung = $this->app->DB->Select("SELECT waehrung FROM bestellung_position WHERE bestellung='$id' LIMIT 1");
$summe = 0;
foreach($artikel as $key=>$value) {
$lieferdatum = $this->app->String->Convert($value['lieferdatum'],'%1-%2-%3','%3.%2.%1');
if($lieferdatum==='00.00.0000') {
$lieferdatum ='';
}//$this->app->erp->Beschriftung("dokument_lieferdatum_sofort");
if($value['umsatzsteuer'] !== 'ermaessigt' && $value['umsatzsteuer'] !== 'befreit') {
$value['umsatzsteuer'] = 'normal';
}
$tmpsteuersatz = null;
$tmpsteuertext = null;
$this->app->erp->GetSteuerPosition('bestellung', $value['id'],$tmpsteuersatz, $tmpsteuertext);
if($value['steuersatz'] === null || $value['steuersatz'] < 0) {
if($value['umsatzsteuer'] === 'ermaessigt') {
$value['steuersatz'] = $steuersatzR;
}
elseif($value['umsatzsteuer'] === 'befreit') {
$value['steuersatz'] = 0;
}else{
$value['steuersatz'] = $steuersatzV;
}
if($tmpsteuersatz !== null) {
$value['steuersatz'] = $tmpsteuersatz;
}
}
if($tmpsteuertext && !$value['steuertext']) {
$value['steuertext'] = $tmpsteuertext;
}
if(!$mitumsatzsteuer) {
$value['steuersatz'] = 0;
}
// if(!$this->app->erp->BestellungMitUmsatzeuer($id)) $value[umsatzsteuer] = "";
if($keineartikelnummern==1) {
$value['bestellnummer'] = $this->app->erp->Beschriftung('dokument_bestellung_keineartikelnummer');
}
$ohne_artikeltext = $this->app->DB->Select("SELECT ohne_artikeltext FROM ".$this->table." WHERE id='".$this->id."' LIMIT 1");
if($ohne_artikeltext=='1') {
$value['beschreibung']='';
}
$value['artikelnummer']= $value['artnummer'];// $this->app->DB->Select("SELECT nummer FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
if($artikelnummerninfotext) {
if($value['bestellnummer']!=''){
$value['beschreibung'] = $value['beschreibung'] . "\n" . $this->app->erp->Beschriftung('dokument_bestellung_bestellnummer') . ': ' . $value['bestellnummer'];
}
$value['bestellnummer']=$value['artikelnummer'];
} else {
if($value['artikelnummer']!=''){
$value['beschreibung'] = $value['beschreibung'] . "\n" . $this->app->erp->Beschriftung('dokument_bestellung_unsereartikelnummer') . ': ' . $value['artikelnummer'];
}
}
if($value['vpe'] > 1 && is_numeric($value['vpe'])) {
$value['beschreibung'] = $value['beschreibung']."\n".$this->app->erp->Beschriftung('dokument_bestellung_mengeinvpe').': '.$value['vpe'];
//umschalbar in der Zukunft
$value['preis'] = $value['preis']*$value['menge']/($value['menge'] / $value['vpe']);
$value['menge'] = round($value['menge'] / $value['vpe'],2);
$value['einheit'] = "VPE";
}
elseif((String)$value['einheit'] === '') {
$value['einheit'] = $value['arteinheit'];// $this->app->DB->Select("SELECT einheit FROM artikel WHERE id = '".$value['artikel']."' LIMIT 1");
if((String)$value['einheit'] === '') {
$value['einheit'] = $this->app->erp->Firmendaten('artikeleinheit_standard');
}
}
if($value['beschreibung']!='') {
$newline="\n";
}
if($this->bestellungohnepreis) {
$value['preis'] = '-';
}
if($value['waehrung']!='' && $value['waehrung']!=$this->waehrung){
$this->waehrung = $value['waehrung'];
}
$value['menge'] = (float)$value['menge'];
$value['herstellernummer'] = $value['artherstellernummer'];// $this->app->DB->Select("SELECT herstellernummer FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
$value['hersteller'] = $value['arthersteller'];//$this->app->DB->Select("SELECT hersteller FROM artikel WHERE id='".$value['artikel']."' LIMIT 1");
$this->addItem(
array(
'belegposition'=>$value['id'],
'artikel'=>$value['artikel'],
'currency'=>$value['waehrung'],
'amount'=>$value['menge'],
'price'=>$value['preis'],
'tax'=>$value['umsatzsteuer'],'steuersatz'=>$value['steuersatz'],
'steuertext'=>$value['steuertext'],
'vpe'=>$value['vpe'],
'unit'=>$value['einheit'],
'itemno'=>$value['bestellnummer'],
'desc'=>$value['beschreibung'].($lieferdatum!=''?$newline.$this->app->erp->Beschriftung('dokument_lieferdatum').': '.$lieferdatum:''),
'hersteller'=>$value['hersteller'],
'herstellernummer'=>$value['herstellernummer'],
'freifeld1'=>$value['freifeld1'],
'freifeld2'=>$value['freifeld2'],
'freifeld3'=>$value['freifeld3'],
'freifeld4'=>$value['freifeld4'],
'freifeld5'=>$value['freifeld5'],
'freifeld6'=>$value['freifeld6'],
'freifeld7'=>$value['freifeld7'],
'freifeld8'=>$value['freifeld8'],
'freifeld9'=>$value['freifeld9'],
'freifeld10'=>$value['freifeld10'],
'freifeld11'=>$value['freifeld11'],
'freifeld12'=>$value['freifeld12'],
'freifeld13'=>$value['freifeld13'],
'freifeld14'=>$value['freifeld14'],
'freifeld15'=>$value['freifeld15'],
'freifeld16'=>$value['freifeld16'],
'freifeld17'=>$value['freifeld17'],
'freifeld18'=>$value['freifeld18'],
'freifeld19'=>$value['freifeld19'],
'freifeld20'=>$value['freifeld20'],
'freifeld21'=>$value['freifeld21'],
'freifeld22'=>$value['freifeld22'],
'freifeld23'=>$value['freifeld23'],
'freifeld24'=>$value['freifeld24'],
'freifeld25'=>$value['freifeld25'],
'freifeld26'=>$value['freifeld26'],
'freifeld27'=>$value['freifeld27'],
'freifeld28'=>$value['freifeld28'],
'freifeld29'=>$value['freifeld29'],
'freifeld30'=>$value['freifeld30'],
'freifeld31'=>$value['freifeld31'],
'freifeld32'=>$value['freifeld32'],
'freifeld33'=>$value['freifeld33'],
'freifeld34'=>$value['freifeld34'],
'freifeld35'=>$value['freifeld35'],
'freifeld36'=>$value['freifeld36'],
'freifeld37'=>$value['freifeld37'],
'freifeld38'=>$value['freifeld38'],
'freifeld39'=>$value['freifeld39'],
'freifeld40'=>$value['freifeld40'],
"name"=>$value['bezeichnunglieferant']
)
);
$netto_gesamt = $value['menge']*$value['preis'];
$summe += $netto_gesamt;
if(!isset($summen[$value['steuersatz']])) {
$summen[$value['steuersatz']] = 0;
}
$summen[$value['steuersatz']] += ($netto_gesamt/100)*$value['steuersatz'];
$gesamtsteuern +=($netto_gesamt/100)*$value['steuersatz'];
}
/*
$summe = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id'");
$summeV = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id' AND (umsatzsteuer='normal' || umsatzsteuer='') ")/100 * $this->app->erp->GetSteuersatzNormal(false,$id,"bestellung");
$summeR = $this->app->DB->Select("SELECT SUM(menge*preis) FROM bestellung_position WHERE bestellung='$id' AND umsatzsteuer='ermaessigt'")/100 * $this->app->erp->GetSteuersatzErmaessigt(false,$id,"bestellung");
*/
if($this->bestellungohnepreis!=1)
{
if($this->app->erp->BestellungMitUmsatzeuer($id))
{
$this->setTotals(
array('totalArticles'=>$summe,'total'=>$summe + $gesamtsteuern,'summen'=>$summen,'totalTaxV'=>0,'totalTaxR'=>0)
);
//$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $summeV + $summeR,"totalTaxV"=>$summeV,"totalTaxR"=>$summeR));
} else{
$this->setTotals(array('totalArticles' => $summe, 'total' => $summe));
}
}
/* Dateiname */
//$tmp_name = str_replace([' ','.'],'', trim($this->recipient['enterprise']));
$this->filename = $datum2.'_BE'.$belegnr.'.pdf';
$this->setBarcode($belegnr);
}
}

View File

@ -658,7 +658,7 @@ class Briefpapier extends SuperFPDF {
public function addItem($rdata){
// add rabatt
if($rdata['price']!='-' && is_numeric($rdata['price'])){
if($rdata['price']!='-'){
if($rdata['rabatt'] == 100){
$rdata['tprice'] = round($rdata['amount'] * ((double)$rdata['price'] - (double)($rdata['price'] / 100.00 * (double)$rdata['rabatt'])), 13);
}else{
@ -1775,12 +1775,7 @@ class Briefpapier extends SuperFPDF {
$total=$totalFullTax=$totalReducedTax=0;
$citems = !empty($this->items)?count($this->items):0;
for($i=0;$i<$citems;$i++) {
if (!$this->items[$i]['optional']) {
$total += $this->items[$i]['tprice'];
} else {
$totalOptional += $this->items[$i]['tprice'];
}
$total += $this->items[$i]['tprice'];
if($this->items[$i]['tax']=="USTV") {
$totalFullTax+= $this->items[$i]['tprice']*USTV;
}
@ -1788,7 +1783,7 @@ class Briefpapier extends SuperFPDF {
$totalReducedTax+= $this->items[$i]['tprice']*USTR;
}
}
return array($total,$totalFullTax,$totalReducedTax,$totalOptional);
return array($total,$totalFullTax,$totalReducedTax);
}
function GetFont()
@ -2503,6 +2498,7 @@ class Briefpapier extends SuperFPDF {
}
public function renderItems() {
$this->app->erp->RunHook('briefpapier_renderitems',1, $this);
// if($this->bestellungohnepreis) $this->doctype="lieferschein";
$posWidth = $this->getStyleElement("breite_position");
@ -2946,6 +2942,7 @@ class Briefpapier extends SuperFPDF {
if($this->doctype!=='zahlungsavis')
{
if($item['tax']!=='hidden'){
if($anzeigeBelegNettoAdrese){
//if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
//&& $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
@ -3071,18 +3068,16 @@ class Briefpapier extends SuperFPDF {
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
{
if(!$inventurohnepreis){
// $this->Cell_typed($priceWidth,$cellhoehe,$item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']),0,0,'R');
$price_displayed = $item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']);
$this->Cell_typed($priceWidth,$cellhoehe,$item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']),0,0,'R');
}
}
else{
if(!$inventurohnepreis){
// $this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
$this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
}
}
// $this->Cell_typed($rabattWidth,$cellhoehe,"",0,0,'R');
$this->Cell_typed($rabattWidth,$cellhoehe,"",0,0,'R');
}
}
}
@ -3098,7 +3093,7 @@ class Briefpapier extends SuperFPDF {
$this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['price'] * $item['tmptax']), 0, 0, 'R');
}
}
}
}
//$this->Cell_typed($sumWidth,$cellhoehe,$this->formatMoney($item['tprice']).' '.$item['currency'],0,0,'R');
if($this->rabatt=='1')
{
@ -3112,14 +3107,12 @@ class Briefpapier extends SuperFPDF {
//if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
if(!$inventurohnepreis){
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']);
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
}
}
else{
if(!$inventurohnepreis){
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
}
}
}
@ -3128,29 +3121,18 @@ class Briefpapier extends SuperFPDF {
// if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
if(!$inventurohnepreis){
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']);
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
}
}
else{
if(!$inventurohnepreis){
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
}
}
}
}
}
// OpenXE add price here
if (!empty($price_displayed)) {
if ($item['optional']) {
$this->Cell_typed($sumWidth, $cellhoehe, "(".$price_displayed.")", 0, 0, 'R');
} else {
$this->Cell_typed($sumWidth, $cellhoehe, $price_displayed, 0, 0, 'R');
}
}
}
else if(($this->doctype==='lieferschein' || $this->doctype==='preisanfrage') && $this->getStyleElement('artikeleinheit')=='1')
{
@ -4026,7 +4008,7 @@ class Briefpapier extends SuperFPDF {
}
$beschriftung_zeile = ucfirst($zwischenpositionen[$i]['postype']);
if($data['name']=="")
$html = ($fett?"<b>":"").$beschriftung_zeile.($fett?"</b>":"");
else
@ -4047,10 +4029,10 @@ class Briefpapier extends SuperFPDF {
$abstand_links = $posWidth +$itemNoWidth;
}
$this->SetX($x+$abstand_links);
$text = $this->WriteHTML($html);
$text = empty($text)?"":$text;
$this->SetX($x+$abstand_links);
$text = $this->WriteHTML($html);
$text = empty($text)?"":$text;
$this->Cell_typed($descWidth,4,);
$this->SetX($x+$abstand_links+$descWidth);
@ -4297,7 +4279,7 @@ class Briefpapier extends SuperFPDF {
$this->Cell_typed(40,3,'',0,0,'R');
}
$this->Ln();
}
}
$this->SetY($this->GetY()+2);
//$this->Line(110, $this->GetY(), 190,$this->GetY());
}
@ -4338,16 +4320,6 @@ class Briefpapier extends SuperFPDF {
$this->Line($differenz_wegen_abstand+5, $this->GetY(), 210-$this->getStyleElement('abstand_seitenrandrechts'),$this->GetY());
$this->Line($differenz_wegen_abstand+5, $this->GetY()+1, 210-$this->getStyleElement('abstand_seitenrandrechts'),$this->GetY()+1);
}
if(isset($this->totals['optional'])) {
$this->SetFont($this->GetFont(),'',$this->getStyleElement('schriftgroesse_gesamt'));
$this->Ln(2);
$this->Cell_typed($differenz_wegen_abstand,1,'',0);
$this->Cell_typed(30,5,"(".$this->app->erp->Beschriftung('dokument_gesamt_optional'),0,0,'L');
$this->Cell_typed(40,5,$this->formatMoney(round($this->totals['optional'],2), 2).' '.$this->waehrung.")",0,0,'R');
$this->Ln();
}
$this->SetY($this->GetY()+10);
}

View File

@ -1,202 +1,201 @@
<?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\Barcode\BarcodeFactory;
include_once "class.superfpdf.php";
class EtikettenPDF extends SuperFPDF {
function __construct($app,$projekt="") {
$this->app=$app;
$this->page_definded=false;
$this->images = array();
}
function SetXML($xml)
{
if(empty($xml))return;
$xml = str_replace('&','&amp;', $xml);
try {
$label = new SimpleXMLElement($xml);
} catch (Exception $e) {
return;
}
foreach($label as $key=>$items)
{
switch($key)
{
case "settings":
if(!$this->page_definded)
{
parent::__construct('P','mm',array(trim($items->attributes()->width),trim($items->attributes()->height)));
$this->page_definded = true;
}
$this->SetAutoPageBreak(false);
$this->SetFont('Arial','B',4);
$this->SetLeftMargin(0);
$this->SetMargins(0,0,0);
$this->AddPage();
break;
case "line":
$this->SetXY(trim($items->attributes()->x),$items->attributes()->y,$items[0]);
$this->SetFont('Arial','',$items->attributes()->size*2);
$this->MultiCell(0,$items->attributes()->size,$items[0],0,'L');
break;
case "rectangle":
$attributes = $items->attributes();
$borderwidth = 1;
if(isset($attributes->size))$borderwidth = $attributes->size;
$this->SetLineWidth($borderwidth / 10);
$this->Rect($items->attributes()->x, $items->attributes()->y,trim($items->attributes()->width),trim($items->attributes()->height),'B');
break;
case "image":
$filename = '';
if(isset($items->attributes()->src))
{
$src = str_replace('&amp;','&',$items->attributes()->src);
if(stripos($src,'http://') === false && stripos($src,'https://') === false)
{
$src = 'http://'.$src;
}
$content = file_get_contents($src);
if($content)
{
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]);
file_put_contents($filename.'1.jpg', $content);
$bildbreite = trim($items->attributes()->width);
$bildhoehe = trim($items->attributes()->height);
if(!class_exists('image'))include_once(__DIR__.'/../class.image.php');
$img = new image($this->app);
if($bildbreite > 0)
{
$breite = $bildbreite;
}else{
$breite = 30;
}
if($bildhoehe > 0)
{
$hoehe = $bildhoehe;
}else{
$hoehe = $breite;
}
$_breite = $breite;
$_hoehe = $hoehe;
list($width, $height) = getimagesize($filename.'1.jpg');
if($width > 0 && $height > 0)
{
$scalex = $breite / $width;
$scaley = $hoehe / $height;
if($scalex < $scaley)
{
$hoehe /= $scaley / $scalex;
$hoehe = ceil($hoehe);
}else{
$breite /= $scalex / $scaley;
$breite = ceil($breite);
}
$str = $content;
$manipulator = new ImageManipulator($str);
$manipulator->resample($_breite*10, $_hoehe*10, false,true, true);
$typ = IMAGETYPE_JPEG;
$manipulator->save($filename.'2.jpg', $typ);
$items[0] = $filename.'2.jpg';
}
}
}
$type = exif_imagetype ( trim($items[0]) );
switch($type)
{
case IMAGETYPE_GIF: $type="gif"; break;
case IMAGETYPE_JPEG: $type="jpg"; break;
case IMAGETYPE_PNG: $type="png"; break;
default: $type="";
}
if($type!="")
{
$this->Image(trim($items[0]),trim($items->attributes()->x),trim($items->attributes()->y),trim($items->attributes()->width),trim($items->attributes()->height),$type);
}
if($filename != '')
{
unlink($filename.'1.jpg');
unlink($filename.'2.jpg');
}
break;
case "barcode":
if((String)($items->attributes()->type)=="E30") {
$this->EAN13($items->attributes()->x,$items->attributes()->y, $items[0],$items->attributes()->size);
}
else if((String)($items->attributes()->type)=="Code128" || (String)($items->attributes()->type)=="1") {
$this->Code128($items->attributes()->x, $items->attributes()->y, $items[0], $items->attributes()->width, $items->attributes()->size);
}
else if((String)($items->attributes()->type)=="GS1-128" || (String)($items->attributes()->type)=="1") {
//$items[0] = "!FNC1!0104012345012345!FNC1!081231!FNC1!1012345";
$tmp =explode("!FNC1!",$items[0]);
$codewithfnc1 = implode(chr(206),$tmp);
//echo chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345";
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345", $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
$this->Code128($items->attributes()->x, $items->attributes()->y, $codewithfnc1, $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206).$items[0], $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
}
else { // standard auf 2 bzw default
$this->Code39($items->attributes()->x,$items->attributes()->y, $items[0], 0.5, $items->attributes()->size);//, $printText=false)
}
break;
case "qrcode":
/** @var BarcodeFactory $factory */
$factory = $this->app->Container->get('BarcodeFactory');
$ecLevel = 'M';
$type = 'png';
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]).'.' . $type;
$qrText = (string) $items[0];
$qrcode = $factory->createQrCode($qrText, $ecLevel);
$width = $items->attributes()->width ?? $items->attributes()->size;
$height = $items->attributes()->height ?? $items->attributes()->size;
$image = $qrcode->toPng(trim($width), trim($height));
if(file_put_contents($filename, $image) === false) {
throw new RuntimeException('qrcode image cannot be created. Perhaps due to missing write permission');
}
unset($image);
$this->Image(
trim($filename),
trim((int) $items->attributes()->x),
trim((int) $items->attributes()->y),
trim((int) $width),
trim((int) $height),
$type
);
unlink($filename);
break;
}
}
}
}
<?php
use Xentral\Components\Barcode\BarcodeFactory;
include_once "class.superfpdf.php";
class EtikettenPDF extends SuperFPDF {
function __construct($app,$projekt="") {
$this->app=$app;
$this->page_definded=false;
}
function SetXML($xml)
{
if(empty($xml))return;
$xml = str_replace('&','&amp;', $xml);
try {
$label = new SimpleXMLElement($xml);
} catch (Exception $e) {
return;
}
foreach($label as $key=>$items)
{
switch($key)
{
case "settings":
if(!$this->page_definded)
{
parent::__construct('P','mm',array(trim($items->attributes()->width),trim($items->attributes()->height)));
$this->page_definded = true;
}
$this->SetAutoPageBreak(false);
$this->SetFont('Arial','B',4);
$this->SetLeftMargin(0);
$this->SetMargins(0,0,0);
$this->AddPage();
break;
case "line":
$this->SetXY(trim($items->attributes()->x),$items->attributes()->y,$items[0]);
$this->SetFont('Arial','',$items->attributes()->size*2);
$this->MultiCell(0,$items->attributes()->size,$items[0],0,'L');
break;
case "rectangle":
$attributes = $items->attributes();
$borderwidth = 1;
if(isset($attributes->size))$borderwidth = $attributes->size;
$this->SetLineWidth($borderwidth / 10);
$this->Rect($items->attributes()->x, $items->attributes()->y,trim($items->attributes()->width),trim($items->attributes()->height),'B');
break;
case "image":
$filename = '';
if(isset($items->attributes()->src))
{
$src = str_replace('&amp;','&',$items->attributes()->src);
if(stripos($src,'http://') === false && stripos($src,'https://') === false)
{
$src = 'http://'.$src;
}
$content = file_get_contents($src);
if($content)
{
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]);
file_put_contents($filename.'1.jpg', $content);
$bildbreite = trim($items->attributes()->width);
$bildhoehe = trim($items->attributes()->height);
if(!class_exists('image'))include_once(__DIR__.'/../class.image.php');
$img = new image($this->app);
if($bildbreite > 0)
{
$breite = $bildbreite;
}else{
$breite = 30;
}
if($bildhoehe > 0)
{
$hoehe = $bildhoehe;
}else{
$hoehe = $breite;
}
$_breite = $breite;
$_hoehe = $hoehe;
list($width, $height) = getimagesize($filename.'1.jpg');
if($width > 0 && $height > 0)
{
$scalex = $breite / $width;
$scaley = $hoehe / $height;
if($scalex < $scaley)
{
$hoehe /= $scaley / $scalex;
$hoehe = ceil($hoehe);
}else{
$breite /= $scalex / $scaley;
$breite = ceil($breite);
}
$str = $content;
$manipulator = new ImageManipulator($str);
$manipulator->resample($_breite*10, $_hoehe*10, false,true, true);
$typ = IMAGETYPE_JPEG;
$manipulator->save($filename.'2.jpg', $typ);
$items[0] = $filename.'2.jpg';
}
}
}
$type = exif_imagetype ( trim($items[0]) );
switch($type)
{
case IMAGETYPE_GIF: $type="gif"; break;
case IMAGETYPE_JPEG: $type="jpg"; break;
case IMAGETYPE_PNG: $type="png"; break;
default: $type="";
}
if($type!="")
{
$this->Image(trim($items[0]),trim($items->attributes()->x),trim($items->attributes()->y),trim($items->attributes()->width),trim($items->attributes()->height),$type);
}
if($filename != '')
{
unlink($filename.'1.jpg');
unlink($filename.'2.jpg');
}
break;
case "barcode":
if((String)($items->attributes()->type)=="E30") {
$this->EAN13($items->attributes()->x,$items->attributes()->y, $items[0],$items->attributes()->size);
}
else if((String)($items->attributes()->type)=="Code128" || (String)($items->attributes()->type)=="1") {
$this->Code128($items->attributes()->x, $items->attributes()->y, $items[0], $items->attributes()->width, $items->attributes()->size);
}
else if((String)($items->attributes()->type)=="GS1-128" || (String)($items->attributes()->type)=="1") {
//$items[0] = "!FNC1!0104012345012345!FNC1!081231!FNC1!1012345";
$tmp =explode("!FNC1!",$items[0]);
$codewithfnc1 = implode(chr(206),$tmp);
//echo chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345";
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345", $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
$this->Code128($items->attributes()->x, $items->attributes()->y, $codewithfnc1, $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206).$items[0], $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
}
else { // standard auf 2 bzw default
$this->Code39($items->attributes()->x,$items->attributes()->y, $items[0], 0.5, $items->attributes()->size);//, $printText=false)
}
break;
case "qrcode":
/** @var BarcodeFactory $factory */
$factory = $this->app->Container->get('BarcodeFactory');
$ecLevel = 'M';
$type = 'png';
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]).'.' . $type;
$qrText = (string) $items[0];
$qrcode = $factory->createQrCode($qrText, $ecLevel);
$width = $items->attributes()->width ?? $items->attributes()->size;
$height = $items->attributes()->height ?? $items->attributes()->size;
$image = $qrcode->toPng(trim($width), trim($height));
if(file_put_contents($filename, $image) === false) {
throw new RuntimeException('qrcode image cannot be created. Perhaps due to missing write permission');
}
unset($image);
$this->Image(
trim($filename),
trim((int) $items->attributes()->x),
trim((int) $items->attributes()->y),
trim((int) $width),
trim((int) $height),
$type
);
unlink($filename);
break;
}
}
}
}

View File

@ -43,13 +43,8 @@ class GutschriftPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -50,13 +50,8 @@ class RechnungPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
}
$lvl = null;
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -137,7 +137,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<h2>{|Paket|}</h2>
<table>
<tr>
<td>{|Gewicht (in kg)</b>|}:</td>
<td>{|Gewicht (in kg)|}:</td>
<td><input type="text" v-model.number="form.weight"></td>
</tr>
<tr>
@ -157,7 +157,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<td>
<select v-model="form.product" required>
<option v-for="prod in products" :value="prod.Id" v-if="productAvailable(prod)">{{prod.Name}}</option>
</select><i>F&uuml;r Produktwahl Gewicht eingeben!</i>
</select>
</td>
</tr>
<tr v-if="serviceAvailable('premium')">
@ -168,11 +168,11 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
</div>
<div class="clearfix"></div>
<div class="col-md-12">
<h2>{|Sonstiges|}</h2>
<h2>{|Bestellung|}</h2>
<table>
<tbody>
<tr>
<td>{|Referenzen|}:</td>
<td>{|Bestellnummer|}:</td>
<td><input type="text" size="36" v-model="form.order_number"></td>
</tr>
<tr>
@ -300,4 +300,4 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
}
}
})
</script>
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,244 +1,238 @@
<?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 ObjGenVerbindlichkeit_Position
{
private $id;
private $verbindlichkeit;
private $sort;
private $artikel;
private $projekt;
private $bestellung;
private $nummer;
private $bestellnummer;
private $waehrung;
private $einheit;
private $vpe;
private $bezeichnung;
private $umsatzsteuer;
private $status;
private $beschreibung;
private $lieferdatum;
private $steuersatz;
private $steuertext;
private $preis;
private $menge;
private $kostenstelle;
private $sachkonto;
public $app; //application object
public function __construct($app)
{
$this->app = $app;
}
public function Select($id)
{
if(is_numeric($id))
$result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')");
else
return -1;
$result = $result[0];
$this->id=$result['id'];
$this->verbindlichkeit=$result['verbindlichkeit'];
$this->sort=$result['sort'];
$this->artikel=$result['artikel'];
$this->projekt=$result['projekt'];
$this->bestellung=$result['bestellung'];
$this->nummer=$result['nummer'];
$this->bestellnummer=$result['bestellnummer'];
$this->waehrung=$result['waehrung'];
$this->einheit=$result['einheit'];
$this->vpe=$result['vpe'];
$this->bezeichnung=$result['bezeichnung'];
$this->umsatzsteuer=$result['umsatzsteuer'];
$this->status=$result['status'];
$this->beschreibung=$result['beschreibung'];
$this->lieferdatum=$result['lieferdatum'];
$this->steuersatz=$result['steuersatz'];
$this->steuertext=$result['steuertext'];
$this->preis=$result['preis'];
$this->menge=$result['menge'];
$this->kostenstelle=$result['kostenstelle'];
$this->sachkonto=$result['sachkonto'];
}
public function Create()
{
$sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`)
VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}','{$this->sachkonto}')";
$this->app->DB->Insert($sql);
$this->id = $this->app->DB->GetInsertID();
}
public function Update()
{
if(!is_numeric($this->id)) {
return -1;
}
$sql = "UPDATE `verbindlichkeit_position` SET
`verbindlichkeit`='{$this->verbindlichkeit}',
`sort`='{$this->sort}',
`artikel`='{$this->artikel}',
`projekt`='{$this->projekt}',
`bestellung`='{$this->bestellung}',
`nummer`='{$this->nummer}',
`bestellnummer`='{$this->bestellnummer}',
`waehrung`='{$this->waehrung}',
`einheit`='{$this->einheit}',
`vpe`='{$this->vpe}',
`bezeichnung`='{$this->bezeichnung}',
`umsatzsteuer`='{$this->umsatzsteuer}',
`status`='{$this->status}',
`beschreibung`='{$this->beschreibung}',
`lieferdatum`='{$this->lieferdatum}',
`steuersatz`='{$this->steuersatz}',
`steuertext`='{$this->steuertext}',
`preis`='{$this->preis}',
`menge`='{$this->menge}',
`kostenstelle`='{$this->kostenstelle}',
`sachkonto`='{$this->sachkonto}'
WHERE (`id`='{$this->id}')";
$this->app->DB->Update($sql);
}
public function Delete($id='')
{
if(is_numeric($id))
{
$this->id=$id;
}
else
return -1;
$sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')";
$this->app->DB->Delete($sql);
$this->id='';
$this->verbindlichkeit='';
$this->sort='';
$this->artikel='';
$this->projekt='';
$this->bestellung='';
$this->nummer='';
$this->bestellnummer='';
$this->waehrung='';
$this->einheit='';
$this->vpe='';
$this->bezeichnung='';
$this->umsatzsteuer='';
$this->status='';
$this->beschreibung='';
$this->lieferdatum='';
$this->steuersatz='';
$this->steuertext='';
$this->preis='';
$this->menge='';
$this->kostenstelle='';
$this->sachkonto='';
}
public function Copy()
{
$this->id = '';
$this->Create();
}
/**
Mit dieser Funktion kann man einen Datensatz suchen
dafuer muss man die Attribute setzen nach denen gesucht werden soll
dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt
zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen
**/
public function Find()
{
//TODO Suche mit den werten machen
}
public function FindNext()
{
//TODO Suche mit den alten werten fortsetzen machen
}
/** Funktionen um durch die Tabelle iterieren zu koennen */
public function Next()
{
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
}
public function First()
{
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
}
/** dank dieser funktionen kann man die tatsaechlichen werte einfach
ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/
public function SetId($value) { $this->id=$value; }
public function GetId() { return $this->id; }
public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; }
public function GetVerbindlichkeit() { return $this->verbindlichkeit; }
public function SetSort($value) { $this->sort=$value; }
public function GetSort() { return $this->sort; }
public function SetArtikel($value) { $this->artikel=$value; }
public function GetArtikel() { return $this->artikel; }
public function SetProjekt($value) { $this->projekt=$value; }
public function GetProjekt() { return $this->projekt; }
public function SetBestellung($value) { $this->bestellung=$value; }
public function GetBestellung() { return $this->bestellung; }
public function SetNummer($value) { $this->nummer=$value; }
public function GetNummer() { return $this->nummer; }
public function SetBestellnummer($value) { $this->bestellnummer=$value; }
public function GetBestellnummer() { return $this->bestellnummer; }
public function SetWaehrung($value) { $this->waehrung=$value; }
public function GetWaehrung() { return $this->waehrung; }
public function SetEinheit($value) { $this->einheit=$value; }
public function GetEinheit() { return $this->einheit; }
public function SetVpe($value) { $this->vpe=$value; }
public function GetVpe() { return $this->vpe; }
public function SetBezeichnung($value) { $this->bezeichnung=$value; }
public function GetBezeichnung() { return $this->bezeichnung; }
public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; }
public function GetUmsatzsteuer() { return $this->umsatzsteuer; }
public function SetStatus($value) { $this->status=$value; }
public function GetStatus() { return $this->status; }
public function SetBeschreibung($value) { $this->beschreibung=$value; }
public function GetBeschreibung() { return $this->beschreibung; }
public function SetLieferdatum($value) { $this->lieferdatum=$value; }
public function GetLieferdatum() { return $this->lieferdatum; }
public function SetSteuersatz($value) { $this->steuersatz=$value; }
public function GetSteuersatz() { return $this->steuersatz; }
public function SetSteuertext($value) { $this->steuertext=$value; }
public function GetSteuertext() { return $this->steuertext; }
public function SetPreis($value) { $this->preis=$value; }
public function GetPreis() { return $this->preis; }
public function SetMenge($value) { $this->menge=$value; }
public function GetMenge() { return $this->menge; }
public function SetKostenstelle($value) { $this->kostenstelle=$value; }
public function GetKostenstelle() { return $this->kostenstelle; }
public function SetSachkonto($value) { $this->sachkonto=$value; }
public function GetSachkonto() { return $this->sachkonto; }
}
<?php
class ObjGenVerbindlichkeit_Position
{
private $id;
private $verbindlichkeit;
private $sort;
private $artikel;
private $projekt;
private $bestellung;
private $nummer;
private $bestellnummer;
private $waehrung;
private $einheit;
private $vpe;
private $bezeichnung;
private $umsatzsteuer;
private $status;
private $beschreibung;
private $lieferdatum;
private $steuersatz;
private $steuertext;
private $preis;
private $menge;
private $kostenstelle;
public $app; //application object
public function __construct($app)
{
$this->app = $app;
}
public function Select($id)
{
if(is_numeric($id))
$result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')");
else
return -1;
$result = $result[0];
$this->id=$result['id'];
$this->verbindlichkeit=$result['verbindlichkeit'];
$this->sort=$result['sort'];
$this->artikel=$result['artikel'];
$this->projekt=$result['projekt'];
$this->bestellung=$result['bestellung'];
$this->nummer=$result['nummer'];
$this->bestellnummer=$result['bestellnummer'];
$this->waehrung=$result['waehrung'];
$this->einheit=$result['einheit'];
$this->vpe=$result['vpe'];
$this->bezeichnung=$result['bezeichnung'];
$this->umsatzsteuer=$result['umsatzsteuer'];
$this->status=$result['status'];
$this->beschreibung=$result['beschreibung'];
$this->lieferdatum=$result['lieferdatum'];
$this->steuersatz=$result['steuersatz'];
$this->steuertext=$result['steuertext'];
$this->preis=$result['preis'];
$this->menge=$result['menge'];
$this->kostenstelle=$result['kostenstelle'];
}
public function Create()
{
$sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`)
VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}')";
$this->app->DB->Insert($sql);
$this->id = $this->app->DB->GetInsertID();
}
public function Update()
{
if(!is_numeric($this->id)) {
return -1;
}
$sql = "UPDATE `verbindlichkeit_position` SET
`verbindlichkeit`='{$this->verbindlichkeit}',
`sort`='{$this->sort}',
`artikel`='{$this->artikel}',
`projekt`='{$this->projekt}',
`bestellung`='{$this->bestellung}',
`nummer`='{$this->nummer}',
`bestellnummer`='{$this->bestellnummer}',
`waehrung`='{$this->waehrung}',
`einheit`='{$this->einheit}',
`vpe`='{$this->vpe}',
`bezeichnung`='{$this->bezeichnung}',
`umsatzsteuer`='{$this->umsatzsteuer}',
`status`='{$this->status}',
`beschreibung`='{$this->beschreibung}',
`lieferdatum`='{$this->lieferdatum}',
`steuersatz`='{$this->steuersatz}',
`steuertext`='{$this->steuertext}',
`preis`='{$this->preis}',
`menge`='{$this->menge}',
`kostenstelle`='{$this->kostenstelle}'
WHERE (`id`='{$this->id}')";
$this->app->DB->Update($sql);
}
public function Delete($id='')
{
if(is_numeric($id))
{
$this->id=$id;
}
else
return -1;
$sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')";
$this->app->DB->Delete($sql);
$this->id='';
$this->verbindlichkeit='';
$this->sort='';
$this->artikel='';
$this->projekt='';
$this->bestellung='';
$this->nummer='';
$this->bestellnummer='';
$this->waehrung='';
$this->einheit='';
$this->vpe='';
$this->bezeichnung='';
$this->umsatzsteuer='';
$this->status='';
$this->beschreibung='';
$this->lieferdatum='';
$this->steuersatz='';
$this->steuertext='';
$this->preis='';
$this->menge='';
$this->kostenstelle='';
}
public function Copy()
{
$this->id = '';
$this->Create();
}
/**
Mit dieser Funktion kann man einen Datensatz suchen
dafuer muss man die Attribute setzen nach denen gesucht werden soll
dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt
zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen
**/
public function Find()
{
//TODO Suche mit den werten machen
}
public function FindNext()
{
//TODO Suche mit den alten werten fortsetzen machen
}
/** Funktionen um durch die Tabelle iterieren zu koennen */
public function Next()
{
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
}
public function First()
{
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
}
/** dank dieser funktionen kann man die tatsaechlichen werte einfach
ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/
public function SetId($value) { $this->id=$value; }
public function GetId() { return $this->id; }
public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; }
public function GetVerbindlichkeit() { return $this->verbindlichkeit; }
public function SetSort($value) { $this->sort=$value; }
public function GetSort() { return $this->sort; }
public function SetArtikel($value) { $this->artikel=$value; }
public function GetArtikel() { return $this->artikel; }
public function SetProjekt($value) { $this->projekt=$value; }
public function GetProjekt() { return $this->projekt; }
public function SetBestellung($value) { $this->bestellung=$value; }
public function GetBestellung() { return $this->bestellung; }
public function SetNummer($value) { $this->nummer=$value; }
public function GetNummer() { return $this->nummer; }
public function SetBestellnummer($value) { $this->bestellnummer=$value; }
public function GetBestellnummer() { return $this->bestellnummer; }
public function SetWaehrung($value) { $this->waehrung=$value; }
public function GetWaehrung() { return $this->waehrung; }
public function SetEinheit($value) { $this->einheit=$value; }
public function GetEinheit() { return $this->einheit; }
public function SetVpe($value) { $this->vpe=$value; }
public function GetVpe() { return $this->vpe; }
public function SetBezeichnung($value) { $this->bezeichnung=$value; }
public function GetBezeichnung() { return $this->bezeichnung; }
public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; }
public function GetUmsatzsteuer() { return $this->umsatzsteuer; }
public function SetStatus($value) { $this->status=$value; }
public function GetStatus() { return $this->status; }
public function SetBeschreibung($value) { $this->beschreibung=$value; }
public function GetBeschreibung() { return $this->beschreibung; }
public function SetLieferdatum($value) { $this->lieferdatum=$value; }
public function GetLieferdatum() { return $this->lieferdatum; }
public function SetSteuersatz($value) { $this->steuersatz=$value; }
public function GetSteuersatz() { return $this->steuersatz; }
public function SetSteuertext($value) { $this->steuertext=$value; }
public function GetSteuertext() { return $this->steuertext; }
public function SetPreis($value) { $this->preis=$value; }
public function GetPreis() { return $this->preis; }
public function SetMenge($value) { $this->menge=$value; }
public function GetMenge() { return $this->menge; }
public function SetKostenstelle($value) { $this->kostenstelle=$value; }
public function GetKostenstelle() { return $this->kostenstelle; }
}

View File

@ -1,59 +1,59 @@
<?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 GenAdresse {
function __construct(&$app) {
$this->app=&$app;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","AdresseCreate");
$this->app->ActionHandler("edit","AdresseEdit");
$this->app->ActionHandler("copy","AdresseCopy");
$this->app->ActionHandler("list","AdresseList");
$this->app->ActionHandler("delete","AdresseDelete");
$this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app);
}
function AdresseCreate(){
$this->app->Tpl->Set("HEADING","Adresse (Anlegen)");
$this->app->PageBuilder->CreateGen("adresse_create.tpl");
}
function AdresseEdit(){
$this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)");
$this->app->PageBuilder->CreateGen("adresse_edit.tpl");
}
function AdresseCopy(){
$this->app->Tpl->Set("HEADING","Adresse (Kopieren)");
$this->app->PageBuilder->CreateGen("adresse_copy.tpl");
}
function AdresseDelete(){
$this->app->Tpl->Set("HEADING","Adresse (L&ouml;schen)");
$this->app->PageBuilder->CreateGen("adresse_delete.tpl");
}
function AdresseList(){
$this->app->Tpl->Set("HEADING","Adresse (&Uuml;bersicht)");
$this->app->PageBuilder->CreateGen("adresse_list.tpl");
}
}
?>
<?php
class GenAdresse {
function __construct(&$app) {
$this->app=&$app;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","AdresseCreate");
$this->app->ActionHandler("edit","AdresseEdit");
$this->app->ActionHandler("copy","AdresseCopy");
$this->app->ActionHandler("list","AdresseList");
$this->app->ActionHandler("delete","AdresseDelete");
$this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app);
}
function AdresseCreate(){
$this->app->Tpl->Set("HEADING","Adresse (Anlegen)");
$this->app->PageBuilder->CreateGen("adresse_create.tpl");
}
function AdresseEdit(){
$this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)");
$this->app->PageBuilder->CreateGen("adresse_edit.tpl");
}
function AdresseCopy(){
$this->app->Tpl->Set("HEADING","Adresse (Kopieren)");
$this->app->PageBuilder->CreateGen("adresse_copy.tpl");
}
function AdresseDelete(){
$this->app->Tpl->Set("HEADING","Adresse (L&ouml;schen)");
$this->app->PageBuilder->CreateGen("adresse_delete.tpl");
}
function AdresseList(){
$this->app->Tpl->Set("HEADING","Adresse (&Uuml;bersicht)");
$this->app->PageBuilder->CreateGen("adresse_list.tpl");
}
}
?>

View File

@ -350,9 +350,9 @@ class Ajax {
$id = $this->app->Secure->GetPOST('id');
$objekt = $this->app->Secure->GetPOST('typ');
$parameter = $this->app->Secure->GetPOST('parameter');
$module = strtolower($objekt);
$objekt = $this->app->YUI->dateien_module_objekt_map($objekt);
if($objekt === 'adresse'){
$objekt = 'Adressen';
}
$data = $this->app->DB->SelectRow(
"SELECT d.*, s.subjekt
@ -363,6 +363,12 @@ class Ajax {
LIMIT 1"
);
$module = strtolower($objekt);
if($module === 'adressen'){
$module = 'adresse';
}
$typen = $this->app->erp->getDateiTypen($module);
$found = false;
foreach($typen as $typ) {
@ -425,10 +431,10 @@ class Ajax {
$titel = $this->app->Secure->GetPOST('titel');
$beschreibung = $this->app->Secure->GetPOST('beschreibung');
$subjekt = $this->app->Secure->GetPOST('subjekt');
$module = strtolower($objekt);
$objekt = $this->app->YUI->dateien_module_objekt_map($module);
if($objekt == 'adresse')
{
$objekt = 'Adressen';
}
$ersteller = $this->app->DB->real_escape_string($this->app->User->GetName());
$datei = $this->app->DB->SelectArr("SELECT d.id, s.id as sid FROM datei d LEFT JOIN datei_stichwoerter s ON d.id=s.datei LEFT JOIN datei_version v ON v.datei=d.id WHERE s.objekt LIKE '$objekt' AND s.parameter='$parameter' AND d.geloescht=0 AND d.id = '$id' LIMIT 1");
if($datei)
@ -648,9 +654,6 @@ class Ajax {
$cmd = trim($this->app->Secure->GetGET('cmd'));
$id = (int)$this->app->Secure->GetGET('id');
$module = strtolower($cmd);
$cmd = $this->app->YUI->dateien_module_objekt_map($cmd);
if(!empty($cmd) && $id
&& (!in_array($cmd, $cmds) || (in_array($cmd, $cmds) && $this->app->erp->RechteVorhanden($cmd,'dateien')))) {
$datei = $this->app->DB->SelectRow(
@ -658,7 +661,7 @@ class Ajax {
"SELECT dv.id, ds.parameter, dv.dateiname
FROM datei_version AS dv
INNER JOIN datei_stichwoerter ds ON ds.datei = dv.datei
WHERE dv.datei = %d AND (ds.objekt like '%s')
WHERE dv.datei = %d AND (ds.objekt like '%s'".($cmd === 'adresse'?" OR ds.objekt like 'Adressen' ":'').")
ORDER BY dv.datei DESC, dv.version DESC
LIMIT 1",
$id, $cmd
@ -674,7 +677,6 @@ class Ajax {
echo $str;
exit;
}
if(!empty($datei['parameter'])) {
if($cmd === 'projekt') {
if(!$this->app->erp->UserProjektRecht($datei['parameter'])) {
@ -692,7 +694,7 @@ class Ajax {
$projekt = $this->app->DB->Select(
sprintf(
'SELECT `projekt` FROM `%s` WHERE `id` = %d LIMIT 1',
$module, $datei[0]['parameter']
$cmd, $datei[0]['parameter']
)
);
if(!$this->app->erp->UserProjektRecht($projekt)) {
@ -708,7 +710,8 @@ class Ajax {
}
}
}
//Rechte prüfen
//Rechte prüfen
$userdata = isset($this->app->Conf->WFuserdata)
?$this->app->Conf->WFuserdata
:(str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'../userdata');
@ -746,17 +749,34 @@ class Ajax {
exit;
break;
case 'application/pdf':
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.png');
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg');
header('Content-type: image/png');
echo $str;
exit;
break;
default:
default:
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg');
if(substr(strtolower($datei['dateiname']),-4) === '.gif'){
header('Content-type: image/gif');
echo $str;
exit;
}
if(substr(strtolower($datei['dateiname']),-4) === '.png'){
header('Content-type: image/png');
echo $str;
exit;
}
if(substr(strtolower($datei['dateiname']),-4) === '.jpg'
|| substr(strtolower($datei['dateiname']),-4) === 'jpeg'){
header('Content-type: image/jpg');
echo $str;
exit;
}
break;
}
}
}
if(file_exists($cachefolder.'/'.$datei['id'].'_100_100')) {
$type = is_file($path.'/'.$datei['id'])? false : mime_content_type($path.'/'.$datei['id']);
if($type === false) {
@ -1577,17 +1597,11 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
if($artikel_freitext1_suche)
{
$felder[] = 'art.freifeld1';
} else {
$artikel_freitext1_suche = 'true';
}
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$sql = "SELECT CONCAT(art.nummer,' ',art.name_de) as name FROM artikel art
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(art.nummer,' ',art.name_de) as name FROM artikel art
INNER JOIN $doctype"."_position ap ON ap.artikel = art.id AND $doctype = '$doctypeid'
WHERE
art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 AND
(name_de LIKE '%$term%' OR art.nummer LIKE '%$term%')
LIMIT 20";
$arr = $this->app->DB->SelectArr($sql);
WHERE art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 LIMIT 20");
$carr = !empty($arr)?count($arr):0;
for($i = 0; $i < $carr; $i++) {
$newarr[] = $arr[$i]['name'];
@ -2362,14 +2376,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
for($i = 0; $i < $carr; $i++)
$newarr[] = $arr[$i]['name'];
break;
case "sachkonto_aufwendungen":
$arr = $this->app->DB->SelectArr("SELECT CONCAT(sachkonto,' ',beschriftung) as name FROM kontorahmen
WHERE art = 1 AND (beschriftung LIKE '%$term%' OR sachkonto LIKE '%$term%' OR sachkonto LIKE '%$term2%' OR sachkonto LIKE '%$term3%' OR beschriftung LIKE '%$term2%' OR beschriftung LIKE '%$term3%') AND ausblenden!=1 $andprojekt ORDER by sachkonto");
$carr = !empty($arr)?count($arr):0;
for($i = 0; $i < $carr; $i++)
$newarr[] = $arr[$i]['name'];
break;
case "lieferbedingungen":
$arr = $this->app->DB->SelectArr("SELECT CONCAT(lieferbedingungen) as name FROM lieferbedingungen
WHERE (lieferbedingungen LIKE '%$term%' OR lieferbedingungen LIKE '%$term2%' OR lieferbedingungen LIKE '%$term3%') ORDER by lieferbedingungen");
@ -2448,7 +2455,6 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(nummer,' ',beschreibung) as name FROM kostenstellen WHERE $subwhere ORDER by nummer");
$carr = !empty($arr)?count($arr):0;
for($i = 0; $i < $carr; $i++)
$newarr[] = $arr[$i]['name'];
@ -2473,7 +2479,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$adresse = $this->app->DB->Select("SELECT id FROM adresse WHERE kundennummer = '".$kunde[0]."' AND kundennummer <> '' LIMIT 1");
}
$beleg = str_replace('kunden','',$filtername);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(belegnr,' ',kundennummer,' ',name) as name FROM $beleg WHERE (belegnr <> '') AND (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR kundennummer LIKE '$%term%') AND (status IN ('angelegt','freigegeben','versendet'))
$arr = $this->app->DB->SelectArr("SELECT CONCAT(id,' ',if(belegnr <> '',belegnr,'ENTWURF'),' ',kundennummer,' ',name) as name FROM $beleg WHERE (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR kundennummer LIKE '$%term%') AND (status = 'angelegt' OR status = 'freigegeben')
".($adresse?" AND adresse = '$adresse' ":'')." ".$this->app->erp->ProjektRechte('projekt')."
ORDER by belegnr LIMIT 20");
$carr = !empty($arr)?count($arr):0;
@ -2489,7 +2495,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$adresse = $this->app->DB->Select("SELECT id FROM adresse WHERE lieferantennummer = '".$lieferant[0]."' AND lieferantennummer <> '' LIMIT 1");
}
$beleg = str_replace('lieferanten','',$filtername);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(belegnr,' ',lieferantennummer,' ',name) as name FROM $beleg WHERE (belegnr <> '') AND (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR lieferantennummer LIKE '$%term%') AND (status = 'versendet' OR status = 'freigegeben')
$arr = $this->app->DB->SelectArr("SELECT CONCAT(id,' ',if(belegnr <> '',belegnr,'ENTWURF'),' ',lieferantennummer,' ',name) as name FROM $beleg WHERE (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR lieferantennummer LIKE '$%term%') AND (status = 'angelegt' OR status = 'freigegeben')
".($adresse?" AND adresse = '$adresse' ":'')." ".$this->app->erp->ProjektRechte('projekt')."
ORDER by belegnr LIMIT 20" );
$carr = !empty($arr)?count($arr):0;
@ -3832,13 +3838,10 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$term = str_replace(',','',$term);
}
$adresse = (int)$this->app->Secure->GetGET('adresse');
if (!empty($adresse)) {
$subwhere .= " AND a.id = ".$adresse;
}
$sql =
"SELECT CONCAT(v.belegnr,
"SELECT CONCAT(v.id,
IF(IFNULL(v.belegnr, '') <> '' AND v.belegnr!=v.id,
CONCAT(' Nr. ',v.belegnr),''),
' Betrag: ',".$this->app->erp->FormatPreis('v.betrag',2).",
if(v.skonto <> 0,CONCAT(' mit Skonto ',v.skonto,'% ',
".$this->app->erp->FormatPreis("v.betrag-((v.betrag/100.0)*v.skonto)",2)."),''),' ',
@ -3851,7 +3854,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
a.name,' (Lieferant ',a.lieferantennummer,if(a.lieferantennummer_buchhaltung!='' AND a.lieferantennummer <> a.lieferantennummer_buchhaltung,CONCAT(' ',a.lieferantennummer_buchhaltung),''),') RE ',v.rechnung,' Rechnungsdatum ',DATE_FORMAT(v.rechnungsdatum,'%d.%m.%Y')) as bezeichnung
FROM verbindlichkeit AS v
LEFT JOIN adresse AS a ON a.id=v.adresse
WHERE ($subwhere) AND bezahlt!=1 AND status!='storniert' AND belegnr <> ''
WHERE ($subwhere) AND bezahlt!=1 AND status!='storniert'
ORDER by v.id DESC"; //AND v.status!='bezahlt' // heute wieder raus
$arr = $this->app->DB->SelectArr($sql);

View File

@ -307,52 +307,21 @@ class Angebot extends GenAngebot
{
$id = $this->app->Secure->GetGET('id');
// Deckungsbeitrag
if (!$this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$this->app->Tpl->Set('DBHIDDEN','hidden');
} else {
$sql = "
SELECT
umsatz_netto_gesamt,
artikel,
menge,
einkaufspreis
FROM
`angebot_position`
WHERE
`angebot` = ".$id."
";
$positionen = $this->app->DB->SelectArr($sql);
$umsatz_gesamt = 0;
$kosten_gesamt = 0;
$db_gesamt = 0;
foreach ($positionen as $position) {
if (empty($position['einkaufspreis'])) {
$position['einkaufspreis'] = $this->app->erp->GetEinkaufspreis($position['artikel'],$position['menge']);
}
$kosten = ($position['einkaufspreis']*$position['menge']);
$db_gesamt += $position['umsatz_netto_gesamt']-$kosten;
$kosten_gesamt += $kosten;
$umsatz_gesamt += $position['umsatz_netto_gesamt'];
}
$this->app->Tpl->Set('NETTOGESAMT',$this->app->erp->number_format_variable($umsatz_gesamt,2));
$this->app->Tpl->Set('KOSTEN',$this->app->erp->number_format_variable($kosten_gesamt,2));
$this->app->Tpl->Set('DECKUNGSBEITRAG',$this->app->erp->number_format_variable($db_gesamt,2));
$this->app->Tpl->Set( 'DBPROZENT',
$umsatz_gesamt==0?
"-":
$this->app->erp->number_format_variable(
round(
$db_gesamt/$umsatz_gesamt*100,2
)
)."%"
);
if(!$this->app->DB->Select("SELECT deckungsbeitragcalc FROM angebot WHERE id='$id' LIMIT 1")) {
$this->app->erp->BerechneDeckungsbeitrag($id,'angebot');
}
$auftragArr = $this->app->DB->SelectArr("SELECT * FROM angebot WHERE id='$id' LIMIT 1");
$kundennummer = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE id='{$auftragArr[0]['adresse']}' LIMIT 1");
$projekt = $this->app->DB->Select("SELECT abkuerzung FROM projekt WHERE id='{$auftragArr[0]['projekt']}' LIMIT 1");
$kundenname = $this->app->DB->Select("SELECT name FROM adresse WHERE id='{$auftragArr[0]['adresse']}' LIMIT 1");
$this->app->Tpl->Set('KUNDE',"<a href=\"index.php?module=adresse&action=edit&id=".$auftragArr[0]['adresse']."\" target=\"_blank\">".$kundennummer."</a> ".$kundenname);
//$this->app->Tpl->Set('KUNDE',$kundennummer." ".$kundenname);
$this->app->Tpl->Set('DECKUNGSBEITRAG',0);
$this->app->Tpl->Set('DBPROZENT',0);
if($this->app->erp->RechteVorhanden('projekt','dashboard')){
$this->app->Tpl->Set('PROJEKT', "<a href=\"index.php?module=projekt&action=dashboard&id=" . $auftragArr[0]['projekt'] . "\" target=\"_blank\">$projekt</a>");
}
@ -1725,11 +1694,6 @@ class Angebot extends GenAngebot
$this->app->erp->AnsprechpartnerAlsLieferadresseButton($adresse);
$this->app->erp->AdresseAlsLieferadresseButton($adresse);
}
if ($schreibschutz != 1 AND $status != 'abgeschlossen') {
$this->app->erp->BerechneDeckungsbeitrag($id,'angebot');
}
if($nummer!="")
{

File diff suppressed because it is too large Load Diff

View File

@ -1,304 +1,298 @@
<?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;
class Api_account
{
/** @var Application $app */
protected $app;
const MODULE_NAME = 'ApiAccount';
/** @var string[] $javascript */
public $javascript = [
'./classes/Modules/ApiAccount/www/js/api_account.js',
];
/**
* @param Application $app
* @param string $name
* @param array $erlaubtevars
*
* @return array
*/
public static function TableSearch($app, $name, $erlaubtevars)
{
switch($name)
{
case 'api_account_list':
$allowed['api_account'] = array('list');
$heading = array('API Account ID', 'Bezeichnung', 'Aktiv', 'Men&uuml;');
$width = array('10%', '79%', '10%', '1%');
$findcols = array('aa.id', 'bezeichnung', "if(aktiv = 1, 'ja','nein')", 'id');
$searchsql = array('bezeichnung');
$defaultorder = 1; //Optional wenn andere Reihenfolge gewuenscht
$defaultorderdesc = 1;
$menucol = 3;
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap><a data-id=\"%value%\" class=\"get\" href=\"#\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT aa.id, aa.id, aa.bezeichnung,
if(aa.aktiv = 1, 'ja','nein') as aktiv,
aa.id
FROM `api_account` AS `aa`
";
$fastcount = "SELECT COUNT(`aa`.`id`) FROM `api_account` AS `aa`";
break;
}
$erg = [];
foreach($erlaubtevars as $k => $v) {
if(isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
/**
* Api_account constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false)
{
$this->app=$app;
if($intern) {
return;
}
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","Api_AccountCreate");
$this->app->ActionHandler("edit","Api_AccountEdit");
$this->app->ActionHandler("list","Api_AccountList");
$this->app->ActionHandler("delete","Api_AccountDelete");
$this->app->DefaultActionHandler('list');
$this->app->ActionHandlerListen($app);
}
function Api_AccountCreate(){
}
function Api_AccountEdit(){
}
public function Api_AccountDelete(){
$id = $this->app->Secure->GetGET('id');
$this->app->DB->Delete(sprintf('DELETE FROM `api_account` WHERE `id` = %d', $id));
$this->app->Location->execute('index.php?module=api_account&action=list');
}
/**
* @return JsonResponse
*/
public function HandleGetAjaxAction()
{
$id = (int)$this->app->Secure->GetPOST('id');
if($id === 0) {
$data = [
'aktiv' => 0,
'id' => '',
'bezeichnung' => '',
'projekt' => '',
'remotedomain' => '',
'initkey' => '',
'importwarteschlange' => 0,
'importwarteschlange_name' => '',
'event_url' => '',
'cleanutf8' => 0,
'apitempkey' => '',
'ishtmltransformation' => 0,
];
return new JsonResponse($data);
}
if($id > 0) {
$data = $this->app->DB->SelectRow(
sprintf(
"SELECT a.id, a.bezeichnung, a.aktiv, p.abkuerzung AS `projekt`, a.remotedomain, a.initkey,
a.importwarteschlange, a.importwarteschlange_name, a.cleanutf8, a.event_url, a.permissions, a.ishtmltransformation
FROM `api_account` AS `a`
LEFT JOIN `projekt` AS `p` ON a.projekt = p.id
WHERE a.id = %d",
$id
)
);
/** @var Api $api */
$api = $this->app->loadModule('api');
$data['apitempkey'] = $api->generateHashFromDomainAndKey($data['initkey'], $data['remotedomain']);
if(!empty($data)) {
return new JsonResponse($data);
}
}
return new JsonResponse(['error'=>'Account nicht gefunden'], JsonResponse::HTTP_BAD_REQUEST);
}
/**
* @return JsonResponse
*/
public function HandleSaveAjaxAction()
{
if(!$this->app->erp->RechteVorhanden('api_account', 'edit')) {
return new JsonResponse(['error'=>'Fehlende Rechte'], JsonResponse::HTTP_BAD_REQUEST);
}
$id = (int)$this->app->Secure->GetPOST('id');
$bezeichnung = $this->app->Secure->GetPOST('bezeichnung');
if(empty($bezeichnung)) {
return new JsonResponse(['error'=>'Bitte füllen Sie die Bezeichnung aus'], JsonResponse::HTTP_BAD_REQUEST);
}
$projekt = (string)$this->app->Secure->GetPOST('projekt');
if($projekt !== ''){
$projekt = (int)$this->app->erp->ReplaceProjekt(1, $projekt, 1);
}
else {
$projekt = 0;
}
$aktiv = (int)(bool)$this->app->Secure->GetPOST('aktiv');
$importwarteschlange = (int)(bool)$this->app->Secure->GetPOST('importwarteschlange');
$cleanutf8 = (int)(bool)$this->app->Secure->GetPOST('cleanutf8');
$remotedomain = $this->app->Secure->GetPOST('remotedomain');
$initkey = $this->app->Secure->GetPOST('initkey');
$importwarteschlange_name = $this->app->Secure->GetPOST('importwarteschlange_name');
$event_url = $this->app->Secure->GetPOST('event_url');
$isHtmlTransformation = (int)(bool)$this->app->Secure->GetPOST('ishtmltransformation');
$api_permissions = $this->prepareApiPermissions($this->app->Secure->GetPOST('api_permissions'));
if($id <= 0) {
$this->app->DB->Insert(
sprintf(
"INSERT INTO `api_account`
(`bezeichnung`, `initkey`, `importwarteschlange_name`, `event_url`, `remotedomain`, `aktiv`,
`importwarteschlange`, `cleanutf8`, `uebertragung_account`, `projekt`, `permissions`, `ishtmltransformation`)
VALUES ('%s', '%s', '%s', '%s', '%s', %d,
%d, %d, 0, %d, '%s', %d) ",
$bezeichnung, $initkey, $importwarteschlange_name, $event_url, $remotedomain, $aktiv,
$importwarteschlange, $cleanutf8, $projekt, $api_permissions, $isHtmlTransformation
)
);
$id = (int)$this->app->DB->GetInsertID();
if($id){
$data = ['success' => true, 'id' => $id];
return new JsonResponse($data);
}
return new JsonResponse(['error'=>'Account konnte nicht erstellt werden'], JsonResponse::HTTP_BAD_REQUEST);
}
$data = $this->app->DB->SelectRow(
sprintf(
"SELECT a.id, a.bezeichnung, a.aktiv, p.abkuerzung AS `projekt`, a.remotedomain, a.initkey,
a.importwarteschlange, a.importwarteschlange_name, a.cleanutf8, a.event_url, a.permissions, a.ishtmltransformation
FROM `api_account` AS `a`
LEFT JOIN `projekt` AS `p` ON a.projekt = p.id
WHERE a.id = %d",
$id
)
);
if(empty($data)) {
return new JsonResponse(['error'=>'Account nicht gefunden'], JsonResponse::HTTP_BAD_REQUEST);
}
$this->app->DB->Update(
sprintf(
"UPDATE `api_account`
SET `bezeichnung` = '%s',
`initkey` = '%s',
`importwarteschlange_name` = '%s',
`event_url` = '%s',
`remotedomain` = '%s',
`aktiv` = %d,
`importwarteschlange` = %d,
`cleanutf8` = %d,
`uebertragung_account` = 0,
`projekt` = %d ,
`permissions` = '%s',
`ishtmltransformation` = %d
WHERE `id` = %d",
$bezeichnung, $initkey, $importwarteschlange_name, $event_url, $remotedomain, $aktiv,
$importwarteschlange, $cleanutf8, $projekt, $api_permissions, $isHtmlTransformation, $id
)
);
if(empty($this->app->DB->error())) {
$data = ['success' => true, 'id' => $id];
return new JsonResponse($data);
}
return new JsonResponse(['error'=>'Account konnte nicht geändert werden'], JsonResponse::HTTP_BAD_REQUEST);
}
private function prepareApiPermissions(array $apiPermissions){
$cleanedPermissions = [];
foreach ($apiPermissions as $permission => $value){
if($value === 'true'){
$cleanedPermissions[] = $permission;
}
}
return json_encode($cleanedPermissions);
}
public function Api_AccountList(){
$cmd = $this->app->Secure->GetGET('cmd');
if($cmd === 'get') {
return $this->HandleGetAjaxAction();
}
if($cmd === 'save') {
return $this->HandleSaveAjaxAction();
}
$apiPermissions = $this->app->DB->SelectArr("SELECT * FROM `api_permission`");
if (empty($apiPermissions)) {
$api = $this->app->loadModule('api');
$api->fillApiPermissions();
$apiPermissions = $this->app->DB->SelectArr("SELECT * FROM `api_permission`");
}
$groupedApiPermissions = [];
foreach ($apiPermissions as $apiPermission){
$groupedApiPermissions[$apiPermission['group']][] =$apiPermission;
}
$apiPermissionsHtml = '';
foreach ($groupedApiPermissions as $group => $permissions) {
$apiPermissionsHtml .= '<tr>';
$apiPermissionsHtml .= "<td>{$group}</td>";
$apiPermissionsHtml .= "<td>";
foreach ($permissions as $permission){
$apiPermissionsHtml .= "<label for='{$permission['key']}'>";
$apiPermissionsHtml .= "<input class='permission-checkbox' type='checkbox' name='{$permission['key']}'>";
$apiPermissionsHtml .= "&nbsp;&nbsp;{$permission['key']}</label>";
$apiPermissionsHtml .= "<br>";
}
$apiPermissionsHtml .= "</td>";
$apiPermissionsHtml .= '</tr>';
}
$this->app->YUI->TableSearch('TAB1','api_account_list', 'show','','',basename(__FILE__), __CLASS__);
$this->app->erp->MenuEintrag('#', 'Neu');
$this->app->erp->MenuEintrag('index.php?module=api_account&action=list', '&Uuml;bersicht');
$this->app->erp->Headlines('API Account');
$this->app->Tpl->Set('API_PERMISSIONS_HTML', $apiPermissionsHtml);
$this->app->YUI->Autocomplete('projekt', 'projektname', 1);
$this->app->Tpl->Parse('PAGE','api_account_list.tpl');
}
}
<?php
use Xentral\Components\Http\JsonResponse;
class Api_account
{
/** @var Application $app */
protected $app;
const MODULE_NAME = 'ApiAccount';
/** @var string[] $javascript */
public $javascript = [
'./classes/Modules/ApiAccount/www/js/api_account.js',
];
/**
* @param Application $app
* @param string $name
* @param array $erlaubtevars
*
* @return array
*/
public static function TableSearch($app, $name, $erlaubtevars)
{
switch($name)
{
case 'api_account_list':
$allowed['api_account'] = array('list');
$heading = array('API Account ID', 'Bezeichnung', 'Aktiv', 'Men&uuml;');
$width = array('10%', '79%', '10%', '1%');
$findcols = array('aa.id', 'bezeichnung', "if(aktiv = 1, 'ja','nein')", 'id');
$searchsql = array('bezeichnung');
$defaultorder = 1; //Optional wenn andere Reihenfolge gewuenscht
$defaultorderdesc = 1;
$menucol = 3;
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap><a data-id=\"%value%\" class=\"get\" href=\"#\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT aa.id, aa.id, aa.bezeichnung,
if(aa.aktiv = 1, 'ja','nein') as aktiv,
aa.id
FROM `api_account` AS `aa`
";
$fastcount = "SELECT COUNT(`aa`.`id`) FROM `api_account` AS `aa`";
break;
}
$erg = [];
foreach($erlaubtevars as $k => $v) {
if(isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
/**
* Api_account constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false)
{
$this->app=$app;
if($intern) {
return;
}
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","Api_AccountCreate");
$this->app->ActionHandler("edit","Api_AccountEdit");
$this->app->ActionHandler("list","Api_AccountList");
$this->app->ActionHandler("delete","Api_AccountDelete");
$this->app->DefaultActionHandler('list');
$this->app->ActionHandlerListen($app);
}
function Api_AccountCreate(){
}
function Api_AccountEdit(){
}
public function Api_AccountDelete(){
$id = $this->app->Secure->GetGET('id');
$this->app->DB->Delete(sprintf('DELETE FROM `api_account` WHERE `id` = %d', $id));
$this->app->Location->execute('index.php?module=api_account&action=list');
}
/**
* @return JsonResponse
*/
public function HandleGetAjaxAction()
{
$id = (int)$this->app->Secure->GetPOST('id');
if($id === 0) {
$data = [
'aktiv' => 0,
'id' => '',
'bezeichnung' => '',
'projekt' => '',
'remotedomain' => '',
'initkey' => '',
'importwarteschlange' => 0,
'importwarteschlange_name' => '',
'event_url' => '',
'cleanutf8' => 0,
'apitempkey' => '',
'ishtmltransformation' => 0,
];
return new JsonResponse($data);
}
if($id > 0) {
$data = $this->app->DB->SelectRow(
sprintf(
"SELECT a.id, a.bezeichnung, a.aktiv, p.abkuerzung AS `projekt`, a.remotedomain, a.initkey,
a.importwarteschlange, a.importwarteschlange_name, a.cleanutf8, a.event_url, a.permissions, a.ishtmltransformation
FROM `api_account` AS `a`
LEFT JOIN `projekt` AS `p` ON a.projekt = p.id
WHERE a.id = %d",
$id
)
);
/** @var Api $api */
$api = $this->app->loadModule('api');
$data['apitempkey'] = $api->generateHashFromDomainAndKey($data['initkey'], $data['remotedomain']);
if(!empty($data)) {
return new JsonResponse($data);
}
}
return new JsonResponse(['error'=>'Account nicht gefunden'], JsonResponse::HTTP_BAD_REQUEST);
}
/**
* @return JsonResponse
*/
public function HandleSaveAjaxAction()
{
if(!$this->app->erp->RechteVorhanden('api_account', 'edit')) {
return new JsonResponse(['error'=>'Fehlende Rechte'], JsonResponse::HTTP_BAD_REQUEST);
}
$id = (int)$this->app->Secure->GetPOST('id');
$bezeichnung = $this->app->Secure->GetPOST('bezeichnung');
if(empty($bezeichnung)) {
return new JsonResponse(['error'=>'Bitte füllen Sie die Bezeichnung aus'], JsonResponse::HTTP_BAD_REQUEST);
}
$projekt = (string)$this->app->Secure->GetPOST('projekt');
if($projekt !== ''){
$projekt = (int)$this->app->erp->ReplaceProjekt(1, $projekt, 1);
}
else {
$projekt = 0;
}
$aktiv = (int)(bool)$this->app->Secure->GetPOST('aktiv');
$importwarteschlange = (int)(bool)$this->app->Secure->GetPOST('importwarteschlange');
$cleanutf8 = (int)(bool)$this->app->Secure->GetPOST('cleanutf8');
$remotedomain = $this->app->Secure->GetPOST('remotedomain');
$initkey = $this->app->Secure->GetPOST('initkey');
$importwarteschlange_name = $this->app->Secure->GetPOST('importwarteschlange_name');
$event_url = $this->app->Secure->GetPOST('event_url');
$isHtmlTransformation = (int)(bool)$this->app->Secure->GetPOST('ishtmltransformation');
$api_permissions = $this->prepareApiPermissions($this->app->Secure->GetPOST('api_permissions'));
if($id <= 0) {
$this->app->DB->Insert(
sprintf(
"INSERT INTO `api_account`
(`bezeichnung`, `initkey`, `importwarteschlange_name`, `event_url`, `remotedomain`, `aktiv`,
`importwarteschlange`, `cleanutf8`, `uebertragung_account`, `projekt`, `permissions`, `ishtmltransformation`)
VALUES ('%s', '%s', '%s', '%s', '%s', %d,
%d, %d, 0, %d, '%s', %d) ",
$bezeichnung, $initkey, $importwarteschlange_name, $event_url, $remotedomain, $aktiv,
$importwarteschlange, $cleanutf8, $projekt, $api_permissions, $isHtmlTransformation
)
);
$id = (int)$this->app->DB->GetInsertID();
if($id){
$data = ['success' => true, 'id' => $id];
return new JsonResponse($data);
}
return new JsonResponse(['error'=>'Account konnte nicht erstellt werden'], JsonResponse::HTTP_BAD_REQUEST);
}
$data = $this->app->DB->SelectRow(
sprintf(
"SELECT a.id, a.bezeichnung, a.aktiv, p.abkuerzung AS `projekt`, a.remotedomain, a.initkey,
a.importwarteschlange, a.importwarteschlange_name, a.cleanutf8, a.event_url, a.permissions, a.ishtmltransformation
FROM `api_account` AS `a`
LEFT JOIN `projekt` AS `p` ON a.projekt = p.id
WHERE a.id = %d",
$id
)
);
if(empty($data)) {
return new JsonResponse(['error'=>'Account nicht gefunden'], JsonResponse::HTTP_BAD_REQUEST);
}
$this->app->DB->Update(
sprintf(
"UPDATE `api_account`
SET `bezeichnung` = '%s',
`initkey` = '%s',
`importwarteschlange_name` = '%s',
`event_url` = '%s',
`remotedomain` = '%s',
`aktiv` = %d,
`importwarteschlange` = %d,
`cleanutf8` = %d,
`uebertragung_account` = 0,
`projekt` = %d ,
`permissions` = '%s',
`ishtmltransformation` = %d
WHERE `id` = %d",
$bezeichnung, $initkey, $importwarteschlange_name, $event_url, $remotedomain, $aktiv,
$importwarteschlange, $cleanutf8, $projekt, $api_permissions, $isHtmlTransformation, $id
)
);
if(empty($this->app->DB->error())) {
$data = ['success' => true, 'id' => $id];
return new JsonResponse($data);
}
return new JsonResponse(['error'=>'Account konnte nicht geändert werden'], JsonResponse::HTTP_BAD_REQUEST);
}
private function prepareApiPermissions(array $apiPermissions){
$cleanedPermissions = [];
foreach ($apiPermissions as $permission => $value){
if($value === 'true'){
$cleanedPermissions[] = $permission;
}
}
return json_encode($cleanedPermissions);
}
public function Api_AccountList(){
$cmd = $this->app->Secure->GetGET('cmd');
if($cmd === 'get') {
return $this->HandleGetAjaxAction();
}
if($cmd === 'save') {
return $this->HandleSaveAjaxAction();
}
$apiPermissions = $this->app->DB->SelectArr("SELECT * FROM `api_permission`");
$groupedApiPermissions = [];
foreach ($apiPermissions as $apiPermission){
$groupedApiPermissions[$apiPermission['group']][] =$apiPermission;
}
$apiPermissionsHtml = '';
foreach ($groupedApiPermissions as $group => $permissions) {
$apiPermissionsHtml .= '<tr>';
$apiPermissionsHtml .= "<td>{$group}</td>";
$apiPermissionsHtml .= "<td>";
foreach ($permissions as $permission){
$apiPermissionsHtml .= "<label for='{$permission['key']}'>";
$apiPermissionsHtml .= "<input class='permission-checkbox' type='checkbox' name='{$permission['key']}'>";
$apiPermissionsHtml .= "&nbsp;&nbsp;{$permission['key']}</label>";
$apiPermissionsHtml .= "<br>";
}
$apiPermissionsHtml .= "</td>";
$apiPermissionsHtml .= '</tr>';
}
$this->app->YUI->TableSearch('TAB1','api_account_list', 'show','','',basename(__FILE__), __CLASS__);
$this->app->erp->MenuEintrag('#', 'Neu');
$this->app->erp->MenuEintrag('index.php?module=api_account&action=list', '&Uuml;bersicht');
$this->app->erp->Headlines('API Account');
$this->app->Tpl->Set('API_PERMISSIONS_HTML', $apiPermissionsHtml);
$this->app->YUI->Autocomplete('projekt', 'projektname', 1);
$this->app->Tpl->Parse('PAGE','api_account_list.tpl');
}
}

View File

@ -1800,35 +1800,22 @@ class Artikel extends GenArtikel {
// SQL statement
if (!empty($this->app->Conf->WFdbType) && $this->app->Conf->WFdbType == 'postgre') {
$sql = 'SELECT
s.id,
a.name_de as artikel,
a.nummer as nummer,
trim(SUM(s.menge))+0 as menge,
CASE
WHEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id) > 0
THEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id)
ELSE 0
END as lager,
s.artikel as menu
$sql = 'SELECT s.id, a.name_de as artikel,a.nummer as nummer, trim(s.menge)+0 as menge,
CASE WHEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id) > 0
THEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id)
ELSE 0
END as lager, s.artikel as menu
FROM stueckliste s LEFT JOIN artikel a ON s.artikel=a.id ';
} else {
$sql = ' SELECT SQL_CALC_FOUND_ROWS
s.id,
a.name_de as artikel,
a.nummer as nummer,
trim(SUM(s.menge))+0 as menge,
s.stuecklistevonartikel AS menu
FROM
stueckliste s
LEFT JOIN artikel a ON s.stuecklistevonartikel=a.id ';
$sql = 'SELECT SQL_CALC_FOUND_ROWS s.id, a.name_de as artikel,a.nummer as nummer, trim(s.menge)+0 as menge,
s.stuecklistevonartikel
as menu
FROM stueckliste s LEFT JOIN artikel a ON s.stuecklistevonartikel=a.id ';
}
// Fester filter
$where = "s.artikel='$id' ";
$groupby = " GROUP BY a.id";
// gesamt anzahl
$count = "SELECT COUNT(s.id) FROM stueckliste s WHERE s.stuecklistevonartikel='$id' ";
break;

View File

@ -1990,52 +1990,8 @@ class Auftrag extends GenAuftrag
$gebuchtezeit = str_replace(".", ",", round($gebuchtezeit,2));
}
$summebrutto = $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$id' LIMIT 1");
// Deckungsbeitrag
if (!$this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$this->app->Tpl->Set('DBHIDDEN','hidden');
} else {
$sql = "
SELECT
umsatz_netto_gesamt,
artikel,
menge,
einkaufspreis
FROM
`auftrag_position`
WHERE
`auftrag` = ".$id."
";
$positionen = $this->app->DB->SelectArr($sql);
$umsatz_gesamt = 0;
$kosten_gesamt = 0;
$db_gesamt = 0;
foreach ($positionen as $position) {
if (empty($position['einkaufspreis'])) {
$position['einkaufspreis'] = $this->app->erp->GetEinkaufspreis($position['artikel'],$position['menge']);
}
$kosten = ($position['einkaufspreis']*$position['menge']);
$db_gesamt += $position['umsatz_netto_gesamt']-$kosten;
$kosten_gesamt += $kosten;
$umsatz_gesamt += $position['umsatz_netto_gesamt'];
}
$this->app->Tpl->Set('NETTOGESAMT',$this->app->erp->number_format_variable($umsatz_gesamt,2));
$this->app->Tpl->Set('KOSTEN',$this->app->erp->number_format_variable($kosten_gesamt,2));
$this->app->Tpl->Set('DECKUNGSBEITRAG',$this->app->erp->number_format_variable($db_gesamt,2));
$this->app->Tpl->Set( 'DBPROZENT',
$umsatz_gesamt==0?
"-":
$this->app->erp->number_format_variable(
round(
$db_gesamt/$umsatz_gesamt*100,2
)
)."%"
);
}
$this->app->Tpl->Set('DECKUNGSBEITRAG',0);
$this->app->Tpl->Set('DBPROZENT',0);
$this->app->Tpl->Set('GEBUCHTEZEIT',0);
if($auftragArr[0]['ust_befreit']==0){
@ -2314,7 +2270,7 @@ class Auftrag extends GenAuftrag
}
$this->app->Tpl->Set('PREISANFRAGE', implode('<br />', $priceRequestsHtml));
}
/*
$tmpVersand = !$hasDeliveryNotes?[]: $this->app->DB->SelectFirstCols(
"SELECT if(v.versendet_am!='0000-00-00',
CONCAT(DATE_FORMAT( v.versendet_am,'%d.%m.%Y'),' ',v.versandunternehmen),
@ -2397,39 +2353,6 @@ class Auftrag extends GenAuftrag
else {
$this->app->Tpl->Set('TRACKING',$tmpVersand);
}
*/
$sql = "SELECT SQL_CALC_FOUND_ROWS
v.id,
v.tracking as tracking,
v.tracking_link
FROM
versandpakete v
LEFT JOIN
versandpaket_lieferschein_position vlp ON v.id = vlp.versandpaket
LEFT JOIN
lieferschein_position lp ON lp.id = vlp.lieferschein_position
LEFT JOIN
lieferschein l ON lp.lieferschein = l.id
LEFT JOIN
lieferschein lop ON lop.id = v.lieferschein_ohne_pos
WHERE
l.auftragid = ".$id." OR lop.auftragid = ".$id."
GROUP BY
v.id
";
$tracking = $this->app->DB->SelectArr($sql);
$tracking_list = array();
foreach ($tracking as $single_tracking) {
$tracking_list[] = '<a href="index.php?module=versandpakete&action=edit&id='.$single_tracking['id'].'">Paket Nr.'.$single_tracking['id'].'</a>'.
' ('.'<a href="'.$single_tracking['tracking_link'].'">'.$single_tracking['tracking'].'</a>'.')';
}
$this->app->Tpl->Set('TRACKING',implode('<br>',$tracking_list));
$icons = $this->app->YUI->IconsSQL();
@ -4993,10 +4916,6 @@ class Auftrag extends GenAuftrag
$this->app->erp->AdresseAlsLieferadresseButton($adresse);
}
if ($schreibschutz != 1 AND $status != 'abgeschlossen') {
$this->app->erp->BerechneDeckungsbeitrag($id,'auftrag');
}
if($nummer!='') {
$this->app->Tpl->Set('NUMMER',$nummer);
if($this->app->erp->RechteVorhanden('adresse','edit')){
@ -5775,13 +5694,8 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
}
$this->app->DB->Update("UPDATE lieferschein SET
belegnr='$ls_belegnr',
status='freigegeben',
versand='".$this->app->User->GetDescription()."',
versand_status = 1
WHERE id='$lieferschein' LIMIT 1");
// Versand_status: 1 = process in versandpakete, 2 = finished, 3 = finished manually
belegnr='$ls_belegnr', status='freigegeben', versand='".$this->app->User->GetDescription()."'
WHERE id='$lieferschein' LIMIT 1");
$this->app->erp->LieferscheinProtokoll($lieferschein, 'Lieferschein freigegeben');
@ -6428,7 +6342,7 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=list','&Uuml;bersicht');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=create','Neuen Auftrag anlegen');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=offene','Offene Positionen');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=versandzentrum','Versand&uuml;bergabe');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=versandzentrum','Versandzentrum');
if(strlen($backurl)>5){
$this->app->erp->MenuEintrag("$backurl", 'Zur&uuml;ck zur &Uuml;bersicht');
@ -6473,7 +6387,7 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
$this->AuftraguebersichtMenu();
$targetMessage = 'AUTOVERSANDBERECHNEN';
$this->app->Tpl->Add('MESSAGE','<div class="info">Auftr&auml;ge an Versand übergeben mit automatischem Druck und Mailversand. <a class="button" href="index.php?module=versandpakete&action=lieferungen">Zum Versand</a></div>');
$this->app->Tpl->Add('MESSAGE','<div class="info">Auftr&auml;ge an Versand übergeben mit automatischem Druck und Mailversand.</div>');
$autoshipmentEnabled = true;
$this->app->erp->RunHook('OrderAutoShipment', 2, $targetMessage, $autoshipmentEnabled);

View File

@ -1,238 +0,0 @@
<?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
class Belegevorlagen
{
static function TableSearch(&$app, $name, $erlaubtevars)
{
switch($name)
{
case "belegevorlagen_list":
$heading = array('Bezeichnung','Belegtyp','Projekt','Men&uuml;');
$width = array('40%','20%','29%','1%');
$findcols = array('b.bezeichnung','b.belegtyp','pr.abkuerzung','b.id');
$searchsql = array('b.bezeichnung','b.belegtyp','pr.abkuerzung');
$menu = "<table><tr><td nowrap><a href=\"#\" onclick=\"deletevorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS b.id, b.bezeichnung,CONCAT(UCASE(LEFT(b.belegtyp, 1)), SUBSTRING(b.belegtyp, 2)), pr.abkuerzung, b.id FROM belegevorlagen b LEFT JOIN projekt pr ON b.projekt = pr.id";
$where = $app->erp->ProjektRechte('b.projekt');
break;
case "belegevorlagen_list2":
$belegtyp = $app->Secure->GetGET('smodule');
$heading = array('Bezeichnung','Projekt','Men&uuml;');
$width = array('50%','49%','1%');
$findcols = array('b.bezeichnung','pr.abkuerzung','b.id');
$searchsql = array('b.bezeichnung','pr.abkuerzung');
$menu = "<table><tr><td nowrap><a href=\"#\" onclick=\"loadbelegvorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=\"deletevorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS b.id, b.bezeichnung, pr.abkuerzung, b.id FROM belegevorlagen b LEFT JOIN projekt pr ON b.projekt = pr.id";
$where = "belegtyp = '$belegtyp' ".$app->erp->ProjektRechte('b.projekt');
break;
}
$erg = false;
foreach($erlaubtevars as $k => $v)
{
if(isset($$v))$erg[$v] = $$v;
}
return $erg;
}
function __construct(&$app, $intern = false)
{
$this->app=&$app;
$this->artikel = $this->app->erp->GetKonfiguration('gesamtrabatt_artikel');
if($intern)return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list","BelegevorlagenList");
$this->app->ActionHandler("einstellungen","BelegevorlagenEinstellungen");
$this->app->DefaultActionHandler("list");
$this->app->ActionHandlerListen($app);
}
function BelegevorlagenMenu(){
$this->app->erp->MenuEintrag("index.php?module=belegevorlagen&action=list","&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=belegevorlagen&action=einstellungen","Einstellungen");
}
function BelegevorlagenList()
{
if($this->app->Secure->GetGET('cmd') == 'delvorlage')
{
$id = (int)$this->app->Secure->GetPOST('lid');
$this->app->DB->Delete("DELETE FROM belegevorlagen WHERE id = '$id' LIMIT 1");
echo json_encode(array('status'=>1));
exit;
}
$this->BelegevorlagenMenu();
$this->app->YUI->TableSearch('TAB1', "belegevorlagen_list", "show","","",basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE','belegevorlagen_list.tpl');
}
function BelegevorlagenEinstellungen()
{
$this->BelegevorlagenMenu();
$this->app->Tpl->Set('PREISEAKTUALISIEREN',$this->app->erp->GetKonfiguration('belegevorlagen_preiseaktualisieren')=='on'?'checked':'');
$this->app->YUI->AutoSaveKonfiguration('preiseaktualisieren','belegevorlagen_preiseaktualisieren');
$this->app->Tpl->Parse('PAGE','belegevorlagen_einstellungen.tpl');
}
function Install()
{
$this->app->erp->CheckTable('belegevorlagen');
$this->app->erp->CheckColumn("id","int(11)","belegevorlagen","DEFAULT '0' NOT NULL AUTO_INCREMENT");
$this->app->erp->CheckColumn("belegtyp", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("bezeichnung", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("projekt", "int(11)", "belegevorlagen", "DEFAULT '0' NOT NULL");
$this->app->erp->CheckColumn("json", "MEDIUMTEXT", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("bearbeiter", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("zeitstempel", "timestamp", "belegevorlagen","DEFAULT CURRENT_TIMESTAMP NOT NULL");
$this->app->erp->RegisterHook('BelegPositionenButtons', 'belegevorlagen', 'BelegevorlagenBelegPositionenButtons');
$this->app->erp->RegisterHook('AARLGPositionen_cmds_end', 'belegevorlagen', 'BelegevorlagenAARLGPositionen_cmds_end');
$this->app->erp->RegisterHook('ajax_filter_hook1', 'belegevorlagen', 'Belegevorlagenajax_filter_hook1');
}
function Belegevorlagenajax_filter_hook1($filtername,&$newarr, $term, $term2, $term3)
{
if($filtername == 'belegvorlagen')
{
$arr = $this->app->DB->SelectArr("SELECT CONCAT(b.id,' ',b.bezeichnung) as bezeichnung FROM belegevorlagen b
WHERE (b.bezeichnung LIKE '%$term%') ".$this->app->erp->ProjektRechte('b.projekt'));
if($arr)
{
for($i=0;$i<count($arr);$i++)
$newarr[] = $arr[$i]['bezeichnung'];
}
}
}
function BelegevorlagenBelegPositionenButtons($target, $module, $id)
{
if($module=="angebot" || $module=="auftrag" || $module=="rechnung" || $module=="lieferschein" || $module=="gutschrift" || $module=="proformarechnung")
{
$this->app->Tpl->Set('ID', $id);
$this->app->Tpl->Set('MODULE', $module);
$this->app->YUI->AutoComplete('bestehendevorlage','belegvorlagen');
$this->app->YUI->TableSearch('BELEGEVORLAGENTABELLE', "belegevorlagen_list2", "show","","",basename(__FILE__), __CLASS__);
$this->app->Tpl->Add($target, "<input type=\"button\" id=\"belegevorlagen\" value=\"Belegevorlagen\">&nbsp;".$this->app->Tpl->Parse($target,'belegevorlagen_widget.tpl'));
}
}
function BelegevorlagenAARLGPositionen_cmds_end($id){
$module = $this->app->Secure->GetGET('module');
if(!$module)return;
$projekt = $this->app->DB->Select("SELECT projekt FROM $module WHERE id='$id' LIMIT 1");
if($projekt <=0) $projekt=0;
if($this->app->Secure->GetGET('cmd') == 'deletebelegvorlage')
{
$status = 1;
$lid = (int)$this->app->Secure->GetPOST('lid');
$this->app->DB->Delete("DELETE FROM belegevorlagen WHERE id = '$lid' AND belegtyp = '$module' LIMIT 1");
echo json_encode(array('status'=>$status));
exit;
}
if($this->app->Secure->GetGET('cmd') == 'loadbelegvorlage')
{
$status = 0;
$lid = (int)$this->app->Secure->GetPOST('lid');
$json = (String)$this->app->DB->Select("SELECT json FROM belegevorlagen WHERE id = '$lid' AND belegtyp = '$module' LIMIT 1");
if($json !== '')
{
$json = json_decode($json, true);
$maxsort = (int)$this->app->DB->Select("SELECT max(sort) FROM $module"."_position WHERE $module = '$id' LIMIT 1");
if(isset($json['positionen']))
{
foreach($json['positionen'] as $v)
{
$v[$module] = $id;
if($this->app->erp->GetKonfiguration('belegevorlagen_preiseaktualisieren')=='on'){
if($v['artikel'] != '0'){
$v['preis'] = $this->app->erp->GetVerkaufspreis($v['artikel'],$v['menge']);
}
}
$v['sort'] += $maxsort;
$this->app->DB->Insert("INSERT INTO $module"."_position (id) VALUES ('')");
$idnew = $this->app->DB->GetInsertID();
$oldtonew[$v['id']] = $idnew;
if($v['explodiert_parent'] && isset($oldtonew) && isset($oldtonew[$v['explodiert_parent']]))$v['explodiert_parent'] = $oldtonew[$v['explodiert_parent']];
unset($v['id']);
$this->app->DB->UpdateArr($module.'_position',$idnew,"id",$v, true);
if(is_null($v['steuersatz']))$this->app->DB->Update("UPDATE ".$module."_position SET steuersatz = NULL WHERE id = '$idnew' LIMIT 1");
}
}
if(isset($json['zwischenpositionen']))
{
$maxpos = $this->app->DB->SelectArr("SELECT id,sort FROM beleg_zwischenpositionen WHERE doctype = '$module' AND doctypeid = '$id' AND pos='$maxsort' ORDER BY sort DESC LIMIT 1");
if($maxpos)
{
$sortoffset = 1 + $maxpos[0]['sort'];
}else{
$sortoffset = 0;
}
foreach($json['zwischenpositionen'] as $v)
{
if($v['pos'] == 0)$v['sort'] += $sortoffset;
$v['doctypeid'] = $id;
$v['pos'] += $maxsort;
unset($v['id']);
$this->app->DB->Insert("INSERT INTO beleg_zwischenpositionen (id) VALUES ('')");
$idnew = $this->app->DB->GetInsertID();
$this->app->DB->UpdateArr('beleg_zwischenpositionen',$idnew,"id",$v, true);
}
}
$status = 1;
$this->app->erp->ANABREGSNeuberechnen($id,$module);
}
echo json_encode(array('status'=>$status));
exit;
}
if($this->app->Secure->GetGET('cmd') == 'savebelegevorlage')
{
$json = null;
$status = 0;
$bestehendevorlage = (int)reset(explode(' ',$this->app->Secure->GetPOST('bestehendevorlage')));
$bezeichnung = (String)$this->app->Secure->GetPOST('bezeichnung');
$vorlagetyp = $this->app->Secure->GetPOST('vorlagetyp');
$bearbeiter = $this->app->DB->real_escape_string($this->app->User->GetName());
$lid = null;
if($vorlagetyp == 'neu')
{
if($bezeichnung !== '')
{
$this->app->DB->Insert("INSERT INTO belegevorlagen (bezeichnung, belegtyp, bearbeiter, zeitstempel,projekt) VALUES ('$bezeichnung','$module','$bearbeiter',now(),'$projekt')");
$lid = $this->app->DB->GetInsertID();
}
}else{
$lid = $this->app->DB->Select("SELECT id FROM belegevorlagen WHERE id = '$bestehendevorlage' LIMIT 1");
if($lid && $bezeichnung !== '')$this->app->DB->Update("UPDATE belegevorlagen set bezeichnung = '$bezeichnung' WHERE id = '$bestehendevorlage' LIMIT 1");
}
if($lid)
{
$json['positionen'] = $this->app->DB->SelectArr("SELECT * FROM $module"."_position WHERE $module = '$id' ORDER BY sort");
$json['zwischenpositionen'] = $this->app->DB->SelectArr("SELECT * FROM beleg_zwischenpositionen WHERE doctype = '$module' AND doctypeid = '$id' ORDER BY pos, sort");
$json = $this->app->DB->real_escape_string(json_encode($json));
$this->app->DB->Update("UPDATE belegevorlagen set json = '$json', zeitstempel = now(), bearbeiter = '$bearbeiter' WHERE id = '$lid' LIMIT 1");
$status = 1;
}
echo json_encode(array('status'=>$status));
exit;
}
}
}
?>

View File

@ -45,25 +45,7 @@
</div>
</div>
<div style="background-color:white" [DBHIDDEN]>
<h2 class="greyh2">{|Deckungsbeitrag (netto)|}</h2>
<table width="100%">
<tbody>
<tr>
<td>Umsatz EUR</td>
<td>Kosten EUR</td>
<td>Deckungsbeitrag EUR</td>
<td>DB %</td>
</tr>
<tr>
<td class="greybox" width="25%">[NETTOGESAMT]</td>
<td class="greybox" width="25%">[KOSTEN]</td>
<td class="greybox" width="25%">[DECKUNGSBEITRAG]</td>
<td class="greybox" width="25%">[DBPROZENT]</td>
</tr>
</tbody>
</table>
</div>
<div style="background-color:white">
<h2 class="greyh2">Protokoll</h2>
@ -77,6 +59,12 @@
[PDFARCHIV]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Deckungsbeitrag</h2>
<div style="padding:10px">
<div class="info">Dieses Modul ist erst ab Version Professional verfügbar</div>
</div>
</div>
</div>

View File

@ -37,7 +37,7 @@
<tr><td class="auftraginfo_cell">{|Bestellung|}:</td><td class="auftraginfo_cell" >[BESTELLUNG]</td><td class="auftraginfo_cell">{|Eigene Umsatzsteuer ID|}:</td><td class="auftraginfo_cell">[DELIVERYTHRESHOLDVATID]</td></tr>
<tr><td class="auftraginfo_cell">{|Retoure|}:</td><td class="auftraginfo_cell" >[RETOURE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Preisanfrage|}:</td><td class="auftraginfo_cell" >[PREISANFRAGE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Pakete|}:</td><td class="auftraginfo_cell" >[TRACKING]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Tracking|}:</td><td class="auftraginfo_cell" >[TRACKING]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
</table>
<table width="100%">
@ -48,14 +48,19 @@
<td style="" width="50%">[VERSANDTEXT]</td>
[RMAENDIF]
</tr>
</table>
<div style="background-color:white">
<div style="padding:10px">
[RECHNUNGLIEFERADRESSE]
</div>
</div>
</div>
<div style="float:left; width:50%">
<div style="overflow:auto;max-height:550px;">
<div style="background-color:white;">
<h2 class="greyh2">Artikel</h2>
@ -64,55 +69,63 @@
<i style="color:#999">* Die linke Zahl zeigt die für den Kunden reservierten Einheiten und die rechte Zahl die global reservierte Anzahl.</i>
</div>
</div>
[MINIDETAILNACHARTIKEL]
<div style="background-color:white" [DBHIDDEN]>
<h2 class="greyh2">{|Deckungsbeitrag (netto)|}</h2>
<table width="100%">
<tbody>
<tr>
<td>Umsatz EUR</td>
<td>Kosten EUR</td>
<td>Deckungsbeitrag EUR</td>
<td>DB %</td>
</tr>
<tr>
<td class="greybox" width="25%">[NETTOGESAMT]</td>
<td class="greybox" width="25%">[KOSTEN]</td>
<td class="greybox" width="25%">[DECKUNGSBEITRAG]</td>
<td class="greybox" width="25%">[DBPROZENT]</td>
</tr>
</tbody>
</table>
<!--
<div style="background-color:white;">
<h2 class="greyh2">Lieferkette</h2>
<div style="padding:10px">
<table class="mkTable">
<tr><th>Art</th><th>Beleg</th><th>Datum</th><th>Lieferant</th><th>Status</th></tr>
<tr><td>Bestellung</td><td>ENTWURF</td><td></td><td>In-Circuit<br>200 x 777777 SMT USBprog 1)</td><td>-</td></tr>
<tr><td>Anlieferung</td><td>200000</td><td></td><td>In-Circuit<br>200 x 777777 ATMEGA32</td><td>offen</td></tr>
<tr><td>Bestellung</td><td>100023</td><td></td><td>Instanet<br>200 x USBprog 5.0 Spezial Elektor<br>200 x 777777 Flashen + Montieren</td><td>offen</td></tr>
<tr><td>Anlieferung</td><td>200002</td><td></td><td>Instanet<br>200 x 777777 SMT USBprog 1)<br>200 x 122222 Gehäuse</td><td>offen</td></tr>
</table>
</div>
</div>
-->
<div style="background-color:white">
<h2 class="greyh2">{|Zahlungen|}</h2>
<div style="padding:10px">
[ZAHLUNGEN]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">{|Protokoll|}</h2>
<div style="padding:10px;">
[PROTOKOLL]
</div>
</div>
[VORPRODUKTIONPROTOKOLL]
[PRODUKTIONPROTOKOLL]
[NACHPRODUKTIONPROTOKOLL]
<!--
<div style="background-color:white">
<h2 class="greyh2">{|RMA Prozess|}</h2>
<div style="padding:10px">
[RMA]
</div>
<h2 class="greyh2">{|RMA Prozess|}</h2>
<div style="padding:10px">
[RMA]
</div>
</div>
-->
<div style="background-color:white">
<h2 class="greyh2">{|PDF-Archiv|}</h2>
<div style="padding:10px;overflow:auto;">
[PDFARCHIV]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">{|Deckungsbeitrag|}</h2>
<div style="padding:10px">
<div class="info">{|Dieses Modul ist erst ab Version Professional verfügbar|}</div>
</div>
</div>
[INTERNEBEMERKUNGEDIT]
</div>
</div>

View File

@ -1,20 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<div id="tabs-1">
[MESSAGE]
<fieldset>
<legend>Einstellungen</legend>
<input type="checkbox" name="preiseaktualisieren" id="preiseaktualisieren" [PREISEAKTUALISIEREN] /> <label for="preiseaktualisieren">Aktuelle Artikelpreise verwenden wenn Belegvorlage geladen wird.</label>
</fieldset>
[TAB1]
[TAB1NEXT]
</div>
<!-- tab view schließen -->
</div>

View File

@ -1,38 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<div id="tabs-1">
[MESSAGE]
[TAB1]
[TAB1NEXT]
</div>
<!-- tab view schließen -->
</div>
<script type="text/javascript">
function deletevorlage(belegid)
{
if(confirm('Vorlage wirklich löschen?'))
{
$('#belegevorlagendiv').dialog('close');
$.ajax({
url: 'index.php?module=belegevorlagen&action=list&cmd=delvorlage',
type: 'POST',
dataType: 'json',
data: {lid:belegid},
success: function(data) {
var oTable = $('#belegevorlagen_list').DataTable( );
oTable.ajax.reload();
},
beforeSend: function() {
}
});
}
}
</script>

View File

@ -1,346 +1,179 @@
<div id="tabs">
<ul>
<li>
<a href="#tabs-1"></a>
</li>
</ul>
<!-- Example for multiple 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>{|Allgemein|}</legend>
<input type="submit" name="submit" value="Speichern" style="float:right" />
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td width="200">{|E-Mail-Adresse|}:</td>
<td>
<input type="text" name="email" value="[EMAIL]" size="40">
</td>
</tr>
<tr>
<td>{|Angezeigter Name|}:</td>
<td>
<input type="text" name="angezeigtername" value="[ANGEZEIGTERNAME]" size="40">
</td>
</tr>
<tr>
<td>{|Interne Beschreibung|}:</td>
<td>
<input type="text" name="internebeschreibung" value="[INTERNEBESCHREIBUNG]" size="40">
</td>
</tr>
<tr>
<td>{|Benutzername|}:</td>
<td>
<input type="text" name="benutzername" value="[BENUTZERNAME]" size="40">
</td>
</tr>
<tr>
<td>{|Passwort|}:</td>
<td>
<input type="password" name="passwort" value="[PASSWORT]" size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|SMTP|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td width="200">{|SMTP benutzen|}:</td>
<td>
<input type="checkbox" name="smtp_extra" value="1" [SMTP_EXTRA]>
</td>
</tr>
<tr>
<td>{|Server|}:</td>
<td>
<input type="text" name="smtp" value="[SMTP]" size="40">
</td>
</tr>
<tr>
<td>{|Verschl&uuml;sselung|}:</td>
<td>
<select name="smtp_ssl">
[SMTP_SSL_SELECT]
</select>
</td>
</tr>
<tr>
<td>{|Port|}:</td>
<td>
<input type="text" name="smtp_port" value="[SMTP_PORT]" size="40">
</td>
</tr>
<tr>
<td>{|Authtype|}:</td>
<td>
<select name="smtp_authtype">
[SMTP_AUTHTYPE_SELECT]
</select>
</td>
</tr>
<tr>
<td>{|Authparam|}:</td>
<td>
<input type="text" name="smtp_authparam" value="[SMTP_AUTHPARAM]" size="40">
</td>
</tr>
<tr>
<td>{|Client alias|}:</td>
<td>
<input type="text" name="client_alias" value="[CLIENT_ALIAS]" size="40">
</td>
</tr>
<tr>
<td>{|SMTP Debug|}:</td>
<td>
<input type="checkbox" name="smtp_loglevel" value="1" [SMTP_LOGLEVEL]>
</td>
</tr>
<tr>
<td width="50">Testmail:</td>
<td>
<input type="submit" form="smtp_test" value="Testmail senden" id="testmail-senden-button">&nbsp;<i>Bitte erst speichern und dann senden!</i>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|IMAP|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td width="200">{|IMAP server|}:</td>
<td>
<input type="text" name="server" value="[SERVER]" size="40">
</td>
</tr>
<tr>
<td>{|Gesendete Mails in IMAP-Ordner legen|}:</td>
<td>
<input type="checkbox" name="imap_sentfolder_aktiv" value="1" [IMAP_SENTFOLDER_AKTIV]>
</td>
</tr>
<tr>
<td>{|IMAP-Ordner|}:</td>
<td>
<input type="text" name="imap_sentfolder" value="[IMAP_SENTFOLDER]" size="40">
</td>
</tr>
<tr>
<td>{|IMAP-Port|}:</td>
<td>
<input type="text" name="imap_port" value="[IMAP_PORT]" size="40">
</td>
</tr>
<tr>
<td>{|IMAP-Typ|}:</td>
<td>
<select name="imap_type">
[IMAP_TYPE_SELECT]
</select>
</td>
</tr>
<tr>
<td width="50">Testmail:</td>
<td>
<input type="submit" form="imap_test" value="IMAP testen" id="testimap-button">&nbsp;<i>Bitte erst speichern und dann testen!</i>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Archiv|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td width="200">{|E-Mailarchiv aktiv|}:</td>
<td>
<input type="checkbox" name="emailbackup" value="1" [EMAILBACKUP]>
</td>
</tr>
<tr>
<td>{|Löschen nach wievielen Tagen?|}:</td>
<td>
<input type="text" name="loeschtage" value="[LOESCHTAGE]" size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Ticketsystem|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td width="200">{|Mails als Ticket importieren|}:</td>
<td>
<input type="checkbox" name="ticket" value="1" [TICKET]>
</td>
</tr>
<tr>
<td>{|Projekt f&uuml;r Ticket|}:</td>
<td>
<input type="text" id="ticketprojekt" name="ticketprojekt" value="[TICKETPROJEKT]" size="40">
</td>
</tr>
<tr>
<td>{|Warteschlange f&uuml;r Ticket|}:</td>
<td>
<input type="text" id="ticketqueue" name="ticketqueue" value="[TICKETQUEUE]" size="40">
</td>
</tr>
<tr>
<td>{|E-Mails ab Datum importieren|}:</td>
<td>
<input type="text" name="abdatum" id="abdatum" value="[ABDATUM]" size="40">
</td>
</tr>
<tr>
<td>{|E-Mail nach Import l&ouml;schen|}:</td>
<td>
<input type="checkbox" name="ticketloeschen" value="1" [TICKETLOESCHEN]>
</td>
</tr>
<tr>
<td>{|Ticket auf abgeschlossen setzen|}:</td>
<td>
<input type="checkbox" name="ticketabgeschlossen" value="1" [TICKETABGESCHLOSSEN]>
</td>
</tr>
<tr>
<td>{|Ausgehende E-Mailadresse|}:</td>
<td>
<input type="checkbox" name="ticketemaileingehend" value="1" [TICKETEMAILEINGEHEND]>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Sonstiges|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>{|Automatisch antworten|}:</td>
<td>
<input type="checkbox" name="autoresponder" value="1" [AUTORESPONDER]>
</td>
</tr>
<tr>
<td width="200">{|Nur eine Antwort pro Tag|}:</td>
<td>
<input type="checkbox" name="autosresponder_blacklist" value="1" [AUTOSRESPONDER_BLACKLIST]>
</td>
</tr>
<tr>
<td>{|Automatische Antwort Betreff|}:</td>
<td>
<textarea id="autoresponderbetreff" name="autoresponderbetreff" rows="6" style="width:100%;">[AUTORESPONDERBETREFF]</textarea>
</td>
</tr>
<tr>
<td>{|Automatische Antwort Text|}:</td>
<td>
<textarea id="autorespondertext" name="autorespondertext" rows="6" style="width:100%;">[AUTORESPONDERTEXT]</textarea>
</td>
</tr>
<tr>
<td>{|Eigene Signatur verwenden|}:</td>
<td>
<input type="checkbox" name="eigenesignatur" value="1" [EIGENESIGNATUR]>
</td>
</tr>
<tr>
<td>{|Signatur|}:</td>
<td>
<textarea id="signatur" name="signatur" rows="6" style="width:100%;">[SIGNATUR]</textarea>
</td>
</tr>
<tr>
<td>{|Adresse|}:</td>
<td>
<input type="text" id="adresse" name="adresse" value="[ADRESSE]" size="40">
</td>
</tr>
<tr>
<td>{|Projekt|}:</td>
<td>
<input type="text" id="projekt" name="projekt" value="[PROJEKT]" size="40">
</td>
</tr>
<tr>
<td>{|Firma|}:</td>
<td>
<input type="text" name="firma" value="[FIRMA]" size="40">
</td>
<tr>
<td>{|Gesch&auml;ftsbriefvorlage|}:</td>
<td>
<input type="text" name="geschaeftsbriefvorlage" value="[GESCHAEFTSBRIEFVORLAGE]" size="40">
</td>
</tr>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right" />
</form>
</div>
<form id="smtp_test" action="index.php">
<input type="text" name="module" value="emailbackup" style="display:none">
<input type="text" name="action" value="test_smtp" style="display:none">
<input type="text" name="id" value="[ID]" style="display:none">
<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>{|Allgemein|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|E-Mail-Adresse|}:</td><td><input type="text" name="email" value="[EMAIL]" size="40"></td></tr>
<tr><td>{|Angezeigter Name|}:</td><td><input type="text" name="angezeigtername" value="[ANGEZEIGTERNAME]" size="40"></td></tr>
<tr><td>{|Interne Beschreibung|}:</td><td><input type="text" name="internebeschreibung" value="[INTERNEBESCHREIBUNG]" size="40"></td></tr>
<tr><td>{|Benutzername|}:</td><td><input type="text" name="benutzername" value="[BENUTZERNAME]" size="40"></td></tr>
<tr><td>{|Passwort|}:</td><td><input type="password" name="passwort" value="[PASSWORT]" size="40"></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|SMTP|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|SMTP benutzen|}:</td><td><input type="text" name="smtp_extra" value="[SMTP_EXTRA]" size="40"><i>0 = nein, 1 = ja</i></td></tr>
<tr><td>{|Server|}:</td><td><input type="text" name="smtp" value="[SMTP]" size="40"></td></tr>
<tr><td>{|Verschl&uuml;sselung|}:</td><td><input type="text" name="smtp_ssl" value="[SMTP_SSL]" size="40"><i>0 = keine, 1 = TLS, 2 = SSL</i></td></tr>
<tr><td>{|Port|}:</td><td><input type="text" name="smtp_port" value="[SMTP_PORT]" size="40"></td></tr>
<tr><td>{|Authtype|}:</td><td><input type="text" name="smtp_authtype" value="[SMTP_AUTHTYPE]" size="40"><i>'', 'smtp', 'oauth_google'</i></td></tr>
<tr><td>{|Authparam|}:</td><td><input type="text" name="smtp_authparam" value="[SMTP_AUTHPARAM]" size="40"></td></tr>
<tr><td>{|Client_alias|}:</td><td><input type="text" name="client_alias" value="[CLIENT_ALIAS]" size="40"></td></tr>
<tr><td>{|Loglevel|}:</td><td><input type="text" name="smtp_loglevel" value="[SMTP_LOGLEVEL]" size="40"></td></tr>
<tr><td width="50">Testmail:</td><td>
<input type="submit" form="smtp_test" value="Testmail senden" id="testmail-senden-button">&nbsp;<i>Bitte erst speichern und dann senden!</i>
</td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|IMAP|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|IMAP server|}:</td><td><input type="text" name="server" value="[SERVER]" size="40"></td></tr>
<tr><td>{|imap_sentfolder_aktiv|}:</td><td><input type="text" name="imap_sentfolder_aktiv" value="[IMAP_SENTFOLDER_AKTIV]" size="40"></td></tr>
<tr><td>{|imap_sentfolder|}:</td><td><input type="text" name="imap_sentfolder" value="[IMAP_SENTFOLDER]" size="40"></td></tr>
<tr><td>{|imap_port|}:</td><td><input type="text" name="imap_port" value="[IMAP_PORT]" size="40"></td></tr>
<tr><td>{|imap_type|}:</td><td><input type="text" name="imap_type" value="[IMAP_TYPE]" size="40"><i>1 = standard, 3 = SSL, 5 = OAuth</i></td></tr>
<tr><td width="50">Testmail:</td><td>
<input type="submit" form="imap_test" value="IMAP testen" id="testimap-button">&nbsp;<i>Bitte erst speichern und dann testen!</i>
</td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Archiv|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|E-Mailarchiv aktiv|}:</td><td><input type="text" name="emailbackup" value="[EMAILBACKUP]" size="40"></td></tr>
<tr><td>{|Löschen nach wievielen Tagen?|}:</td><td><input type="text" name="loeschtage" value="[LOESCHTAGE]" size="40"></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Ticketsystem|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|ticket|}:</td><td><input type="text" name="ticket" value="[TICKET]" size="40"></td></tr>
<tr><td>{|ticketprojekt|}:</td><td><input type="text" id="ticketprojekt" name="ticketprojekt" value="[TICKETPROJEKT]" size="40"></td></tr>
<tr><td>{|ticketqueue|}:</td><td><input type="text" id="ticketqueue" name="ticketqueue" value="[TICKETQUEUE]" size="40"></td></tr>
<tr><td>{|abdatum|}:</td><td><input type="text" name="abdatum" value="[ABDATUM]" size="40"></td></tr>
<tr><td>{|ticketloeschen|}:</td><td><input type="text" name="ticketloeschen" value="[TICKETLOESCHEN]" size="40"></td></tr>
<tr><td>{|ticketabgeschlossen|}:</td><td><input type="text" name="ticketabgeschlossen" value="[TICKETABGESCHLOSSEN]" size="40"></td></tr>
<tr><td>{|ticketemaileingehend|}:</td><td><input type="text" name="ticketemaileingehend" value="[TICKETEMAILEINGEHEND]" size="40"></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Sonstiges|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|autosresponder_blacklist|}:</td><td><input type="text" name="autosresponder_blacklist" value="[AUTOSRESPONDER_BLACKLIST]" size="40"></td></tr>
<tr><td>{|eigenesignatur|}:</td><td><input type="text" name="eigenesignatur" value="[EIGENESIGNATUR]" size="40"></td></tr>
<tr><td>{|signatur|}:</td><td><textarea id="signatur" name="signatur" rows="6" style="width:100%;">[SIGNATUR]</textarea></td></tr>
<tr><td>{|adresse|}:</td><td><input type="text" id="adresse" name="adresse" value="[ADRESSE]" size="40"></td></tr>
<tr><td>{|firma|}:</td><td><input type="text" name="firma" value="[FIRMA]" size="40"></td></tr>
<tr><td>{|geloescht|}:</td><td><input type="text" name="geloescht" value="[GELOESCHT]" size="40"></td></tr>
<tr><td>{|mutex|}:</td><td><input type="text" name="mutex" value="[MUTEX]" size="40"></td></tr>
<tr><td>{|autoresponder|}:</td><td><input type="text" name="autoresponder" value="[AUTORESPONDER]" size="40"></td></tr>
<tr><td>{|geschaeftsbriefvorlage|}:</td><td><input type="text" name="geschaeftsbriefvorlage" value="[GESCHAEFTSBRIEFVORLAGE]" size="40"></td></tr>
<tr><td>{|autoresponderbetreff|}:</td><td><textarea id="autoresponderbetreff" name="autoresponderbetreff" rows="6" style="width:100%;">[AUTORESPONDERBETREFF]</textarea></td></tr>
<tr><td>{|autorespondertext|}:</td><td><textarea id="autorespondertext" name="autorespondertext" rows="6" style="width:100%;">[AUTORESPONDERTEXT]</textarea></td></tr>
<tr><td>{|projekt|}:</td><td><input type="text" id="projekt" name="projekt" value="[PROJEKT]" size="40"></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>
<form id="smtp_test" action = "index.php">
<input type="text" name="module" value="emailbackup" style="display:none">
<input type="text" name="action" value="test_smtp" style="display:none">
<input type="text" name="id" value="[ID]" style="display:none">
</form>
<form id="imap_test" action="index.php">
<input type="text" name="module" value="emailbackup" style="display:none">
<input type="text" name="action" value="test_imap" style="display:none">
<input type="text" name="id" value="[ID]" style="display:none">
<form id="imap_test" action = "index.php">
<input type="text" name="module" value="emailbackup" style="display:none">
<input type="text" name="action" value="test_imap" style="display:none">
<input type="text" name="id" value="[ID]" style="display:none">
</form>

View File

@ -27,10 +27,6 @@
<td>{|Verbindlichkeiten:|}</td>
<td><input type="checkbox" name="verbindlichkeit" value="1" [VBCHECKED] /></td>
</tr>
<tr>
<td>{|Lieferantengutschriften:|}</td>
<td><input type="checkbox" name="lieferantengutschrift" value="1" [LGCHECKED] /></td>
</tr>
<tr>
<td>Datum von:</td>
<td><input type="text" name="von" id="von" value="[VON]" /></td>

View File

@ -775,10 +775,6 @@
<td>Nächste Verbindlichkeitsnummer:</td><td><input type="text" name="next_verbindlichkeit" readonly value="[NEXT_VERBINDLICHKEIT]" size="40">
<input type="button" onclick="next_number('verbindlichkeit','[NEXT_VERBINDLICHKEIT]');" value="bearbeiten"></td>
</tr>
<tr>
<td>Nächste Lieferantengutschriftnummer:</td><td><input type="text" name="next_lieferantengutschrift" readonly value="[NEXT_LIEFERANTENGUTSCHRIFT]" size="40">
<input type="button" onclick="next_number('lieferantengutschrift','[NEXT_LIEFERANTENGUTSCHRIFT]');" value="bearbeiten"></td>
</tr>
<tr>
<td>N&auml;chste Kundennummer:</td><td><input type="text" name="next_kundennummer" readonly value="[NEXT_KUNDENNUMMER]" size="40">
<input type="button" onclick="next_number('kundennummer','[NEXT_KUNDENNUMMER]');" value="bearbeiten"></td>
@ -1416,7 +1412,6 @@
<tr><td width="300">[BEZEICHNUNGANGEBOTERSATZ] als Standard:</td><td><input type="checkbox" name="angebotersatz_standard" [ANGEBOTERSATZ_STANDARD]></td></tr>
<tr><td width="300">Beschriftung Abweichend Auftrag:</td><td><input type="text" name="bezeichnungauftragersatz" data-lang="bezeichnungauftragersatz" value="[BEZEICHNUNGAUFTRAGERSATZ]">&nbsp;<i>Beschriftung im Auftrag</i></td></tr>
<tr><td width="300">Beschriftung Abweichend Rechnung:</td><td><input type="text" name="bezeichnungrechnungersatz" data-lang="bezeichnungrechnungersatz" value="[BEZEICHNUNGRECHNUNGERSATZ]">&nbsp;<i>Beschriftung in Rechnung</i></td></tr>
<tr><td width="300">[BEZEICHNUNGRECHNUNGERSATZ] als Standard:</td><td><input type="checkbox" name="rechnungersatz_standard" [RECHNUNGERSATZ_STANDARD]></td></tr>
<tr><td width="300">Beschriftung Abweichend Gutschrift:</td><td><input type="text" name="bezeichnungstornorechnung" data-lang="bezeichnungstornorechnung" value="[BEZEICHNUNGSTORNORECHNUNG]">&nbsp;<i>laut 06/2013 §14 UStG</i></td></tr>
<tr><td width="300">[BEZEICHNUNGSTORNORECHNUNG] als Standard:</td><td><input type="checkbox" name="stornorechnung_standard" [STORNORECHNUNG_STANDARD]></td></tr>
<tr><td width="300">Beschriftung Abweichend Lieferschein:</td><td><input type="text" name="bezeichnunglieferscheinersatz" data-lang="bezeichnunglieferscheinersatz" value="[BEZEICHNUNGLIEFERSCHEINERSATZ]">&nbsp;<i>Beschriftung in Lieferschein</i></td></tr>

View File

@ -122,7 +122,7 @@
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {INTERNET}</i></li>
<li>{|ZahlungMiss|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
<li>Mahnung <i>Variablen: {BELEGNR}, {DATUM}, {OFFEN}, {MAHNGEBUEHR}, {HEUTE}</i></li>
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {TRACKINGLINK}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
<li>{|VersandMailDokumente|} <i>{|Variablen|}: {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}</i></li>
<li>{|Erweiterte Freigabe|} <i>{|Variablen|}: {REQUESTER}, {LINK}, {LINKFREIGABEUEBERSICHT}, {DOCTYPE}, {DOCTYPE_ID}</i></li>
<li>{|Selbstabholer|}</li>

View File

@ -1,119 +0,0 @@
<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>{|<!--Legend for this form area goes here>-->kostenstellen|}
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Nummer|}:
</td>
<td>
<input type="text" name="nummer" id="nummer" value="[NUMMER]" size="20">
</td>
</tr>
<tr>
<td>
{|Beschreibung|}:
</td>
<td>
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<input type="text" name="internebemerkung" id="internebemerkung" value="[INTERNEBEMERKUNG]" 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>
{|Nummer|}:
</td>
<td>
<input type="text" name="nummer" id="nummer" value="[NUMMER]" size="20">
</td>
</tr>
<tr>
<td>
{|Beschreibung|}:
</td>
<td>
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<input type="text" name="internebemerkung" id="internebemerkung" value="[INTERNEBEMERKUNG]" 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,10 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[TAB1]
[TAB1NEXT]
</div>
</div>

View File

@ -1,43 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[MESSAGETABLE]
<fieldset>
<form action="" method="post" id="eprooform" name="eprooform">
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr valign="top" colspan="3">
<td>
<table width="80%" align="center">
<tr valign="top">
<td align="center">
<table width="90%">
<tr><td><b>{|Quelllager|}:</b></td><td><input type="text" id="quelllager" name="quelllager" value="[QUELLLAGER]" size="27" style="width:200px"></td></tr>
<tr>
<td>
</td>
<td>
<button name="submit" value="lieferschein" class="ui-button-icon" style="width:200px;">
Lieferschein erzeugen
</button>
</td>
</tr>
</table>
<br>
</td>
<td>
</td>
</tr>
</table>
<br>
<br>
</td>
</tr>
</table>
</form>
</fieldset>
</div>
</div>

View File

@ -1,55 +0,0 @@
[POSITIONENMESSAGE]
<form method="post" action="#tabs-2">
<div class="row" [POSITIONHINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend style="float:left">Artikel hinzuf&uuml;gen:</legend>
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="passende" class="switch">
<input type="checkbox" id="passende">
<span class="slider round"></span>
</label>
<label for="passende">{|Nur passende (Bestellung/Rechnungsnummer)|}</label>
</li>
</ul>
</div>
</div>
[ARTIKELMANUELL]
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [HINZUFUEGENHIDDEN]>
<td>
{|Multifilter|}:&nbsp;<img src="./themes/new/images/tooltip_grau.png" border="0" style="position: relative; left: 1px; top: 3px; z-index: 8;" class="wawitooltipicon" title="Auswahl mehrerer Artikel &uuml;ber Name oder Nummer">
</td>
</tr>
<tr>
<td><input type="checkbox" name="bruttoeingabe" value="1" />Bruttopreise eingeben</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<input type="text" name="multifilter" id="multifilter" value="[MULTIFILTER]" size="20" style="width:98%;" form="">
</td>
</tr>
<tr>
<td><button [SAVEDISABLED] name="submit" value="artikel_manuell_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>

View File

@ -1,219 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">Lieferantengutschrift</a></li>
<li [POSITIONENHIDDEN]><a href="#tabs-2">Positionen</a></li>
<li [POSITIONENHIDDEN]><a href="#tabs-4">Artikel manuell</a></li>
<li><a href="#tabs-3">Protokoll</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-6 col-md-height">
<div class="inside inside-full-height">
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset style="float: left;">
<legend>{|<b>Lieferantengutschrift <font color="blue">[BELEGNR]</font></b> Lf-Nr. <a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]">[LIEFERANTENNUMMER]|}</a></legend>
[STATUSICONS]
</fieldset>
<fieldset style="float: right;">
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
</fieldset>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" value="[STATUS]" size="20" disabled>
</td>
</tr>
<tr>
<td>
{|Adresse|}:
</td>
<td>
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20" [ADRESSESAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschrifts-Nr.|}:
</td>
<td>
<input type="text" name="rechnung" id="rechnung" value="[RECHNUNG]" size="20" [SAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschriftsdatum|}:
</td>
<td>
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Eingangsdatum|}:
</td>
<td>
<input type="text" name="eingangsdatum" id="eingangsdatum" value="[EINGANGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Betrag brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betrag" id="betrag" value="[BETRAG]" size="20" [SAVEDISABLED]>
<select name="waehrung" [SAVEDISABLED]>[WAEHRUNGSELECT]</select>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betragbruttopos" id="betragbruttopos" value="[BETRAGBRUTTOPOS]" size="20" disabled><img class="wawitooltipicon" src="themes/new/images/tooltip_grau.png" title="Rundungsdifferenz [RUNDUNGSDIFFERENZ] wurde automatisch ber&uuml;cksichtigt" [RUNDUNGSDIFFERENZICONHIDDEN]>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen netto|}:
</td>
<td>
<input type="number" step="0.01" name="betragnetto" id="betragnetto" value="[BETRAGNETTO]" size="20" disabled [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Zahlbar bis|}:
</td>
<td>
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto %|}:
</td>
<td>
<input type="text" name="skonto" id="skonto" value="[SKONTO]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto bis|}:
</td>
<td>
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Bestellung|}:
</td>
<td>
<input type="text" name="bestellung" id="bestellung" value="[BESTELLUNG]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Waren-/Leistungsprüfung (Einkauf)|}:
</td>
<td>
<input type="checkbox" id="wareneingang" value="1" [WARENEINGANGCHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabeeinkauf&id=[ID]" title="freigeben" [FREIGABEEINKAUFHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzeneinkauf&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENEINKAUFHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
<i [EINKAUFINFOHIDDEN]>Wird automatisch gesetzt wenn Positionen vollst&auml;ndig</a>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschriftseingangsprüfung (Buchhaltung)|}:
</td>
<td>
<input type="checkbox" id="rechnungsfreigabe" [RECHNUNGSFREIGABECHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabebuchhaltung&id=[ID]" title="freigeben" [FREIGABEBUCHHALTUNGHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzenbuchhaltung&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBUCHHALTUNGHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Bezahlt|}:
</td>
<td>
<input type="checkbox" id="zahlungsstatus" [BEZAHLTCHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabebezahlt&id=[ID]" title="auf &apos;bezahlt&apos; setzen" [FREIGABEBEZAHLTHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzenbezahlt&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBEZAHLTHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kostenstelle|}:
</td>
<td>
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<textarea name="internebemerkung" id="internebemerkung" rows="6" style="width:100%;">[INTERNEBEMERKUNG]</textarea>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Vorschau|}</legend>
[INLINEPDF]
</fieldset>
</div>
</div>
</div>
</div>
</form>
</div>
<div id="tabs-2">
[POSITIONENTAB]
</div>
<div id="tabs-4">
[POSITIONENMANUELLTAB]
</div>
<div id="tabs-3">
[MINIDETAIL]
</div>
</div>

View File

@ -1,93 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</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="anhang" class="switch">
<input type="checkbox" id="anhang">
<span class="slider round"></span>
</label>
<label for="anhang">{|Anhang fehlt|}</label>
</li>
<li class="filter-item">
<label for="wareneingang" class="switch">
<input type="checkbox" id="wareneingang">
<span class="slider round"></span>
</label>
<label for="wareneingang">{|Wareingang/Leistungspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="rechnungsfreigabe" class="switch">
<input type="checkbox" id="rechnungsfreigabe">
<span class="slider round"></span>
</label>
<label for="rechnungsfreigabe">{|Lieferantengutschriftseingangspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="nichtbezahlt" class="switch">
<input type="checkbox" id="nichtbezahlt">
<span class="slider round"></span>
</label>
<label for="nichtbezahlt">{|Nicht bezahlt|}</label>
</li>
<li class="filter-item">
<label for="stornierte" class="switch">
<input type="checkbox" id="stornierte">
<span class="slider round"></span>
</label>
<label for="stornierte">{|Inkl. stornierte|}</label>
</li>
<li class="filter-item">
<label for="abgeschlossen" class="switch">
<input type="checkbox" id="abgeschlossen">
<span class="slider round"></span>
</label>
<label for="abgeschlossen">{|Inkl. abgeschlossene|}</label>
</li>
<li class="filter-item">
<label for="zahlbarbis">{|Zahlbar bis|}:</label>
<input type="text" name="zahlbarbis" id="zahlbarbis" size="10">
</li>
<li class="filter-item">
<label for="skontobis">{|Skonto bis|}:</label>
<input type="text" name="skontobis" id="skontobis" size="10">
</li>
</ul>
<form method="post" action="#">
<button name="submit" value="status_berechnen" class="ui-button-icon">{|Status auffrischen|}</button>
</form>
</div>
</div>
<form method="post" action="#">
[TAB1]
<fieldset><legend>{|Stapelverarbeitung|}</legend>
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />&nbsp;{|alle markieren|}&nbsp;
<select id="sel_aktion" name="sel_aktion">
<option value="">{|bitte w&auml;hlen|} ...</option>
[MANUELLFREIGABEEINKAUF]
[MANUELLFREIGABEBUCHHALTUNG]
[ALSBEZAHLTMARKIEREN]
</select>
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausf&uuml;hren|}</button>
</fieldset>
</form>
[TAB1NEXT]
</div>
</div>
<script>
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#lieferantengutschrift_list').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -1,76 +0,0 @@
[FORMHANDLEREVENT]
[MESSAGE]
<style>
.auftraginfo_cell {
color: #636363;border: 1px solid #ccc;padding: 5px;
}
.auftrag_cell {
color: #636363;border: 1px solid #fff;padding: 0px; margin:0px;
}
</style>
<div style="float:left; width:39%; padding-right:1%;">
<table width="100%" border="0">
<tr valign="top">
<td width="150">Lieferant:</td>
<td colspan="3">[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
</tr>
<tr>
<td>Lieferantengutschrifts-Nr.:</td>
<td>[RECHNUNG][MSGRECHNUNG]</td>
</tr>
<tr>
<td>Lieferantengutschriftsdatum:</td>
<td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
<tr>
</tr>
</tr>
<td width="200">Zahlbar bis:</td>
<td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td>
</tr>
<td>Betrag/Total (Brutto):</td>
<td>[BETRAG][MSGBETRAG]&nbsp;[WAEHRUNG][MSGWAEHRUNG]</td>
<tr>
<td>Skonto in %:</td>
<td>[SKONTO][MSGSKONTO]</td>
</tr>
<tr>
<td>Skonto bis:</td>
<td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
</tr>
<tr>
<td>Projekt:</td>
<td>[PROJEKT][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Kostenstelle:</td>
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Interne Bemerkung:</td>
<td colspan="4">[INTERNEBEMERKUNG]</td>
</tr>
</table>
</div>
<div style="float:left; width:60%">
<div style="background-color:white">
<h2 class="greyh2">Artikel</h2>
<div style="padding:10px">
[ARTIKEL]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Buchungen</h2>
<div style="padding:10px">
[ZAHLUNGEN]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Protokoll</h2>
<div style="padding:10px;">
[PROTOKOLL]
</div>
</div>
</div>

View File

@ -1,64 +0,0 @@
<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>{|Position bearbeiten|}</legend><i></i>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Menge|}:
</td>
<td>
<input type="number" name="menge" id="menge" value="[MENGE]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Preis|}:
</td>
<td>
<input type="number" name="preis" id="preis" step="0.00001" value="[PREIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Steuersatz %|}:
</td>
<td>
<input type="number" name="steuersatz" id="steuersatz" value="[STEUERSATZ]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Sachkonto|}:
</td>
<td>
<input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" size="20" [SACHKONTOSAVEDISABLED]>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
</div>

View File

@ -1,88 +0,0 @@
[POSITIONENMESSAGE]
<form method="post" action="#tabs-2">
<div class="row" [POSITIONHINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend style="float:left">Artikel hinzuf&uuml;gen:</legend>
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="passende" class="switch">
<input type="checkbox" id="passende">
<span class="slider round"></span>
</label>
<label for="passende">{|Nur passende (Bestellung/Rechnungsnummer)|}</label>
</li>
</ul>
</div>
</div>
[PAKETDISTRIBUTION]
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr>
<td><input type="checkbox" id="auswahlallewareneingaenge" onchange="allewareneingaengeauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr>
<td><button [SAVEDISABLED] name="submit" value="positionen_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<form method="post" action="#tabs-2">
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
[POSITIONEN]
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr [POSITIONHINZUFUEGENHIDDEN]>
<td><button [SAVEDISABLED] name="submit" value="positionen_entfernen" class="ui-button-icon" style="width:100%;">Entfernen</button></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="text" name="positionen_sachkonto" id="positionen_sachkonto" value="" size="20"></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><button name="submit" value="positionen_kontorahmen_setzen" class="ui-button-icon" style="width:100%;">Sachkonto setzen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<script>
function allewareneingaengeauswaehlen()
{
var wert = $('#auswahlallewareneingaenge').prop('checked');
$('#verbindlichkeit_positionen').find(':checkbox').prop('checked',wert);
}
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#lieferantengutschrift_positionen').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -22,7 +22,7 @@
<tr><td class="auftraginfo_cell">Projekt:</td><td class="auftraginfo_cell">[PROJEKT]</td><td class="auftraginfo_cell">Angebotssumme:</td><td class="auftraginfo_cell">[GESAMTSUMME]</td></tr>
<tr><td class="auftraginfo_cell">Auftrag:</td><td class="auftraginfo_cell">[AUFTRAG]</td><td class="auftraginfo_cell">Versteuerung:</td><td class="auftraginfo_cell">[STEUER]</td></tr>
<tr><td class="auftraginfo_cell">Rechnung:</td><td class="auftraginfo_cell">[RECHNUNG]</td><td class="auftraginfo_cell">Gewicht (netto):</td><td class="auftraginfo_cell">[GEWICHT]</td></tr>
<tr><td class="auftraginfo_cell">Pakete:</td><td class="auftraginfo_cell">[TRACKING]</td><td class="auftraginfo_cell">Versandart:</td><td class="auftraginfo_cell">[VERSANDART]</td></tr>
<tr><td class="auftraginfo_cell">Tracking:</td><td class="auftraginfo_cell">[TRACKING]</td><td class="auftraginfo_cell">Versandart:</td><td class="auftraginfo_cell">[VERSANDART]</td></tr>
<tr><td class="auftraginfo_cell">Retoure:</td><td class="auftraginfo_cell">[RETOURE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
</table>

View File

@ -1,45 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[MESSAGETABLE]
<fieldset>
<form action="" method="post" id="eprooform" name="eprooform">
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr valign="top" colspan="3">
<td>
<table width="80%" align="center">
<tr valign="top">
<td align="center">
<table width="90%">
<tr><td><b>{|Quelllager|}:</b></td><td><input type="text" id="quelllager" name="quelllager" value="[QUELLLAGER]" size="27" style="width:200px"></td></tr>
<tr><td><b>{|Ziellager|}:</b></td><td><input type="text" id="ziellager" name="ziellager" value="[ZIELLAGER]" size="27" style="width:200px"></td></tr>
<tr>
<td>
<p [ERNEUT_UMLAGERN_HIDDEN]><input type="checkbox" name="erneut" id="erneut" value="1" size="20" [ERNEUT_CHECKED]>{|Erneut umlagern|}</input></p>
</td>
<td>
<button name="submit" value="umlagern" class="ui-button-icon" style="width:200px;">
Umlagern
</button>
</td>
</tr>
</table>
<br>
</td>
<td>
</td>
</tr>
</table>
<br>
<br>
</td>
</tr>
</table>
</form>
</fieldset>
</div>
</div>

View File

@ -17,6 +17,33 @@
<li class="filter-item"><input type="checkbox" id="anlieferanten"><label for="anlieferanten">{|an Lieferanten|}</label></li>
</ul>
</div>
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter Versandzentrum|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="abgeschlossenlogistik" class="switch">
<input type="checkbox" id="abgeschlossenlogistik">
<span class="slider round"></span>
</label>
<label for="abgeschlossenlogistik">{|abgeschlossen &uuml;ber Logistik|}</label>
</li>
<li class="filter-item">
<label for="nochinlogistik" class="switch">
<input type="checkbox" id="nochinlogistik">
<span class="slider round"></span>
</label>
<label for="nochinlogistik">{|noch in Logistik|}</label>
</li>
<li class="filter-item">
<label for="manuellabgeschlossen" class="switch">
<input type="checkbox" id="manuellabgeschlossen">
<span class="slider round"></span>
</label>
<label for="manuellabgeschlossen">{|manuell abgeschlossen|}</label>
</li>
</ul>
</div>
</div>
[MESSAGE]
@ -29,7 +56,6 @@
<option value="offen">{|als offen markieren|}</option>
<option value="versendet">{|als versendet markieren|}</option>
<option value="storniert">{|als storniert markieren|}</option>
<option value="versanduebergabe">{|in Versand geben|}</option>
<option value="pdf">{|Sammel-PDF|}</option>
<option value="drucken">{|drucken|}</option>
</select>&nbsp;{|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select>&nbsp;<input type="submit" class="btnBlue" name="ausfuehren" value="{|ausf&uuml;hren|}" />

View File

@ -8,7 +8,6 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<li><a href="#tabs-2">Aufträge</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[MESSAGE_INVOICES]
<form method="post" action="#">
[TAB_INVOICES]
@ -20,7 +19,6 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
</form>
</div>
<div id="tabs-2">
[MESSAGE]
[MESSAGE_ORDERS]
<form method="post" action="#">
[TAB_ORDERS]

View File

@ -1,85 +0,0 @@
<div id="tabs" class="report">
<ul>
<li><a href="#tabs-1">Tabellen</a></li>
<li><a href="#tabs-2">Struktur</a></li>
<li><a href="#tabs-3">Vorschau</a></li>
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<div id="tabs-1">
[MESSAGE]
<div class="row" id="report_list_main">
<div class="row-height">
<div class="col-xs-12 col-sm-10 col-sm-height">
<div>
[TAB1]
</div>
</div>
</div>
</div>
[TAB1NEXT]
</div>
<div id="tabs-2">
[MESSAGE]
<div class="row" id="report_list_main">
<div class="row-height">
<div class="col-xs-12 col-sm-10 col-sm-height">
<legend style="float:left">
Tabelle&nbsp;[TABLENAME]
</legend>
<form method="post" action="#tabs-3">
<fieldset style="float: right;">
<input type="text" name="table" value="[TABLENAME]" hidden></input>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td style="padding-right:10px;"><input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();"/>{|alle markieren|}</td>
<td><button name="submit" value="vorschau" class="ui-button-icon" style="width:100%;float:right;">Vorschau</button></td>
</tr>
</table>
</fieldset>
<p></p>
<div id="columnstab">
[TAB2]
</div>
</form>
</div>
</div>
</div>
[TAB2NEXT]
</div>
<div id="tabs-3">
[MESSAGE]
<div class="row" id="report_list_main">
<div class="row-height">
<div class="col-xs-12 col-sm-10 col-sm-height">
<legend style="float:left">
Tabelle&nbsp;[TABLENAME]
</legend>
<form method="post" action="#tabs-3">
<fieldset style="float: right;">
<input type="text" name="table" value="[TABLENAME]" hidden></input>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td><button name="submit" value="erzeugen" class="ui-button-icon" style="width:100%;float:right;">Bericht erzeugen</button></td>
</tr>
</table>
</fieldset>
</form>
<div>
[TAB3]
</div>
</div>
</div>
</div>
[TAB3NEXT]
</div>
<!-- tab view schließen -->
</div>
<script>
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#columnstab').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -19,13 +19,12 @@
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|[STATUSICON]<b>Ticket <font color="blue">#[SCHLUESSEL]</font></b>|}</legend>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" style="width: 100%;"></td></tr>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" size="100%"></td></tr>
<tr><td>{|Von|}:</td><td>[KUNDE]&nbsp;[MAILADRESSE]</td></tr>
<tr><td>{|Projekt|}:</td><td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20"></td></tr>
<tr><td>{|Adresse|}:</td><td><input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20"><a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]"><img src="./themes/new/images/forward.svg" border="0" style="top:6px; position:relative"></a></td></tr>
<tr><td>{|Tags|}:</td><td><input type="text" name="tags" id="tags" value="[TAGS]" size="20"></td></tr>
<tr><td>{|Letzte Aktion|}:</td><td>[ZEIT]</td></tr>
[TICKET_ANHANG]
</table>
</fieldset>
</div>
@ -50,7 +49,6 @@
<legend>{|Aktionen|}</legend>
<td><button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
<td><button name="submit" value="neue_email" class="ui-button-icon" style="width:100%;">Neue E-Mail</button></td></tr>
<td><button name="submit" value="neue_email_alle" class="ui-button-icon" style="width:100%;">Neue E-Mail an alle</button></td></tr>
<td><button name="submit" formaction="index.php?module=ticketregeln&action=create" value="regel" class="ui-button-icon" style="width:100%;">Ticketregel erstellen</button><input hidden type="text" name="ticketid" value="[ID]"></td></tr>
</table>
</fieldset>

View File

@ -49,19 +49,7 @@
<tr><td>{|Status|}:</td><td><select name="status">[STATUS]</select></td></tr>
<tr><td>{|Verantwortlich|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="20"></td></tr>
<tr>
<td>
<input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;
</td>
<td>
<button name="submit" value="zuordnen" class="ui-button-icon" style="width:100%;">{|Zuordnen|}</button>
</td>
</tr>
<tr [SPAM_HIDDEN]>
<td>
</td>
<td>
<button name="submit" value="spam_filter" class="ui-button-icon" title="Ticket auf Status 'Papierkorb' setzen und Absender-Adresse in Ticketregel eintragen" style="width:100%;" onclick="if(confirm('Wirklich Ticketregel erstellen?'))document.getElementById('form-id').submit(); else return false;">{|Spamregel erstellen|}</button>
</td>
<td><input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;</td><td><input type="submit" class="btnBlue" name="ausfuehren" value="{|Zuordnen|}" /></td>
</tr>
</table>

View File

@ -23,12 +23,10 @@
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
<tr><td colspan="2"><hr style="border-style:solid; border-width:1px"></td></tr>
<tr><td>{|Papierkorb|}:</td><td><input type="checkbox" name="spam" value="1" [SPAM] size="40"></td></tr>
<tr><td>{|Pers&ouml;nlich|}:</td><td><input type="checkbox" name="persoenlich" value="1" [PERSOENLICH] size="40"></td></tr>
<tr><td>{|Prio|}:</td><td><input type="checkbox" name="prio" value="1" [PRIO] size="40"></td></tr>
<tr><td>{|DSGVO|}:</td><td><input type="checkbox" name="dsgvo" value="1" [DSGVO] size="40"></td></tr>
<tr><td>{|Adresse|}:</td><td><input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="40"></td></tr>
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
<tr><td>{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" value="1" [AKTIV] size="40"></td></tr>

View File

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

View File

@ -15,7 +15,7 @@
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|DBXE Upgrade-System|}</legend>
<legend>{|OpenXE Upgrade-System|}</legend>
Das Upgrade funktioniert in 2 Schritten: Dateien aktualisieren, Datenbank auffrischen. Wenn das Upgrade lange l&auml;uft, kann der Fortschritt in einem neuen Fenster mit "Anzeige auffrischen" angezeigt werden.<br><br>
Falls nach einem Abbruch oder schwerwiegenden Fehler kein Upgrade möglich ist, im Hauptordner den Ordner ".git" l&ouml;schen und das Upgrade in der Konsole erneut durchf&uuml;hren.
Dazu im Unterordner "upgrade" diesen Befehl starten: <pre>./upgrade.sh -do</pre>
@ -37,7 +37,7 @@ Dazu im Unterordner "upgrade" diesen Befehl starten: <pre>./upgrade.sh -do</pre>
<fieldset>
<legend>{|Aktuelle Version|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<b>DBXE [CURRENT]</b>
<b>OpenXE [CURRENT]</b>
</table>
</fieldset>
</div>

View File

@ -1,215 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">Verbindlichkeit</a></li>
<li [POSITIONENHIDDEN]><a href="#tabs-2">Positionen</a></li>
<li><a href="#tabs-3">Protokoll</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-6 col-md-height">
<div class="inside inside-full-height">
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset style="float: left;">
<legend>{|<b>Verbindlichkeit <font color="blue">[BELEGNR]</font></b> Lf-Nr. <a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]">[LIEFERANTENNUMMER]|}</a></legend>
[STATUSICONS]
</fieldset>
<fieldset style="float: right;">
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
</fieldset>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" value="[STATUS]" size="20" disabled>
</td>
</tr>
<tr>
<td>
{|Adresse|}:
</td>
<td>
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20" [SAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Rechnungs-Nr.|}:
</td>
<td>
<input type="text" name="rechnung" id="rechnung" value="[RECHNUNG]" size="20" [SAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Rechnungsdatum|}:
</td>
<td>
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Eingangsdatum|}:
</td>
<td>
<input type="text" name="eingangsdatum" id="eingangsdatum" value="[EINGANGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Betrag brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betrag" id="betrag" value="[BETRAG]" size="20" [SAVEDISABLED]>
<select name="waehrung" [SAVEDISABLED]>[WAEHRUNGSELECT]</select>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betragbruttopos" id="betragbruttopos" value="[BETRAGBRUTTOPOS]" size="20" disabled><img class="wawitooltipicon" src="themes/new/images/tooltip_grau.png" title="Rundungsdifferenz [RUNDUNGSDIFFERENZ] wurde automatisch ber&uuml;cksichtigt" [RUNDUNGSDIFFERENZICONHIDDEN]>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen netto|}:
</td>
<td>
<input type="number" step="0.01" name="betragnetto" id="betragnetto" value="[BETRAGNETTO]" size="20" disabled [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Zahlbar bis|}:
</td>
<td>
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto %|}:
</td>
<td>
<input type="text" name="skonto" id="skonto" value="[SKONTO]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto bis|}:
</td>
<td>
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Bestellung|}:
</td>
<td>
<input type="text" name="bestellung" id="bestellung" value="[BESTELLUNG]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Waren-/Leistungsprüfung (Einkauf)|}:
</td>
<td>
<input type="checkbox" id="wareneingang" value="1" [WARENEINGANGCHECKED] size="20" disabled>
<a href="index.php?module=verbindlichkeit&action=freigabeeinkauf&id=[ID]" title="freigeben" [FREIGABEEINKAUFHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=verbindlichkeit&action=ruecksetzeneinkauf&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENEINKAUFHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
<i [EINKAUFINFOHIDDEN]>Wird automatisch gesetzt wenn Positionen vollst&auml;ndig</a>
</td>
</tr>
<tr>
<td>
{|Rechnungseingangsprüfung (Buchhaltung)|}:
</td>
<td>
<input type="checkbox" id="rechnungsfreigabe" [RECHNUNGSFREIGABECHECKED] size="20" disabled>
<a href="index.php?module=verbindlichkeit&action=freigabebuchhaltung&id=[ID]" title="freigeben" [FREIGABEBUCHHALTUNGHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=verbindlichkeit&action=ruecksetzenbuchhaltung&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBUCHHALTUNGHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Bezahlt|}:
</td>
<td>
<input type="checkbox" id="zahlungsstatus" [BEZAHLTCHECKED] size="20" disabled>
<a href="index.php?module=verbindlichkeit&action=freigabebezahlt&id=[ID]" title="auf &apos;bezahlt&apos; setzen" [FREIGABEBEZAHLTHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=verbindlichkeit&action=ruecksetzenbezahlt&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBEZAHLTHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kostenstelle|}:
</td>
<td>
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<textarea name="internebemerkung" id="internebemerkung" rows="6" style="width:100%;">[INTERNEBEMERKUNG]</textarea>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Vorschau|}</legend>
[INLINEPDF]
</fieldset>
</div>
</div>
</div>
</div>
</form>
</div>
<div id="tabs-2">
[POSITIONENTAB]
</div>
<div id="tabs-3">
[MINIDETAIL]
</div>
</div>

View File

@ -1,93 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</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="anhang" class="switch">
<input type="checkbox" id="anhang">
<span class="slider round"></span>
</label>
<label for="anhang">{|Anhang fehlt|}</label>
</li>
<li class="filter-item">
<label for="wareneingang" class="switch">
<input type="checkbox" id="wareneingang">
<span class="slider round"></span>
</label>
<label for="wareneingang">{|Wareingang/Leistungspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="rechnungsfreigabe" class="switch">
<input type="checkbox" id="rechnungsfreigabe">
<span class="slider round"></span>
</label>
<label for="rechnungsfreigabe">{|Rechnungseingangspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="nichtbezahlt" class="switch">
<input type="checkbox" id="nichtbezahlt">
<span class="slider round"></span>
</label>
<label for="nichtbezahlt">{|Nicht bezahlt|}</label>
</li>
<li class="filter-item">
<label for="stornierte" class="switch">
<input type="checkbox" id="stornierte">
<span class="slider round"></span>
</label>
<label for="stornierte">{|Inkl. stornierte|}</label>
</li>
<li class="filter-item">
<label for="abgeschlossen" class="switch">
<input type="checkbox" id="abgeschlossen">
<span class="slider round"></span>
</label>
<label for="abgeschlossen">{|Inkl. abgeschlossene|}</label>
</li>
<li class="filter-item">
<label for="zahlbarbis">{|Zahlbar bis|}:</label>
<input type="text" name="zahlbarbis" id="zahlbarbis" size="10">
</li>
<li class="filter-item">
<label for="skontobis">{|Skonto bis|}:</label>
<input type="text" name="skontobis" id="skontobis" size="10">
</li>
</ul>
<form method="post" action="#">
<button name="submit" value="status_berechnen" class="ui-button-icon">{|Status auffrischen|}</button>
</form>
</div>
</div>
<form method="post" action="#">
[TAB1]
<fieldset><legend>{|Stapelverarbeitung|}</legend>
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />&nbsp;{|alle markieren|}&nbsp;
<select id="sel_aktion" name="sel_aktion">
<option value="">{|bitte w&auml;hlen|} ...</option>
[MANUELLFREIGABEEINKAUF]
[MANUELLFREIGABEBUCHHALTUNG]
[ALSBEZAHLTMARKIEREN]
</select>
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausf&uuml;hren|}</button>
</fieldset>
</form>
[TAB1NEXT]
</div>
</div>
<script>
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#verbindlichkeit_list').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -1,76 +1,176 @@
[FORMHANDLEREVENT]
[MESSAGE]
<style>
.auftraginfo_cell {
color: #636363;border: 1px solid #ccc;padding: 5px;
}
.auftrag_cell {
color: #636363;border: 1px solid #fff;padding: 0px; margin:0px;
}
</style>
<div style="float:left; width:39%; padding-right:1%;">
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody>
<tr valign="top" colspan="3">
<td >
<fieldset><legend>{|Rechnungsdaten|}</legend>
<table width="100%" border="0">
<tr valign="top">
<td width="150">Lieferant:</td>
<td colspan="3">[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
</tr>
<tr>
<td>Rechnungs-Nr.:</td>
<td>[RECHNUNG][MSGRECHNUNG]</td>
</tr>
<tr>
<td>Rechnungsdatum:</td>
<td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
<tr>
</tr>
</tr>
<td width="200">Zahlbar bis:</td>
<td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td>
</tr>
<td>Betrag/Total (Brutto):</td>
<td>[BETRAG][MSGBETRAG]&nbsp;[WAEHRUNG][MSGWAEHRUNG]</td>
<tr>
<td>Skonto in %:</td>
<td>[SKONTO][MSGSKONTO]</td>
</tr>
<tr>
<td>Skonto bis:</td>
<td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
</tr>
<tr>
<td>Projekt:</td>
<td>[PROJEKT][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Kostenstelle:</td>
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Interne Bemerkung:</td>
<td colspan="4">[INTERNEBEMERKUNG]</td>
</tr>
</table>
<tr valign="top"><td width="150">Lieferant:</td><td>[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
<td>&nbsp;</td>
<td colspan="2" rowspan="2" align="center"><b style="color:green">[MELDUNG]</b>
<br><font size="7">[VERBINDLICHKEIT]</font>
</td></tr>
<tr><td><br><br>Rechnungs Nr.:</td><td><br><br>[RECHNUNG][MSGRECHNUNG]</td>
<td>&nbsp;</td>
</tr>
<tr><td>Bestellung:</td><td width="250">[DISABLESTART]<a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID]" target="_blank">[BESTELLUNG]</a>[MSGBESTELLUNG][MULTIBESTELLUNG][DISABLEENDE]</td>
<td>&nbsp;</td>
<td width="200">Zahlweise:</td><td>[ZAHLUNGSWEISE][MSGZAHLUNGSWEISE]</td></tr>
<tr><td>Rechnungsdatum:</td><td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
<td>&nbsp;</td>
<td width="200">Zahlbar bis:</td><td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td></tr>
<tr><td>Betrag/Total (Brutto):</td><td>[BETRAG][MSGBETRAG]&nbsp;[WAEHRUNG][MSGWAEHRUNG]</td><td>&nbsp;</td>
<td>Skonto in %:</td><td>[SKONTO][MSGSKONTO]</td>
</tr>
<tr><td>USt. 19%:</td><td>[SUMMENORMAL][MSGSUMMENORMAL]</td><td>&nbsp;</td>
<td>Skonto bis:</td><td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
</tr>
<tr>
<td>USt. 7%:</td><td>[SUMMEERMAESSIGT][MSGSUMMEERMAESSIGT]</td>
<td>&nbsp;</td>
<td>Umsatzsteuer</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]</td>
</tr>
<tr>
<td>[STEUERSATZNAME3]</td><td>[SUMMESATZ3][MSGSUMMESATZ3]</td>
<td>&nbsp;</td>
<td>[STEUERSATZNAME4]</td><td>[SUMMESATZ4][MSGSUMMESATZ4]</td>
</tr>
<tr>
<td>Verwendungszweck:</td><td>[VERWENDUNGSZWECK][MSGVERWENDUNGSZWECK]</td>
<td>&nbsp;</td>
<td>Frachtkosten:</td><td>[FRACHTKOSTEN][MSGFRACHTKOSTEN]</td>
</tr>
<tr>
<td>Projekt:</td><td>[PROJEKT][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
<td></td><td></td>
</tr>
<tr>
<td>Kostenstelle:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
<td>Freigabe:</td><td>[MSGFREIGABE]&nbsp;<i>Wareneingangspr&uuml;fung:</i>&nbsp;[FREIGABE]&nbsp;[MSGRECHNUNGSFREIGABE]&nbsp;<i>Rechnungseingangspr&uuml;fung:</i>&nbsp;[RECHNUNGSFREIGABE]</td>
</tr>
<tr>
<td>Sachkonto:</td><td>[SACHKONTO][MSGSACHKONTO]</td>
<td>&nbsp;</td>
<td>Aktion:</td><td>[BUTTONBEZAHLT]</td>
</tr>
<tr>
<td>Interne Bemerkung:</td><td colspan="4">[INTERNEBEMERKUNG]</td>
</tr>
</table>
</fieldset>
</td></tr>
</tbody>
</table>
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
<tr valign="top"><td width="50%">
<table cellspacing="5" width="100%">
<!--<tr><td><b>Bestellung</b></td><td><b>Bestell-Nr.</b></td><td><b>Teilbetrag</b></td><td><b>Projekt</b></td><td><b>Kostenstelle</b></td><td><b>Bemerkung</b></td></tr>
<tr><td>Nr. 1</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID1]" target="_blank">[BESTELLUNG1]</a>[MSGBESTELLUNG1]</td><td>[BESTELLUNG1BETRAG][MSGBESTELLUNG1BETRAG]</td>
<td>[BESTELLUNG1PROJEKT]</td><td>[BESTELLUNG1KOSTENSTELLE]</td>
<td>[BESTELLUNG1BEMERKUNG][MSGBESTELLUNG1BEMERKUNG]</td></tr>
<tr><td>Nr. 2</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID2]" target="_blank">[BESTELLUNG2]</a>[MSGBESTELLUNG2]</td><td>[BESTELLUNG2BETRAG][MSGBESTELLUNG2BETRAG]</td>
<td>[BESTELLUNG2PROJEKT]</td><td>[BESTELLUNG2KOSTENSTELLE]</td>
<td>[BESTELLUNG2BEMERKUNG][MSGBESTELLUNG2BEMERKUNG]</td></tr>
<tr><td>Nr. 3</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID3]" target="_blank">[BESTELLUNG3]</a>[MSGBESTELLUNG3]</td><td>[BESTELLUNG3BETRAG][MSGBESTELLUNG3BETRAG]</td>
<td>[BESTELLUNG3PROJEKT]</td><td>[BESTELLUNG3KOSTENSTELLE]</td>
<td>[BESTELLUNG3BEMERKUNG][MSGBESTELLUNG3BEMERKUNG]</td></tr>
<tr><td>Nr. 4</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID4]" target="_blank">[BESTELLUNG4]</a>[MSGBESTELLUNG4]</td><td>[BESTELLUNG4BETRAG][MSGBESTELLUNG4BETRAG]</td>
<td>[BESTELLUNG4PROJEKT]</td><td>[BESTELLUNG4KOSTENSTELLE]</td>
<td>[BESTELLUNG4BEMERKUNG][MSGBESTELLUNG4BEMERKUNG]</td></tr>
<tr><td>Nr. 5</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID5]" target="_blank">[BESTELLUNG5]</a>[MSGBESTELLUNG5]</td><td>[BESTELLUNG5BETRAG][MSGBESTELLUNG5BETRAG]</td>
<td>[BESTELLUNG5PROJEKT]</td><td>[BESTELLUNG5KOSTENSTELLE]</td>
<td>[BESTELLUNG5BEMERKUNG][MSGBESTELLUNG5BEMERKUNG]</td></tr>
<tr><td>Nr. 6</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID6]" target="_blank">[BESTELLUNG6]</a>[MSGBESTELLUNG6]</td><td>[BESTELLUNG6BETRAG][MSGBESTELLUNG6BETRAG]</td>
<td>[BESTELLUNG6PROJEKT]</td><td>[BESTELLUNG6KOSTENSTELLE]</td>
<td>[BESTELLUNG6BEMERKUNG][MSGBESTELLUNG6BEMERKUNG]</td></tr>
<tr><td>Nr. 7</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID7]" target="_blank">[BESTELLUNG7]</a>[MSGBESTELLUNG7]</td><td>[BESTELLUNG7BETRAG][MSGBESTELLUNG7BETRAG]</td>
<td>[BESTELLUNG7PROJEKT]</td><td>[BESTELLUNG7KOSTENSTELLE]</td>
<td>[BESTELLUNG7BEMERKUNG][MSGBESTELLUNG7BEMERKUNG]</td></tr>
<tr><td>Nr. 8</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID8]" target="_blank">[BESTELLUNG8]</a>[MSGBESTELLUNG8]</td><td>[BESTELLUNG8BETRAG][MSGBESTELLUNG8BETRAG]</td>
<td>[BESTELLUNG8PROJEKT]</td><td>[BESTELLUNG8KOSTENSTELLE]</td>
<td>[BESTELLUNG8BEMERKUNG][MSGBESTELLUNG8BEMERKUNG]</td></tr>
<tr><td>Nr. 9</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID9]" target="_blank">[BESTELLUNG9]</a>[MSGBESTELLUNG9]</td><td>[BESTELLUNG9BETRAG][MSGBESTELLUNG9BETRAG]</td>
<td>[BESTELLUNG9PROJEKT]</td><td>[BESTELLUNG9KOSTENSTELLE]</td>
<td>[BESTELLUNG9BEMERKUNG][MSGBESTELLUNG9BEMERKUNG]</td></tr>
<tr><td>Nr. 10</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID10]" target="_blank">[BESTELLUNG10]</a>[MSGBESTELLUNG10]</td><td>[BESTELLUNG10BETRAG][MSGBESTELLUNG10BETRAG]</td>
<td>[BESTELLUNG10PROJEKT]</td><td>[BESTELLUNG10KOSTENSTELLE]</td>
<td>[BESTELLUNG10BEMERKUNG][MSGBESTELLUNG10BEMERKUNG]</td></tr>
<tr><td>Nr. 11</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID11]" target="_blank">[BESTELLUNG11]</a>[MSGBESTELLUNG11]</td><td>[BESTELLUNG11BETRAG][MSGBESTELLUNG11BETRAG]</td>
<td>[BESTELLUNG11PROJEKT]</td><td>[BESTELLUNG11KOSTENSTELLE]</td>
<td>[BESTELLUNG11BEMERKUNG][MSGBESTELLUNG11BEMERKUNG]</td></tr>
<tr><td>Nr. 12</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID12]" target="_blank">[BESTELLUNG12]</a>[MSGBESTELLUNG12]</td><td>[BESTELLUNG12BETRAG][MSGBESTELLUNG12BETRAG]</td>
<td>[BESTELLUNG12PROJEKT]</td><td>[BESTELLUNG12KOSTENSTELLE]</td>
<td>[BESTELLUNG12BEMERKUNG][MSGBESTELLUNG12BEMERKUNG]</td></tr>
<tr><td>Nr. 13</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID13]" target="_blank">[BESTELLUNG13]</a>[MSGBESTELLUNG13]</td><td>[BESTELLUNG13BETRAG][MSGBESTELLUNG13BETRAG]</td>
<td>[BESTELLUNG13PROJEKT]</td><td>[BESTELLUNG13KOSTENSTELLE]</td>
<td>[BESTELLUNG13BEMERKUNG][MSGBESTELLUNG13BEMERKUNG]</td></tr>
<tr><td>Nr. 14</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID14]" target="_blank">[BESTELLUNG14]</a>[MSGBESTELLUNG14]</td><td>[BESTELLUNG14BETRAG][MSGBESTELLUNG14BETRAG]</td>
<td>[BESTELLUNG14PROJEKT]</td><td>[BESTELLUNG14KOSTENSTELLE]</td>
<td>[BESTELLUNG14BEMERKUNG][MSGBESTELLUNG14BEMERKUNG]</td></tr>
<tr><td>Nr. 15</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID15]" target="_blank">[BESTELLUNG15]</a>[MSGBESTELLUNG15]</td><td>[BESTELLUNG15BETRAG][MSGBESTELLUNG15BETRAG]</td>
<td>[BESTELLUNG15PROJEKT]</td><td>[BESTELLUNG15KOSTENSTELLE]</td>
<td>[BESTELLUNG15BEMERKUNG][MSGBESTELLUNG15BEMERKUNG]</td></tr>-->
[TABELLEBESTELLUNGEN]
</table>
</td>
<td>
<table width="100%>">
<tr><td>Summe Verbindlichkeit</td><td>Summe Kontierung</td></tr>
<tr>
<td class="greybox" width="25%">[SUMMEVERBINDLICHKEIT]</td>
<td class="greybox" width="25%">[SUMMEKONTIERUNG]</td>
</tr>
</table>
[MESSAGEVORKONTIERUNG]
[VORKONTIERUNG]
[ZAHLUNGEN]
<div style="background-color:white">
<h2 class="greyh2">{|Protokoll|}</h2>
<div style="padding:10px">
[PROTOKOLL]
</div>
<div style="float:left; width:60%">
<div style="background-color:white">
<h2 class="greyh2">Artikel</h2>
<div style="padding:10px">
[ARTIKEL]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Buchungen</h2>
<div style="padding:10px">
[ZAHLUNGEN]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Protokoll</h2>
<div style="padding:10px;">
[PROTOKOLL]
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>

View File

@ -1,64 +0,0 @@
<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>{|Position bearbeiten|}</legend><i></i>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Menge|}:
</td>
<td>
<input type="number" name="menge" id="menge" value="[MENGE]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Preis|}:
</td>
<td>
<input type="number" name="preis" id="preis" step="0.00001" value="[PREIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Steuersatz %|}:
</td>
<td>
<input type="number" name="steuersatz" id="steuersatz" value="[STEUERSATZ]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Sachkonto|}:
</td>
<td>
<input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" size="20" [SACHKONTOSAVEDISABLED]>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
</div>

View File

@ -1,91 +0,0 @@
[POSITIONENMESSAGE]
<form method="post" action="#tabs-2">
<div class="row" [POSITIONHINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend style="float:left">Offene Artikel aus Wareneing&auml;ngen:</legend>
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="passende" class="switch">
<input type="checkbox" id="passende">
<span class="slider round"></span>
</label>
<label for="passende">{|Nur passende (Bestellung/Rechnungsnummer)|}</label>
</li>
</ul>
</div>
</div>
[PAKETDISTRIBUTION]
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr>
<td><input type="checkbox" id="auswahlallewareneingaenge" onchange="allewareneingaengeauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr>
<td><input type="checkbox" name="bruttoeingabe" value="1" />Bruttopreise eingeben</td>
</tr>
<tr>
<td><button [SAVEDISABLED] name="submit" value="positionen_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<form method="post" action="#tabs-2">
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
[POSITIONEN]
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr [POSITIONHINZUFUEGENHIDDEN]>
<td><button [SAVEDISABLED] name="submit" value="positionen_entfernen" class="ui-button-icon" style="width:100%;">Entfernen</button></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="text" name="positionen_sachkonto" id="positionen_sachkonto" value="" size="20"></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><button name="submit" value="positionen_kontorahmen_setzen" class="ui-button-icon" style="width:100%;">Sachkonto setzen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<script>
function allewareneingaengeauswaehlen()
{
var wert = $('#auswahlallewareneingaenge').prop('checked');
$('#verbindlichkeit_paketdistribution_list').find(':checkbox').prop('checked',wert);
}
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#verbindlichkeit_positionen').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -23,9 +23,6 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
[MODULEINSTALLIERT]
</fieldset>
[TAB1NEXT]
<form id="neu" action="index.php?module=versandarten&action=neusonstige" method="post">
<button name="submit" value="neusonstige" class="ui-button-icon">Versandart ohne Modul anlegen</button>
</form>
</div>
<!-- tab view schließen -->
@ -38,4 +35,4 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
:pages="pages"
:allowClose="allowClose"
:pagination="pagination">
</click-by-click-assistant>
</click-by-click-assistant>

View File

@ -1,80 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<form action="index.php?module=versandpakete&action=add&id=[ID]&lieferschein=[LIEFERSCHEIN_ID]" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-10 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Hinzuf&uuml;gen von Artikeln aus <a href="index.php?module=lieferschein&action=edit&id=[LIEFERSCHEIN_ID]"><b>Lieferschein [LIEFERSCHEIN]</b></a> zu Versandpaket <b>Nr. [ID]</b>|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Artikel|}:
</td>
<td>
<input type="text" name="artikel" id="artikel" value="" size="40" autofocus>
</td>
</tr>
<tr>
<td>
{|Menge|}:
</td>
<td>
<input type="number" name="menge" id="menge" value="" min="1" size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td><button name="submit" value="hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td></tr>
<tr><td><button name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Alle hinzuf&uuml;gen</button></td></tr>
<tr><td><button form="back" name="submit" value="fertig" class="ui-button-icon" style="width:100%;">Fertig</button></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Lieferscheininhalt|}</legend>
[LIEFERSCHEININHALT]
</fieldset>
</div>
</div>
</div>
</div>
<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>{|Paketinhalt|}</legend>
[PAKETINHALT]
</fieldset>
</div>
</div>
</div>
</div>
<input type="text" name="lieferschein" id="lieferschein" value="[LIEFERSCHEIN]" size="40" hidden>
</form>
<form action="index.php?module=versandpakete&action=edit&id=[VERSANDPAKET_ID]" id="back" method="post">
</form>
</div>
</div>

View File

@ -1,147 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[FORMHANDLEREVENT]
<form id="save" action="" method="post">
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>
{|<b>Versandpaket Nr. [ID]</b> vom [DATUM]<span [NO_ADDRESS_HIDDEN]> f&uuml;r Adresse '[ADRESSE]'|}</span>
</legend>
[ICONS]
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" name="" id="" value="[STATUS]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Versender|}:
</td>
<td>
<input type="text" name="" id="" value="[VERSENDER]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Versandart|}:
</td>
<td>
<input type="text" name="" id="" value="[VERSANDART]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Tracking|}:
</td>
<td>
<input type="text" name="tracking" id="tracking" value="[TRACKING]" size="40" [TRACKING_DISABLED]>
<a href="[PAKETMARKE_LINK]" [PAKETMARKE_HIDDEN]>
<img src="themes/new/images/portogo.png" border="0" title="Zur Paketmarke" style="top:6px; position:relative">
</a>
<a href="[TRACKING_LINK]" [TRACKING_LINK_HIDDEN]>
<img src="themes/new/images/forward.svg" border="0" title="Zum Tracking" style="top:6px; position:relative">
</a>
</td>
</tr>
<tr [TRACKING_LINK_EDIT_HIDDEN]>
<td>
{|Tracking link|}:
</td>
<td>
<input type="text" name="tracking_link" id="tracking_link" value="[TRACKING_LINK]" size="40" [TRACKING_DISABLED]>
</td>
</tr>
<tr>
<td>
{|Gewicht Kg|}:
</td>
<td>
<input type="number" name="" id="" value="[GEWICHT]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Bemerkung|}:
</td>
<td>
<textarea name="bemerkung" id="bemerkung" rows="3" style="width:100%;">[BEMERKUNG]</textarea>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset >
<legend>{|Lieferschein|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr [LIEFERSCHEIN_OHNE_POS_HIDDEN]>
<td>
{|Zugeordnet|}:
</td>
<td>
<input form="add" type="text" name="" id="" value="[LIEFERSCHEIN_OHNE_POS]" size="40" disabled>
<a href="index.php?module=lieferschein&action=edit&id=[LIEFERSCHEIN_OHNE_POS_ID]"><img src="themes/new/images/forward.svg" title="Zum Lieferschein" border="0" style="top:6px; position:relative"></a>
</td>
</tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]>
<td>
{|Lieferschein für Artikel hinzuf&uuml;gen|}:
</td>
<td>
<input form="add" type="text" name="lieferschein" id="lieferschein" value="[LIEFERSCHEIN]" autofocus size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td><button form="save" name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_hinzufuegen" class="ui-button-icon" style="width:100%;">Artikel hinzuf&uuml;gen</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Alle Artikel hinzuf&uuml;gen</button></td></tr>
<tr [PAKETMARKE_ADD_HIDDEN]><td><button form="paketmarke" name="submit" value="paketmarke" class="ui-button-icon" style="width:100%;">Paketmarke drucken</button></td></tr>
<tr [ABSENDEN_HIDDEN]><td><button name="submit" value="absenden" class="ui-button-icon" style="width:100%;">Absenden</button></td></tr>
<tr [ABSCHLIESSEN_HIDDEN]><td><button name="submit" value="abschliessen" class="ui-button-icon" style="width:100%;">Abschlie&szlig;en</button></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<form id="add" action="index.php?module=versandpakete&action=add&id=[ID]" method="post">
</form>
<form id="paketmarke" action="index.php?module=versandpakete&action=paketmarke&id=[ID]" method="post">
</form>
<div class="row" [LIEFERSCHEIN_POS_HIDDEN]>
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Paketinhalt|}</legend>
[PAKETINHALT]
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,50 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
<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>{|<b>Lieferung zu <font color="blue"><a href="index.php?module=lieferschein&action=edit&id=[BELEGID]">Lieferschein [BELEGNR]</a></font></b>|}</legend>
</fieldset>
</div>
</div>
</div>
</div>
[MESSAGE]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<form action="index.php?module=versandpakete&action=stapelverarbeitung&from=lieferung&id=[FROMID]" id="frmauto" name="frmauto" method="post">
[TAB1]
<fieldset>
<table>
<legend>Stapelverarbeitung</legend>
<tr>
<tr><td>{|Status|}:</td><td><select name="status">[STATUS_OPTIONS]</select></td></tr>
<td><input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;</td><td><input type="submit" class="btnBlue" name="status_setzen" value="{|Status setzen|}" /></td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</div>
</div>
[TAB1NEXT]
</div>
</div>
<script>
$('#autoalle').on('change',function(){
var wert = $(this).prop('checked');
$('#versandpakete_list').find('input[type="checkbox"]').prop('checked',wert);
$('#versandpakete_list').find('input[type="checkbox"]').first().trigger('change');
});
</script>

View File

@ -1,32 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</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">
[STATUSFILTER]
<li class="filter-item">
<label for="unterwegs" class="switch">
<input type="checkbox" id="unterwegs">
<span class="slider round"></span>
</label>
<label for="unterwegs">{|Unterwegs|}</label>
</li>
<li class="filter-item">
<label for="geschlossene" class="switch">
<input type="checkbox" id="geschlossene">
<span class="slider round"></span>
</label>
<label for="geschlossene">{|Zzgl. abgeschlossen|}</label>
</li>
</ul>
</div>
</div>
[TAB1]
[TAB1NEXT]
</div>
</div>

View File

@ -1,53 +0,0 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</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">
[STATUSFILTER]
<li class="filter-item">
<label for="geschlossene" class="switch">
<input type="checkbox" id="geschlossene">
<span class="slider round"></span>
</label>
<label for="geschlossene">{|Zzgl. abgeschlossen|}</label>
</li>
<li class="filter-item">
<label for="stornierte" class="switch">
<input type="checkbox" id="stornierte">
<span class="slider round"></span>
</label>
<label for="stornierte">{|Zzgl. Papierkorb|}</label>
</li>
</ul>
</div>
</div>
<form action="index.php?module=versandpakete&action=stapelverarbeitung" id="frmauto" name="frmauto" method="post">
[TAB1]
<fieldset>
<table>
<legend>Stapelverarbeitung</legend>
<tr>
<tr><td>{|Status|}:</td><td><select name="status">[STATUS_OPTIONS]</select></td></tr>
<td><input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;</td><td><input type="submit" class="btnBlue" name="status_setzen" value="{|Status setzen|}" /></td>
</tr>
</table>
</fieldset>
</form>
[TAB1NEXT]
</div>
</div>
<script>
$('#autoalle').on('change',function(){
var wert = $(this).prop('checked');
$('#versandpakete_list').find('input[type="checkbox"]').prop('checked',wert);
$('#versandpakete_list').find('input[type="checkbox"]').first().trigger('change');
});
</script>

View File

@ -3,19 +3,6 @@
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
<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="abgeschlossen" class="switch">
<input type="checkbox" id="abgeschlossen">
<span class="slider round"></span>
</label>
<label for="abgeschlossen">{|Inkl. abgeschlossene|}</label>
</ul>
</div>
</div>
[MESSAGE]
[TAB1]
[TAB1NEXT]

View File

@ -6,19 +6,15 @@
<table height="80" width="100%"><tr><td>
<fieldset class="usersave"><legend>&nbsp;Filter</legend>
<center>
<form method="POST">
<table width="100%" cellspacing="5">
<tr>
<td width="33%"><input type="checkbox" id="eigene" title="nur Artikel vom Lieferant anzeigen">&nbsp;<label for="eigene">{|Nur Artikel vom Lieferant anzeigen|}</label></td>
<td width="33%">{|Artikel|}: <input type="text" size="40" name="artikel" autofocus id="artikel" /></td>
<td width="33%">{|Menge|}: <input type="number" size="40" name="menge" id="menge" value="1"/></td>
<td width="33%"><button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Weiter|}</button></td>
</tr>
</table>
</center>
</fieldset>
</td></tr></table>
<table width="100%" cellspacing="5">
<tr>
<td width="33%"><input type="checkbox" id="eigene" title="nur Artikel vom Lieferant anzeigen">&nbsp;<label for="eigene">{|Nur Artikel vom Lieferant anzeigen|}</label></td>
<td width="33%">{|Scannen|}: <form method="POST"><input type="text" size="40" name="artikel" autofocus id="artikel" /></form></td>
<td width="33%"></td>
</tr></table>
</center>
</fieldset>
</td></tr></table>
[MESSAGE]
[TAB1]

View File

@ -15,14 +15,14 @@
<table height="200" border="0" width="450">
<tr valign="top"><td><b>Artikel:</b></td><td><u>[NAME]</u></td></tr>
<tr valign="top"><td><b>Menge:</b></td><td>[MENGE]</td></tr>
<!--<tr valign="top"><td>Lieferant:</td><td>[LIEFERANT]</td></tr> -->
<tr valign="top"><td><br></td><td align="center"></td></tr>
<tr valign="top"><td><b>Bemerkung:</b></td><td><textarea cols="35" rows="2" name="bemerkung">[BEMERKUNG]</textarea>
</td></tr>
<tr valign="top"><td><br></td><td align="center"></td></tr>
<tr valign="top"><td nowrap><b>Anmerkung:</b></td><td>Artikel zu Mitarbeiter [MITARBEITER] bringen
[DISPLAY_WARENEINGANG_RMA_HOOK1]
<tr valign="top"><td><br></td><td align="center"><input type="submit" name="submit" value="Buchen" />&nbsp;<input type="button" onclick="window.location.href='index.php?module=wareneingang&action=distriinhalt&id=[ID]'" value="Abbrechen" /></td></tr>
<tr valign="top"><td><br></td><td align="center"><input type="submit" name="submit" value="Speichern" />&nbsp;<input type="button" onclick="window.location.href='index.php?module=wareneingang&action=distriinhalt&id=[ID]'" value="Abbrechen" /></td></tr>
</td></tr>
</table>

View File

@ -12,10 +12,10 @@
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<div class="filter-box filter-usersave">
<div class="filter-block filter-inline">
<div class="filter-block filter-inline">
<fieldset>
<legend>{|Neuen Wareneingang erzeugen|}</legend>
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">

View File

@ -1,239 +1,161 @@
<!-- gehort zu tabview -->
<div id="tabs">
<ul> [BEFORETAB1]
<li><a href="#tabs-1">[TAB1TEXT]</a></li>[AFTERTAB1] [BEFORETAB2]
<li><a href="#tabs-2">[TAB2TEXT]</a></li>[AFTERTAB2] [BEFORETAB3]
<li><a href="#tabs-3">[TAB3TEXT]</a></li>[AFTERTAB3] </ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<input type="hidden" id="paketannahme_id" value="[ID]" /> [BEFORETAB1]
<form action="" method="post">
<div id="tabs-1"> [TAB1START] [MESSAGE1] [MESSAGE]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-5 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|[LEGENDE]|}</legend>
<table>
<tr>
<td>{|Status|}:</td>
<td>
<input type=text size="40" value="[STATUS]" disabled>
</td>
</tr>
<tr [ABGESCHLOSSENHIDDEN]>
<td></td>
<td><i>Abgeschlossen am [DATUM_ABGESCHLOSSEN] durch [BEARBEITER_ABGESCHLOSSEN]</i></td>
</tr>
<tr>
<td>{|Lieferschein-Nr.|}:</td>
<td>
<input type=text size="40" name="lsnr" value="[LSNR]">
</td>
</tr>
<tr>
<td>{|Rechnung-Nr.|}:</td>
<td>
<input type=text size="40" name="renr" value="[RENR]">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-12 col-md-5 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table>
<tr>
<td>{|Bemerkung|}:</td>
<td>
<textarea rows="5" cols="40" name="bemerkung">[BEMERKUNG]</textarea>
</td>
</tr>
[ISLIEFERANTSTART]
[ISLIEFERANTENDE]
</table>
</fieldset>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset> [BUTTONS] [BEFOREFRM] [AFTERFRM] [DISTRIINHALTBUTTONS] [BEFOREFRM] [AFTERFRM]
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern">{|Speichern|}</button>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
<ul>
[BEFORETAB1]<li><a href="#tabs-1">[TAB1TEXT]</a></li>[AFTERTAB1]
[BEFORETAB2]<li><a href="#tabs-2">[TAB2TEXT]</a></li>[AFTERTAB2]
[BEFORETAB3]<li><a href="#tabs-3">[TAB3TEXT]</a></li>[AFTERTAB3]
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<input type="hidden" id="paketannahme_id" value="[ID]" />
[BEFORETAB1]
<div id="tabs-1">
[TAB1START]
[MESSAGE1]
<form action="" method="post">
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|[LEGENDE]|}</legend>
<table>
<tr><td>{|Lieferschein-Nr.|}:</td><td><input type=text size="40" name="lsnr" value=[LSNR]></td></tr>
<tr><td>{|Rechnung-Nr.|}:</td><td><input type=text size="40" name="renr" value=[RENR]></td></tr>
<tr><td>{|Bemerkung|}:</td><td><textarea rows="5" cols="40" name="bemerkung">[BEMERKUNG]</textarea></td></tr>
[ISLIEFERANTSTART]
<tr><td>{|Ziellager|}:</td><td><input type=text size="40" name="ziellager" id="ziellager" value=[LAGER]></td></tr>
[ISLIEFERANTENDE]
</table>
</fieldset>
</div>
<div class="row" [HINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="ausfuellen" class="switch">
<input type="checkbox" id="ausfuellen">
<span class="slider round"></span>
</label>
<label for="ausfuellen">{|Aus&uuml;llen|}</label>
</li>
</ul>
</div>
</div>
[TAB1]
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset> [BUTTONS] [BEFOREFRM] [AFTERFRM] [DISTRIINHALTBUTTONS] [BEFOREFRM] [AFTERFRM]
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
[ISLIEFERANTSTART]
<tr [HINZUFUEGENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="hinzufuegen">{|Hinzuf&uuml;gen|}</button>
</td>
</tr>
[ISLIEFERANTENDE]
[ISNOTLIEFERANTSTART]
<tr [HINZUFUEGENHIDDEN]>
<td>
{|Multifilter|}:
</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<input type="text" name="multifilter" id="multifilter" value="[MULTIFILTER]" size="20" style="width:98%;" form="">
</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuell_hinzufuegen">{|Hinzuf&uuml;gen|}</button>
</td>
</tr>
[ISNOTLIEFERANTENDE]
</table>
</fieldset>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
[BUTTONS]
[BEFOREFRM]
[AFTERFRM]
[DISTRIINHALTBUTTONS]
[BEFOREFRM]
[AFTERFRM]
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
[BEFOREMANUELLERFASSEN]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuellerfassen">{|Artikel manuell erfassen|}</button>
</td></tr>
[AFTERMANUELLERFASSEN]
[ISLIEFERANTSTART]
<!--
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="fuellen">{|Aus Bestellungen f&uuml;llen|}</button>
</td></tr>
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="leeren">{|Leeren|}</button>
</td></tr>
-->
[ISLIEFERANTENDE]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern">{|Speichern|}</button>
</td></tr>
[ISLIEFERANTSTART]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="buchen">{|Buchen|}</button>
</td></tr>
[ISLIEFERANTENDE]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschlie&szlig;en|}</button>
</td></tr>
</table>
</fieldset>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height"> [TAB1_SECOND] </div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [BUCHENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="vorlaeufige_buchen">{|Buchen|}</button>
</td>
</tr>
<tr [BUCHENHIDDEN]>
<td>
{|Ziellager|}:&nbsp;<img src="./themes/new/images/tooltip_grau.png" border="0" style="position: relative; left: 1px; top: 3px; z-index: 8;" class="wawitooltipicon" title="Wenn nicht angegeben, wird das Standardlager des Artikels bebucht.">
</td>
</tr>
<tr [BUCHENHIDDEN]>
<td>
<input type=text name="ziellager" id="ziellager" value="[LAGER]" style="width:98%;">
</td>
</tr>
<tr [ABSCHLIESSENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschlie&szlig;en|}</button>
</td>
</tr>
<tr [ABGESCHLOSSENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="oeffnen" form="oeffnen">{|&Ouml;ffnen|}</button>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
[TAB1ENDE]
</div> [AFTERTAB1] [BEFORETAB2]
<div id="tabs-2"> [TAB2START] [MESSAGE2]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height"> [TAB2]
<div class="center">[BUTTONS2]</div>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [HINZUFUEGENHIDDEN]>
<td>
{|Multifilter|}:&nbsp;<img src="./themes/new/images/tooltip_grau.png" border="0" style="position: relative; left: 1px; top: 3px; z-index: 8;" class="wawitooltipicon" title="Auswahl mehrerer Artikel &uuml;ber Name oder Nummer">
</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<input type="text" name="multifilter" id="multifilter" value="[MULTIFILTER]" size="20" style="width:98%;" form="">
</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuell_hinzufuegen">{|Hinzuf&uuml;gen|}</button>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div> [TAB2ENDE]
</div> [AFTERTAB2]
</form>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
[TAB1]
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
[TAB1_SECOND]
</div>
</div>
</div>
</div>
</form>
[TAB1ENDE]
</div>
[AFTERTAB1]
[BEFORETAB2]
<div id="tabs-2">
[TAB2START]
[MESSAGE2]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
[TAB2]
<div class="center">[BUTTONS2]</div>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
[BUTTONS]
</fieldset>
</div>
</div>
</div>
</div>
[TAB2ENDE]
</div>
[AFTERTAB2]
[BEFORETAB3]
<div id="tabs-3">
[TAB3START]
[MESSAGE3]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
[TAB3]
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
[BUTTONS]
</fieldset>
</div>
</div>
</div>
</div>
[TAB3ENDE]
</div>
[AFTERTAB3]
</div>
<form action="index.php?module=wareneingang&action=oeffnen" id="oeffnen" method="POST">
<input name="id" value="[ID]" hidden></input>
</form>
<script type="text/javascript">
$(document).ready(function() {
$("#tabs").tabs("option", "active", [TABINDEX]);
if($('#frmWareneingangDistribution').length) {
$('#btnabschliessen').on('click', function() {
$('#frmWareneingangDistribution').append('<input type="hidden" value="1" name="abschliessen" />');
$('#frmWareneingangDistribution').find('[name="submit"]').trigger('click');
});
}
});
$(document).ready(function() {
$( "#tabs" ).tabs( "option", "active", [TABINDEX]);
if($('#frmWareneingangDistribution').length) {
$('#btnabschliessen').on('click',function(){
$('#frmWareneingangDistribution').append('<input type="hidden" value="1" name="abschliessen" />');
$('#frmWareneingangDistribution').find('[name="submit"]').trigger('click');
});
}
});
</script>

View File

@ -1,7 +1,7 @@
<?php
/*
* Copyright (c) 2024 DBXE project
* Copyright (c) 2022 OpenXE project
*/
use Xentral\Components\Database\Exception\QueryFailureException;
@ -116,7 +116,6 @@ $width = array('10%'); // Fill out manually later
$input['ticketprojekt'] = $this->app->erp->ReplaceProjekt(true,$input['ticketprojekt'],true); // Parameters: Target db?, value, from form?
$input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
$input['ticketqueue'] = explode(" ",$input['ticketqueue'])[0]; // Just the label
$input['abdatum'] = $this->app->erp->ReplaceDatum(true,$input['abdatum'],true);
$columns = "id, ";
$values = "$id, ";
@ -147,6 +146,7 @@ $width = array('10%'); // Fill out manually later
else {
$sql = "INSERT INTO emailbackup (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
$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=emailbackup&action=list&msg=$msg");
@ -159,66 +159,31 @@ $width = array('10%'); // Fill out manually later
// Load values again from database
$result = $this->app->DB->SelectArr("SELECT id, angezeigtername, internebeschreibung, benutzername, passwort, server, smtp, ticket, imap_sentfolder_aktiv, imap_sentfolder, imap_port, imap_type, autoresponder, geschaeftsbriefvorlage, autoresponderbetreff, autorespondertext, projekt, emailbackup, adresse, firma, loeschtage, geloescht, ticketloeschen, ticketabgeschlossen, ticketqueue, ticketprojekt, ticketemaileingehend, smtp_extra, smtp_ssl, smtp_port, smtp_frommail, smtp_fromname, client_alias, smtp_authtype, smtp_authparam, smtp_loglevel, autosresponder_blacklist, eigenesignatur, signatur, mutex, abdatum, email, id FROM emailbackup"." WHERE id=$id");
if (!empty($result)) {
$emailbackup = $result[0];
}
foreach ($emailbackup as $key => $value) {
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
/*
* Add displayed items later
*
// Checkboxes
$this->app->Tpl->Set('SMTP_EXTRA', $emailbackup['smtp_extra']?'checked':'');
$this->app->Tpl->Set('SMTP_LOGLEVEL', $emailbackup['smtp_loglevel']?'checked':'');
$this->app->Tpl->Set('IMAP_SENTFOLDER_AKTIV', $emailbackup['imap_sentfolder_aktiv']?'checked':'');
$this->app->Tpl->Set('EMAILBACKUP', $emailbackup['emailbackup']?'checked':'');
$this->app->Tpl->Set('TICKET', $emailbackup['ticket']?'checked':'');
$this->app->Tpl->Set('TICKETLOESCHEN', $emailbackup['ticketloeschen']?'checked':'');
$this->app->Tpl->Set('TICKETABGESCHLOSSEN', $emailbackup['ticketabgeschlossen']?'checked':'');
$this->app->Tpl->Set('TICKETEMAILEINGEHEND', $emailbackup['ticketemaileingehend']?'checked':'');
$this->app->Tpl->Set('EIGENESIGNATUR', $emailbackup['eigenesignatur']?'checked':'');
$this->app->Tpl->Set('AUTORESPONDER', $emailbackup['autoresponder']?'checked':'');
$this->app->Tpl->Set('AUTOSRESPONDER_BLACKLIST', $emailbackup['autosresponder_blacklist']?'checked':'');
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
$this->app->Tpl->Add('EMAIL', $email);
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
*/
$this->app->YUI->CkEditor("signatur","internal", null, 'JQUERY');
$this->app->YUI->CkEditor("autoresponderbetreff","internal", null, 'JQUERY');
$this->app->YUI->CkEditor("autorespondertext","internal", null, 'JQUERY');
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$emailbackup['projekt'],false)); // Parameters: Target db?, value, from form?
$this->app->Tpl->Set('TICKETPROJEKT',$this->app->erp->ReplaceProjekt(false,$emailbackup['ticketprojekt'],false)); // Parameters: Target db?, value, from form?
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$emailbackup['adresse'],false)); // Convert ID to form display
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['projekt'],false)); // Parameters: Target db?, value, from form?
$this->app->Tpl->Set('TICKETPROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['ticketprojekt'],false)); // Parameters: Target db?, value, from form?
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$result[0]['adresse'],false)); // Convert ID to form display
$this->app->YUI->AutoComplete("projekt","projektname",1);
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
$this->app->YUI->AutoComplete("adresse","adresse");
$this->app->YUI->AutoComplete("ticketqueue","warteschlangename");
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
$this->app->YUI->DatePicker("abdatum");
$this->app->Tpl->Set('ABDATUM',$this->app->erp->ReplaceDatum(false,$emailbackup['abdatum'],false));
$smtp_ssl_select = Array(
'0' => 'Keine',
'1' => 'TLS',
'2' => 'SSL'
);
$smtp_ssl_select = $this->app->erp->GetSelectAsso($smtp_ssl_select,$emailbackup['smtp_ssl']);
$this->app->Tpl->Set('SMTP_SSL_SELECT',$smtp_ssl_select);
$smtp_authtype_select = Array(
'' => 'Kein',
'smtp' => 'SMTP',
'oauth_google' => 'Oauth Google'
);
$smtp_authtype_select = $this->app->erp->GetSelectAsso($smtp_authtype_select,$emailbackup['smtp_authtype']);
$this->app->Tpl->Set('SMTP_AUTHTYPE_SELECT',$smtp_authtype_select);
$imap_type_select = Array(
'1' => 'Standard',
'3' => 'SSL',
'5' => 'Oauth'
);
$imap_type_select = $this->app->erp->GetSelectAsso($imap_type_select,$emailbackup['imap_type']);
$this->app->Tpl->Set('IMAP_TYPE_SELECT',$imap_type_select);
$this->app->Tpl->Parse('PAGE', "emailbackup_edit.tpl");
$this->app->Tpl->Parse('PAGE', "emailbackup_edit.tpl");
}
/**
@ -229,46 +194,47 @@ $width = array('10%'); // Fill out manually later
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
$input['angezeigtername'] = $this->app->Secure->GetPOST('angezeigtername');
$input['internebeschreibung'] = $this->app->Secure->GetPOST('internebeschreibung');
$input['benutzername'] = $this->app->Secure->GetPOST('benutzername');
$input['passwort'] = $this->app->Secure->GetPOST('passwort');
$input['server'] = $this->app->Secure->GetPOST('server');
$input['smtp'] = $this->app->Secure->GetPOST('smtp');
$input['ticket'] = $this->app->Secure->GetPOST('ticket');
$input['imap_sentfolder_aktiv'] = $this->app->Secure->GetPOST('imap_sentfolder_aktiv');
$input['imap_sentfolder'] = $this->app->Secure->GetPOST('imap_sentfolder');
$input['imap_port'] = $this->app->Secure->GetPOST('imap_port');
$input['imap_type'] = $this->app->Secure->GetPOST('imap_type');
$input['autoresponder'] = $this->app->Secure->GetPOST('autoresponder');
$input['geschaeftsbriefvorlage'] = $this->app->Secure->GetPOST('geschaeftsbriefvorlage');
$input['autoresponderbetreff'] = $this->app->Secure->GetPOST('autoresponderbetreff');
$input['autorespondertext'] = $this->app->Secure->GetPOST('autorespondertext');
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
$input['emailbackup'] = $this->app->Secure->GetPOST('emailbackup');
$input['adresse'] = $this->app->Secure->GetPOST('adresse');
$input['firma'] = $this->app->Secure->GetPOST('firma');
$input['loeschtage'] = $this->app->Secure->GetPOST('loeschtage');
$input['geloescht'] = $this->app->Secure->GetPOST('geloescht');
$input['ticketloeschen'] = $this->app->Secure->GetPOST('ticketloeschen');
$input['ticketabgeschlossen'] = $this->app->Secure->GetPOST('ticketabgeschlossen');
$input['ticketqueue'] = $this->app->Secure->GetPOST('ticketqueue');
$input['ticketprojekt'] = $this->app->Secure->GetPOST('ticketprojekt');
$input['ticketemaileingehend'] = $this->app->Secure->GetPOST('ticketemaileingehend');
$input['smtp_extra'] = $this->app->Secure->GetPOST('smtp_extra');
$input['smtp_ssl'] = $this->app->Secure->GetPOST('smtp_ssl');
$input['smtp_port'] = $this->app->Secure->GetPOST('smtp_port');
$input['smtp_frommail'] = $this->app->Secure->GetPOST('email'); // use only these
$input['smtp_fromname'] = $this->app->Secure->GetPOST('angezeigtername'); // use only these
$input['client_alias'] = $this->app->Secure->GetPOST('client_alias');
$input['smtp_authtype'] = $this->app->Secure->GetPOST('smtp_authtype');
$input['smtp_authparam'] = $this->app->Secure->GetPOST('smtp_authparam');
$input['smtp_loglevel'] = $this->app->Secure->GetPOST('smtp_loglevel');
$input['autosresponder_blacklist'] = $this->app->Secure->GetPOST('autosresponder_blacklist');
$input['eigenesignatur'] = $this->app->Secure->GetPOST('eigenesignatur');
$input['signatur'] = $this->app->Secure->GetPOST('signatur');
$input['mutex'] = $this->app->Secure->GetPOST('mutex');
$input['abdatum'] = $this->app->Secure->GetPOST('abdatum');
$input['email'] = $this->app->Secure->GetPOST('email');
$input['internebeschreibung'] = $this->app->Secure->GetPOST('internebeschreibung');
$input['benutzername'] = $this->app->Secure->GetPOST('benutzername');
$input['passwort'] = $this->app->Secure->GetPOST('passwort');
$input['server'] = $this->app->Secure->GetPOST('server');
$input['smtp'] = $this->app->Secure->GetPOST('smtp');
$input['ticket'] = $this->app->Secure->GetPOST('ticket');
$input['imap_sentfolder_aktiv'] = $this->app->Secure->GetPOST('imap_sentfolder_aktiv');
$input['imap_sentfolder'] = $this->app->Secure->GetPOST('imap_sentfolder');
$input['imap_port'] = $this->app->Secure->GetPOST('imap_port');
$input['imap_type'] = $this->app->Secure->GetPOST('imap_type');
$input['autoresponder'] = $this->app->Secure->GetPOST('autoresponder');
$input['geschaeftsbriefvorlage'] = $this->app->Secure->GetPOST('geschaeftsbriefvorlage');
$input['autoresponderbetreff'] = $this->app->Secure->GetPOST('autoresponderbetreff');
$input['autorespondertext'] = $this->app->Secure->GetPOST('autorespondertext');
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
$input['emailbackup'] = $this->app->Secure->GetPOST('emailbackup');
$input['adresse'] = $this->app->Secure->GetPOST('adresse');
$input['firma'] = $this->app->Secure->GetPOST('firma');
$input['loeschtage'] = $this->app->Secure->GetPOST('loeschtage');
$input['geloescht'] = $this->app->Secure->GetPOST('geloescht');
$input['ticketloeschen'] = $this->app->Secure->GetPOST('ticketloeschen');
$input['ticketabgeschlossen'] = $this->app->Secure->GetPOST('ticketabgeschlossen');
$input['ticketqueue'] = $this->app->Secure->GetPOST('ticketqueue');
$input['ticketprojekt'] = $this->app->Secure->GetPOST('ticketprojekt');
$input['ticketemaileingehend'] = $this->app->Secure->GetPOST('ticketemaileingehend');
$input['smtp_extra'] = $this->app->Secure->GetPOST('smtp_extra');
$input['smtp_ssl'] = $this->app->Secure->GetPOST('smtp_ssl');
$input['smtp_port'] = $this->app->Secure->GetPOST('smtp_port');
$input['smtp_frommail'] = $this->app->Secure->GetPOST('email'); // use only these
$input['smtp_fromname'] = $this->app->Secure->GetPOST('angezeigtername'); // use only these
$input['client_alias'] = $this->app->Secure->GetPOST('client_alias');
$input['smtp_authtype'] = $this->app->Secure->GetPOST('smtp_authtype');
$input['smtp_authparam'] = $this->app->Secure->GetPOST('smtp_authparam');
$input['smtp_loglevel'] = $this->app->Secure->GetPOST('smtp_loglevel');
$input['autosresponder_blacklist'] = $this->app->Secure->GetPOST('autosresponder_blacklist');
$input['eigenesignatur'] = $this->app->Secure->GetPOST('eigenesignatur');
$input['signatur'] = $this->app->Secure->GetPOST('signatur');
$input['mutex'] = $this->app->Secure->GetPOST('mutex');
$input['abdatum'] = $this->app->Secure->GetPOST('abdatum');
$input['email'] = $this->app->Secure->GetPOST('email');
return $input;
}
@ -279,7 +245,45 @@ $width = array('10%'); // Fill out manually later
function SetInput($input) {
// $this->app->Tpl->Set('EMAIL', $input['email']);
$this->app->Tpl->Set('ANGEZEIGTERNAME', $input['angezeigtername']);
$this->app->Tpl->Set('INTERNEBESCHREIBUNG', $input['internebeschreibung']);
$this->app->Tpl->Set('BENUTZERNAME', $input['benutzername']);
$this->app->Tpl->Set('PASSWORT', $input['passwort']);
$this->app->Tpl->Set('SERVER', $input['server']);
$this->app->Tpl->Set('SMTP', $input['smtp']);
$this->app->Tpl->Set('TICKET', $input['ticket']);
$this->app->Tpl->Set('IMAP_SENTFOLDER_AKTIV', $input['imap_sentfolder_aktiv']);
$this->app->Tpl->Set('IMAP_SENTFOLDER', $input['imap_sentfolder']);
$this->app->Tpl->Set('IMAP_PORT', $input['imap_port']);
$this->app->Tpl->Set('IMAP_TYPE', $input['imap_type']);
$this->app->Tpl->Set('AUTORESPONDER', $input['autoresponder']);
$this->app->Tpl->Set('GESCHAEFTSBRIEFVORLAGE', $input['geschaeftsbriefvorlage']);
$this->app->Tpl->Set('AUTORESPONDERBETREFF', $input['autoresponderbetreff']);
$this->app->Tpl->Set('AUTORESPONDERTEXT', $input['autorespondertext']);
$this->app->Tpl->Set('PROJEKT', $input['projekt']);
$this->app->Tpl->Set('EMAILBACKUP', $input['emailbackup']);
$this->app->Tpl->Set('ADRESSE', $input['adresse']);
$this->app->Tpl->Set('FIRMA', $input['firma']);
$this->app->Tpl->Set('LOESCHTAGE', $input['loeschtage']);
$this->app->Tpl->Set('GELOESCHT', $input['geloescht']);
$this->app->Tpl->Set('TICKETLOESCHEN', $input['ticketloeschen']);
$this->app->Tpl->Set('TICKETABGESCHLOSSEN', $input['ticketabgeschlossen']);
$this->app->Tpl->Set('TICKETQUEUE', $input['ticketqueue']);
$this->app->Tpl->Set('TICKETPROJEKT', $input['ticketprojekt']);
$this->app->Tpl->Set('TICKETEMAILEINGEHEND', $input['ticketemaileingehend']);
$this->app->Tpl->Set('SMTP_EXTRA', $input['smtp_extra']);
$this->app->Tpl->Set('SMTP_SSL', $input['smtp_ssl']);
$this->app->Tpl->Set('SMTP_PORT', $input['smtp_port']);
$this->app->Tpl->Set('CLIENT_ALIAS', $input['client_alias']);
$this->app->Tpl->Set('SMTP_AUTHTYPE', $input['smtp_authtype']);
$this->app->Tpl->Set('SMTP_AUTHPARAM', $input['smtp_authparam']);
$this->app->Tpl->Set('SMTP_LOGLEVEL', $input['smtp_loglevel']);
$this->app->Tpl->Set('AUTOSRESPONDER_BLACKLIST', $input['autosresponder_blacklist']);
$this->app->Tpl->Set('EIGENESIGNATUR', $input['eigenesignatur']);
$this->app->Tpl->Set('SIGNATUR', $input['signatur']);
$this->app->Tpl->Set('MUTEX', $input['mutex']);
$this->app->Tpl->Set('ABDATUM', $input['abdatum']);
$this->app->Tpl->Set('EMAIL', $input['email']);
}
@ -293,9 +297,9 @@ $width = array('10%'); // Fill out manually later
$this->app->erp->MailSend(
$result[0]['email'],
$result[0]['angezeigtername'],
array($result[0]['email']),
array($result[0]['angezeigtername']),
'DBXE ERP: Testmail',
$result[0]['email'],
$result[0]['angezeigtername'],
'OpenXE ERP: Testmail',
'Dies ist eine Testmail für Account "'.$result[0]['email'].'".',
'',0,false,'','',
true

View File

@ -77,7 +77,6 @@ class Exportbuchhaltung
$rgchecked = $this->app->Secure->GetPOST("rechnung");
$gschecked = $this->app->Secure->GetPOST("gutschrift");
$vbchecked = $this->app->Secure->GetPOST("verbindlichkeit");
$lgchecked = $this->app->Secure->GetPOST("lieferantengutschrift");
$diffignore = $this->app->Secure->GetPOST("diffignore");
$sachkonto = $this->app->Secure->GetPOST('sachkonto');
@ -98,7 +97,6 @@ class Exportbuchhaltung
$rgchecked = true;
$gschecked = true;
$vbchecked = true;
$lgchecked = true;
}
$missing_obligatory = array();
@ -136,8 +134,7 @@ class Exportbuchhaltung
if (
!$rgchecked &&
!$gschecked &&
!$vbchecked &&
!$lgchecked
!$vbchecked
) {
$msg = "<div class=error>Bitte mindestens eine Belegart auswählen.</div>";
$dataok = false;
@ -162,7 +159,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, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
header("Content-Disposition: attachment; filename=" . $filename);
header("Pragma: no-cache");
header("Expires: 0");
@ -201,7 +198,6 @@ class Exportbuchhaltung
$this->app->Tpl->SET('RGCHECKED',$rgchecked?'checked':'');
$this->app->Tpl->SET('GSCHECKED',$gschecked?'checked':'');
$this->app->Tpl->SET('VBCHECKED',$vbchecked?'checked':'');
$this->app->Tpl->SET('LGCHECKED',$lgchecked?'checked':'');
$this->app->Tpl->SET('DIFFIGNORE',$diffignore?'checked':'');
$this->app->Tpl->SET('VON', $von_form);
@ -216,7 +212,7 @@ class Exportbuchhaltung
* Create DATEV Buchhungsstapel
* @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, 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 {
$datev_header_definition = array (
'1' => 'Kennzeichen',
@ -451,12 +447,12 @@ class Exportbuchhaltung
'field_belegnr' => 'b.belegnr',
'field_name' => 'b.name',
'field_date' => 'datum',
'field_auftrag' => 'MAKE_SET(3,b.auftrag,(SELECT auftrag.internet FROM auftrag WHERE auftrag.id = auftragid))',
'field_zahlweise' => 'CONCAT(UCASE(LEFT(b.zahlungsweise, 1)),SUBSTRING(b.zahlungsweise, 2))',
'field_auftrag' => 'b.auftrag',
'field_kontonummer' => 'a.kundennummer_buchhaltung',
'field_kundennummer' => 'b.kundennummer',
'field_betrag_gesamt' => 'b.soll',
'field_betrag' => 'p.umsatz_brutto_gesamt',
'field_gegenkonto' => '\'\'',
'condition_where' => ' AND b.status IN (\'freigegeben\',\'versendet\',\'storniert\')',
'Buchungstyp' => 'SR',
'do' => $rechnung
@ -470,84 +466,54 @@ class Exportbuchhaltung
'field_name' => 'b.name',
'field_date' => 'datum',
'field_auftrag' => '\'\'',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.kundennummer_buchhaltung',
'field_kundennummer' => 'b.kundennummer',
'field_betrag_gesamt' => 'b.soll',
'field_betrag' => 'p.umsatz_brutto_gesamt',
'field_gegenkonto' => '\'\'',
'condition_where' => ' AND b.status IN (\'freigegeben\',\'versendet\')',
'Buchungstyp' => '',
'do' => $gutschrift
),
array(
'typ' => 'verbindlichkeit',
'subtable' => 'verbindlichkeit_position',
'subtable' => 'verbindlichkeit_kontierung',
'kennzeichen' => 'H',
'kennzeichen_negativ' => 'S',
'field_belegnr' => 'b.rechnung',
'field_name' => 'a.name',
'field_date' => 'rechnungsdatum',
'field_auftrag' => 'b.auftrag',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
'field_kundennummer' => 'a.lieferantennummer',
'field_betrag_gesamt' => 'b.betrag',
'field_betrag' => 'p.preis*p.menge*((100+p.steuersatz)/100)',
'field_gegenkonto' => '(SELECT sachkonto FROM kontorahmen k WHERE k.id = p.kontorahmen)',
'condition_where' => ' AND b.status IN (\'freigegeben\')',
'field_betrag' => 'p.betrag',
'field_gegenkonto' => 'gegenkonto',
'condition_where' => '',
'Buchungstyp' => '',
'do' => $verbindlichkeit
),
array(
'typ' => 'lieferantengutschrift',
'subtable' => 'lieferantengutschrift_position',
'kennzeichen' => 'S',
'kennzeichen_negativ' => 'H',
'field_belegnr' => 'b.rechnung',
'field_name' => 'a.name',
'field_date' => 'rechnungsdatum',
'field_auftrag' => '\'\'',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
'field_kundennummer' => 'a.lieferantennummer',
'field_betrag_gesamt' => 'b.betrag',
'field_betrag' => 'p.preis*p.menge*((100+p.steuersatz)/100)',
'field_gegenkonto' => '(SELECT sachkonto FROM kontorahmen k WHERE k.id = p.kontorahmen)',
'condition_where' => ' AND b.status IN (\'freigegeben\')',
'Buchungstyp' => '',
'do' => $lieferantengutschrift
)
);
foreach ($typen as $typ) {
if (!$typ['do']) {
continue;
}
if (!empty($typ['field_gegenkonto'])) {
$sql_gegenkonto = $typ['field_gegenkonto'];
} else
{
$sql_gegenkonto = "NULL";
}
$sql = "SELECT
".$typ['typ']." id,
".$typ['field_belegnr']." as belegnr,
".$typ['field_auftrag']." as auftrag,
".$typ['field_zahlweise']." as zahlweise,
if(".$typ['field_kontonummer']." <> '',".$typ['field_kontonummer'].",".$typ['field_kundennummer'].") as kundennummer,
".$typ['field_name']." as name,
a.ustid,
b.ustid,
b.".$typ['field_date']." as datum,
p.id as pos_id,
".$typ['field_betrag_gesamt']." as betrag_gesamt,
b.waehrung,
ROUND(".$typ['field_betrag'].",2) as betrag,
".$sql_gegenkonto." as gegenkonto,
b.waehrung as pos_waehrung
".$typ['field_gegenkonto']." as gegenkonto,
p.waehrung as pos_waehrung
FROM
".$typ['typ']." b
LEFT JOIN
@ -565,7 +531,6 @@ class Exportbuchhaltung
FROM
(
SELECT
id,
belegnr,
datum,
betrag_gesamt,
@ -577,10 +542,10 @@ class Exportbuchhaltung
FROM
(".$sql.") posten
GROUP BY
id
belegnr
) summen
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
$result = $this->app->DB->SelectArr($sql_check);
if (!empty($result)) {
@ -614,14 +579,13 @@ class Exportbuchhaltung
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
$data['Buchungstext'] = "Differenz";
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
$data['Auftragsnummer'] = $row['auftrag'];
$data['Zahlweise'] = $row['zahlweise'];
$data['Auftragsnummer'] = $row['auftrag'];
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
}
}
}
} // diffignore
// Query position data
$arr = $this->app->DB->Query($sql);
while ($row = $this->app->DB->Fetch_Assoc($arr)) {
@ -645,12 +609,12 @@ class Exportbuchhaltung
$data['Soll-/Haben-Kennzeichen'] = $typ['kennzeichen_negativ']; // obligatory
}
$data['EU-Steuersatz (Bestimmung)'] = number_format($tmpsteuersatz, 2, ',', '');
$data['EU-Steuersatz (Bestimmung)'] = number_format($$tmpsteuersatz, 2, ',', '');
$data['WKZ Umsatz'] = $row['pos_waehrung'];
$data['Belegfeld 1'] = mb_strimwidth($row['belegnr'],0,12);
$data['Konto'] = $row['kundennummer']; // obligatory
if (!empty($typ['field_gegenkonto'])) {
if ($typ['field_gegenkonto'] == 'gegenkonto') {
$data['Gegenkonto (ohne BU-Schlüssel)'] = $row['gegenkonto']; // obligatory
} else {
$data['Gegenkonto (ohne BU-Schlüssel)'] = $erloes; // obligatory
@ -661,7 +625,6 @@ class Exportbuchhaltung
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
$data['Auftragsnummer'] = ($row['auftrag']!=0)?$row['auftrag']:'';
$data['Zahlweise'] = $row['zahlweise'];
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
}

View File

@ -446,7 +446,6 @@ class Firmendaten {
'artikelnummer',
'preisanfrage',
'verbindlichkeit',
'lieferantengutschrift',
'receiptdocument',
];
if(in_array($cmd, $allowedNumbers)) {
@ -1704,7 +1703,6 @@ class Firmendaten {
$this->app->Tpl->Set('NEXT_ANFRAGE' , $data[0]['next_anfrage']);
$this->app->Tpl->Set('NEXT_PREISANFRAGE' , $data[0]['next_preisanfrage']);
$this->app->Tpl->Set('NEXT_VERBINDLICHKEIT', $data[0]['next_verbindlichkeit']);
$this->app->Tpl->Set('NEXT_LIEFERANTENGUTSCHRIFT', $data[0]['next_lieferantengutschrift']);
$this->app->Tpl->Set('NEXT_RECEIPTDOCUMENT', $data[0]['next_receiptdocument']);
//Briefpapier Hintergrund
@ -2062,7 +2060,6 @@ class Firmendaten {
$this->app->Tpl->Set('NEXT_ANFRAGE' , ($data['next_anfrage']));
$this->app->Tpl->Set('NEXT_PREISANFRAGE' , ($data['next_preisanfrage']));
$this->app->Tpl->Set('NEXT_VERBINDLICHKEIT', ($data['next_verbindlichkeit']));
$this->app->Tpl->Set('NEXT_LIEFERANTENGUTSCHRIFT', ($data['next_lieferantengutschrift']));
$this->app->Tpl->Set('NEXT_RECEIPTDOCUMENT', ($data['next_receiptdocument']));
//Briefpapier Hintergrund
@ -2286,7 +2283,6 @@ class Firmendaten {
$data['next_anfrage'] = ($this->app->Secure->POST["next_anfrage"]);
$data['next_preisanfrage'] = ($this->app->Secure->POST["next_preisanfrage"]);
$data['next_verbindlichkeit'] = ($this->app->Secure->POST["next_verbindlichkeit"]);
$data['next_lieferantengutschrift'] = ($this->app->Secure->POST["next_lieferantengutschrift"]);
$data['produktionsverhalten'] = $this->app->Secure->POST["produktionsverhalten"];
$data['sprachebevorzugen'] = ($this->app->Secure->POST["sprachebevorzugen"]);

View File

@ -1,207 +0,0 @@
<?php
/*
* Copyright (c) 2022 OpenXE project
*/
use Xentral\Components\Database\Exception\QueryFailureException;
class Kostenstellen {
function __construct($app, $intern = false) {
$this->app = $app;
if ($intern)
return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "kostenstellen_list");
$this->app->ActionHandler("create", "kostenstellen_edit"); // This automatically adds a "New" button
$this->app->ActionHandler("edit", "kostenstellen_edit");
$this->app->ActionHandler("delete", "kostenstellen_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 "kostenstellen_list":
$allowed['kostenstellen_list'] = array('list');
$heading = array('','','Nummer', 'Beschreibung', 'Internebemerkung', '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('k.id','k.id','k.nummer', 'k.beschreibung', 'k.internebemerkung');
$searchsql = array('k.nummer', 'k.beschreibung', 'k.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=\"',k.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=kostenstellen&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=kostenstellen&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 k.id, $dropnbox, k.nummer, k.beschreibung, k.internebemerkung, k.id FROM kostenstellen k";
$where = "1";
$count = "SELECT count(DISTINCT id) FROM kostenstellen WHERE $where";
// $groupby = "";
break;
}
$erg = false;
foreach ($erlaubtevars as $k => $v) {
if (isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
function kostenstellen_list() {
$this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=list", "&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=create", "Neu anlegen");
$this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck");
$this->app->YUI->TableSearch('TAB1', 'kostenstellen_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "kostenstellen_list.tpl");
}
public function kostenstellen_delete() {
$id = (int) $this->app->Secure->GetGET('id');
$this->app->DB->Delete("DELETE FROM `kostenstellen` WHERE `id` = '{$id}'");
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gel&ouml;scht.</div>");
$this->kostenstellen_list();
}
/*
* Edit kostenstellen item
* If id is empty, create a new one
*/
function kostenstellen_edit() {
$id = $this->app->Secure->GetGET('id');
// Check if other users are editing this id
if($this->app->erp->DisableModul('artikel',$id))
{
return;
}
$this->app->Tpl->Set('ID', $id);
$this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=edit&id=$id", "Details");
$this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=list", "Zur&uuml;ck zur &Uuml;bersicht");
$id = $this->app->Secure->GetGET('id');
$input = $this->GetInput();
$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 kostenstellen (".$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=kostenstellen&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=\"',k.id,'\" />') AS `auswahl`";
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS k.id, $dropnbox, k.nummer, k.beschreibung, k.internebemerkung, k.id FROM kostenstellen k"." WHERE id=$id");
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
if (!empty($result)) {
$kostenstellen_from_db = $result[0];
} else {
return;
}
/*
* 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->Tpl->Parse('PAGE', "kostenstellen_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['nummer'] = $this->app->Secure->GetPOST('nummer');
$input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung');
$input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung');
return $input;
}
}

View File

@ -174,7 +174,31 @@ class Lager extends GenLager {
// fester filter
$where = " l.geloescht=0 AND l.id!=0 AND l.lager='$id' ";
$count = "SELECT COUNT(id) FROM lager_platz WHERE geloescht=0 AND lager='$id' ";
break;
break;
case 'lagerletztebewegungen':
$allowed['lager'] = array('letztebewegungen');
// headings
// headings
$heading = array('Datum', 'Lager', 'Menge', 'Nummer', 'Artikel', 'Richtung', 'Referenz', 'Bearbeiter', 'Projekt', 'Men&uuml;');
$width = array('1%', '5%', '5%', '5%', '5%', '5%', '40%', '20%', '5%', '1%');
$findcols = array('zeit', 'lager', 'menge', 'nummer', 'name_de', 'Richtung', 'referenz', 'bearbeiter', 'projekt', 'id');
$searchsql = array('lpi.referenz', 'lpi.bearbeiter', 'p.abkuerzung', 'DATE_FORMAT(lpi.zeit,\'%d.%m.%Y\')', 'lp.kurzbezeichnung', 'a.name_de', 'a.nummer');
$defaultorder = 10; //Optional wenn andere Reihenfolge gewuenscht
$alignright = array(3);
$defaultorderdesc = 1;
$menu = "-";
$sql = "SELECT SQL_CALC_FOUND_ROWS lpi.id,
DATE_FORMAT(lpi.zeit,'%d.%m.%Y') as datum, lp.kurzbezeichnung as lager, trim(lpi.menge)+0 as menge,
a.nummer, a.name_de, if(lpi.eingang,'Eingang','Ausgang') as Richtung, substring(lpi.referenz,1,60) as referenz, lpi.bearbeiter as bearbeiter, p.abkuerzung as projekt,
lpi.id FROM lager_bewegung lpi LEFT JOIN lager_platz as lp ON lpi.lager_platz=lp.id LEFT JOIN projekt p ON lpi.projekt=p.id LEFT JOIN artikel a ON a.id=lpi.artikel";
$count = "SELECT COUNT(lpi.id) FROM lager_bewegung lpi LEFT JOIN lager_platz as lp ON lpi.lager_platz=lp.id LEFT JOIN projekt p ON lpi.projekt=p.id ";
break;
case 'lagertabelle':
$allowed['lager'] = array('list');
$defaultCountry = $app->erp->Firmendaten('land');
@ -808,23 +832,7 @@ class Lager extends GenLager {
$datecols = array(6);
$sql = "SELECT SQL_CALC_FOUND_ROWS
i.id,
l.bezeichnung,
lp.kurzbezeichnung as regal,
a.nummer,
a.name_de,
IF(i.eingang,
'Eingang',
'Ausgang'),
if(i.eingang,
CONCAT('+',' ',trim(i.menge)+0),CONCAT('-',' ',trim(i.menge)+0)) as menge,
".$app->erp->FormatDateTimeShort('i.zeit')." as datum,
i.referenz,
i.bearbeiter,
p.abkuerzung AS projektbewegung,
i.id
FROM lager_bewegung i LEFT JOIN lager_platz lp ON lp.id=i.lager_platz LEFT JOIN lager l ON lp.lager = l.id LEFT JOIN artikel a ON i.artikel=a.id LEFT JOIN projekt p ON l.projekt = p.id";
$sql = "SELECT SQL_CALC_FOUND_ROWS i.id, l.bezeichnung, lp.kurzbezeichnung as regal, a.nummer, a.name_de, IF(i.eingang, 'Eingang', 'Ausgang'), if(i.eingang, CONCAT('+', ' ', trim(i.menge)+0), CONCAT('-', ' ', trim(i.menge)+0)) as menge, DATE_FORMAT(i.zeit,'%d.%m.%Y') as datum, i.referenz, i.bearbeiter, p.abkuerzung AS projektbewegung, i.id FROM lager_bewegung i LEFT JOIN lager_platz lp ON lp.id=i.lager_platz LEFT JOIN lager l ON lp.lager = l.id LEFT JOIN artikel a ON i.artikel=a.id LEFT JOIN projekt p ON l.projekt = p.id";
$lager = $app->User->GetParameter("lager_bewegungalle_lager");
@ -1099,7 +1107,6 @@ class Lager extends GenLager {
$this->app->ActionHandler("buchenzwischenlagerdelete", "LagerBuchenZwischenlagerDelete");
$this->app->ActionHandler("bucheneinlagern", "LagerBuchenEinlagern");
$this->app->ActionHandler("buchenauslagern", "LagerBuchenAuslagern");
$this->app->ActionHandler("umlagernlieferschein", "LagerBuchenUmlagernLieferschein");
$this->app->ActionHandler("artikelentfernenreserviert", "LagerArtikelEntfernenReserviert");
$this->app->ActionHandler("letztebewegungen", "LagerLetzteBewegungen");
$this->app->ActionHandler("schnelleinlagern", "LagerSchnellEinlagern");
@ -3149,50 +3156,12 @@ class Lager extends GenLager {
$this->app->Tpl->Parse('PAGE', 'tabview.tpl');
}
function LagerBuchenUmlagernLieferschein() {
$this->LagerBuchenMenu();
$this->app->Tpl->AddMessage('info',"Gesamten Lagerplatz in einen neuen Lieferschein zur Umlagerung geben.");
$this->app->YUI->AutoComplete("quelllager", "lagerplatz");
$quelllager = $this->app->Secure->GetPOST('quelllager');
$submit = $this->app->Secure->GetPOST('submit');
if ($submit == 'lieferschein') {
$quellager_id = $this->app->erp->ReplaceLagerPlatz(true, $quelllager, true);
if (empty($quellager_id)) {
$this->app->Tpl->AddMessage('error',"Bitte Quelllager angeben.");
} else {
$sql = "SELECT artikel, SUM(menge) as menge FROM lager_platz_inhalt WHERE lager_platz=$quellager_id AND menge > 0 GROUP BY artikel";
$positionen = $this->app->DB->SelectArr($sql);
if (empty($positionen)) {
$this->app->Tpl->AddMessage('error',"Lager ist leer.");
} else {
$id = $this->app->erp->ImportCreateLieferschein(null);
if (!empty($id)) {
$this->app->erp->LieferscheinProtokoll($id,"Lieferschein aus Lager ".$quelllager." erstellt");
$this->app->DB->Update("UPDATE lieferschein SET standardlager = '$quellager_id' WHERE id = '$id' LIMIT 1");
foreach ($positionen as $position) {
// public function AddLieferscheinPositionArtikelID($lieferschein, $artikel,$menge,$bezeichnung,$beschreibung,$datum)
$this->app->erp->AddLieferscheinPositionArtikelID($id, $position['artikel'],$position['menge'],null,null,null);
}
$this->app->Location->execute("index.php?module=lieferschein&action=edit&id=$id");
} else {
$this->app->Tpl->AddMessage('error',"Lieferschein konnte nicht erzeugt werden.");
}
}
}
}
$this->app->Tpl->Set('QUELLLAGER',$this->app->erp->ReplaceLagerPlatz(false, $quellager_id, false));
$this->app->Tpl->Parse('PAGE', 'lager_umlagern_lieferschein.tpl');
}
function LagerLetzteBewegungen()
{
$this->LagerBuchenMenu();
$this->app->YUI->TableSearch('TAB1', 'lager_allebewegungenlist','show','','',basename(__FILE__), __CLASS__);
$this->app->YUI->TableSearch('TAB1', 'lagerletztebewegungen','show','','',basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', 'tabview.tpl');
}
@ -3202,7 +3171,6 @@ class Lager extends GenLager {
$this->app->erp->Headlines('Lager');
if($this->app->erp->Version()!=='stock') {
$this->app->erp->MenuEintrag("index.php?module=lager&action=buchenauslagern&cmd=umlagern&id=$id", 'Umlagern');
$this->app->erp->MenuEintrag("index.php?module=lager&action=umlagernlieferschein&id=$id", 'Umlagern mit Lieferschein');
$this->app->erp->MenuEintrag("index.php?module=lager&action=buchenauslagern&id=$id", 'Auslagern');
$this->app->erp->MenuEintrag("index.php?module=lager&action=bucheneinlagern&id=$id", 'Einlagern');
$this->app->erp->MenuEintrag("index.php?module=lager&action=buchenzwischenlager&id=$id", 'Zwischenlager');

File diff suppressed because it is too large Load Diff

View File

@ -194,7 +194,6 @@ class Lieferschein extends GenLieferschein
$this->app->ActionHandler("abschicken","LieferscheinAbschicken");
$this->app->ActionHandler("abschliessen","LieferscheinAbschliessen");
$this->app->ActionHandler("auslagern","LieferscheinAuslagern");
$this->app->ActionHandler("umlagern","LieferscheinUmlagern");
$this->app->ActionHandler("pdf","LieferscheinPDF");
$this->app->ActionHandler("inlinepdf","LieferscheinInlinePDF");
$this->app->ActionHandler("protokoll","LieferscheinProtokoll");
@ -454,107 +453,6 @@ class Lieferschein extends GenLieferschein
exit;
}
function LieferscheinUmlagern()
{
$id = (int)$this->app->Secure->GetGET("id");
$sql = "SELECT belegnr, name, status, umgelagert, standardlager FROM lieferschein WHERE id='$id'";
$lieferschein = $this->app->DB->SelectArr($sql)[0];
$belegnr = $lieferschein['belegnr'];
$name = $lieferschein['name'];
$status = $lieferschein['status'];
$umgelagert = $lieferschein['umgelagert'];
$quelllager = $this->app->Secure->GetPOST('quelllager');
$ziellager = $this->app->Secure->GetPOST('ziellager');
$quellager_id = $this->app->erp->ReplaceLagerPlatz(true, $quelllager, true);
$ziellager_id = $this->app->erp->ReplaceLagerPlatz(true, $ziellager, true);
if (empty($quellager_id)) {
$quellager_id = $lieferschein['standardlager'];
}
if ($status != "versendet" && $status != "freigegeben") {
exit();
}
$submit = $this->app->Secure->GetPOST('submit');
$erneut = $this->app->Secure->GetPOST('erneut');
if ($umgelagert && !$erneut) {
$this->app->Tpl->AddMessage('warning',"Lieferschein wurde bereits umgelagert.");
} else {
$this->app->Tpl->Set('ERNEUT_UMLAGERN_HIDDEN','hidden');
$submit = $this->app->Secure->GetPOST('submit');
if ($submit == 'umlagern') {
if (empty($quellager_id) || empty($ziellager_id)) {
$this->app->Tpl->AddMessage('error',"Bitte Quell- und Ziellager angeben.");
} else {
$sql = "SELECT artikel, name_de, a.nummer AS artikelnummer, SUM(menge) AS menge FROM lieferschein_position lp INNER JOIN artikel a ON a.id = lp.artikel WHERE lp.lieferschein = $id GROUP BY lp.artikel";
$positionen = $this->app->DB->SelectArr($sql);
$menge_ok = true;
$fehlt = array();
foreach ($positionen as $position) {
$sql = "SELECT SUM(menge) as menge FROM lager_platz_inhalt WHERE lager_platz=$quellager_id AND artikel = ".$position['artikel'];
$menge_lager = $this->app->DB->SelectArr($sql)[0]['menge'];
if ($menge_lager < $position['menge']) {
$menge_ok = false;
$fehlt[] = array('Nummer' => $position['artikelnummer'],'Artikel' => $position['name_de'],'Lieferschein Menge' => (int) $position['menge'],'Lager Menge' => empty($menge_lager)?'-':(int) $menge_lager);
}
}
if ($menge_ok) {
foreach ($positionen as $position) {
$artikel = $position['artikel'];
$menge = $position['menge'];
$projekt = 0;
$grund = "Umlagern Lieferschein ".$belegnr;
$importer = "";
$paketannahme = "";
$doctype = "lieferschein";
$doctypeId = $id;
$this->app->erp->LagerAuslagernRegal($artikel,$quellager_id,$menge,$projekt,$grund,$importer,$doctype,$doctypeid);
$this->app->erp->LagerEinlagern($artikel,$menge,$ziellager_id,$projekt,$grund,$importer,$paketannahme,$doctype,$doctypeid);
}
$sql = "UPDATE lieferschein SET umgelagert = 1 WHERE id = ".$id;
$this->app->DB->Update($sql);
$this->app->erp->LieferscheinProtokoll($id,"Lieferschein umgelagert von ".$quelllager." nach ".$ziellager);
$this->app->Tpl->AddMessage('success','Erfolgreich umgelagert.');
$erneut = null;
} else {
$this->app->Tpl->AddMessage('error',"Mengen im Quelllager nicht ausreichend.");
$tmp = new EasyTable($this->app);
$tmp->headings = array('Nummer','Artikel','Lieferschein Menge','Lager Menge','');
$tmp->datasets = $fehlt;
$tmp->DisplayNew('MESSAGETABLE',null,"noAction");
} // Menge ok
} // Lager ok
} // umlagern
} // $umgelagert
$this->LieferscheinMenu();
$this->app->YUI->AutoComplete("quelllager", "lagerplatz");
$this->app->YUI->AutoComplete("ziellager", "lagerplatz");
$this->app->Tpl->Set('KURZUEBERSCHRIFT2',"Lieferschein $belegnr umlagern");
$this->app->Tpl->Set('TABTEXT',"Umlagern");
$this->app->Tpl->Set('QUELLLAGER',$this->app->erp->ReplaceLagerPlatz(false, $quellager_id, false));
$this->app->Tpl->Set('ZIELLAGER',$this->app->erp->ReplaceLagerPlatz(false, $ziellager_id, false));
$this->app->Tpl->Set('ERNEUT_CHECKED',$erneut?'checked':'');
$this->app->Tpl->Parse('PAGE',"lieferschein_umlagern.tpl");
}
function LieferscheinPaketmarke()
{
$id = (int)$this->app->Secure->GetGET("id");
@ -570,8 +468,7 @@ class Lieferschein extends GenLieferschein
AND v.aktiv = 1 AND v.ausprojekt = 0 AND v.modul != ''
ORDER BY v.projekt DESC LIMIT 1");
if (empty($result['modul']) || empty($result['id'])) {
// $this->app->Tpl->addMessage('error', 'Bitte zuerst eine gültige Versandart auswählen', false, 'PAGE');
$this->app->Location->execute("index.php?module=versandpakete&action=add&lieferschein=".$id);
$this->app->Tpl->addMessage('error', 'Bitte zuerst eine gültige Versandart auswählen', false, 'PAGE');
return;
}
$versandmodul = $this->app->erp->LoadVersandModul($result['modul'], $result['id']);
@ -639,16 +536,16 @@ class Lieferschein extends GenLieferschein
function LieferscheinIconMenu($id,$prefix="")
{
$status = $this->app->DB->Select("SELECT status FROM lieferschein WHERE id='$id' LIMIT 1");
$adresse = $this->app->DB->Select("SELECT adresse FROM lieferschein WHERE id='$id' LIMIT 1");
$lieferantenretoure = $this->app->DB->Select("SELECT lieferantenretoure FROM lieferschein WHERE id='$id' LIMIT 1");
if($adresse > 0 && ($status=="angelegt" || $status==""))
if($status=="angelegt" || $status=="")
$freigabe = "<option value=\"freigabe\">Lieferschein freigeben</option>";
if(($status=="versendet" || $status=="freigegeben") && $lieferantenretoure=="1")
$abschliessen = "<option value=\"abschliessen\">Lieferschein abschliessen</option>";
$checkifrgexists = $this->app->DB->Select("SELECT id FROM rechnung WHERE lieferschein='$id' LIMIT 1");
$optioncustom = $this->Custom('option');
@ -676,34 +573,27 @@ class Lieferschein extends GenLieferschein
$mengegeliefert = $mengegeliefert + $this->app->DB->Select("SELECT ifnull(sum(olp.menge),0)+0 FROM objekt_lager_platz olp INNER JOIN lieferschein_position lp ON olp.objekt='lieferschein' AND olp.parameter=lp.id AND lp.lieferschein = '$id'");
if ($status == "versendet" || $status == "freigegeben") {
if($mengegeliefert <= 0 && $liefermengelagerartikel > 0 && $schreibschutz=="1" && $status!='angelegt' && $status!='storniert') {
$auslagern = '<option value="auslagern">Lieferschein auslagern</option>';
}else{
//12.07.19 LG lieferscheinlager als kommissionierverfahren zum if hinzugefuegt
$projektkommissionierverfahren = $this->app->DB->Select("SELECT kommissionierverfahren FROM projekt where id = '$projekt'");
if($projekt && ($projektkommissionierverfahren == "" || $projektkommissionierverfahren == "rechnungsmail" || $projektkommissionierverfahren == "lieferschein" || $projektkommissionierverfahren == "lieferscheinscan" || $projektkommissionierverfahren == "lieferscheinlager" || $projektkommissionierverfahren == "lieferscheinlagerscan"))
{
if(($bestellmengelagerartikel != $liefermengelagerartikel && $bestellmengelagerartikel != $liefermengelagerartikel2) && $status!='angelegt' && $status!='storniert') {
$auslagern = '<option value="auslagern">Lieferschein auslagern</option>';
}
}
}
$optionumlagern = "<option value=\"umlagern\">Lieferschein umlagern</option>";
$abschicken = "<option value=\"abschicken\">Lieferschein abschicken</option>";
if($status!="angelegt" && $lieferantenretoure!="1")
{
$alsrechnung = "<option value=\"rechnung\">als Rechnung weiterf&uuml;hren</option>";
if($this->app->erp->RechteVorhanden('lieferschein', 'proformarechnung') && $this->app->erp->ModulVorhanden('proformarechnung'))
{
$alsrechnung .= "<option value=\"proformarechnung\">als Proformarechnung weiterf&uuml;hren</option>";
}
if($mengegeliefert <= 0 && $liefermengelagerartikel > 0 && $schreibschutz=="1" && $status!='angelegt' && $status!='storniert') {
$auslagern = '<option value="auslagern">Lieferschein auslagern</option>';
}else{
//12.07.19 LG lieferscheinlager als kommissionierverfahren zum if hinzugefuegt
$projektkommissionierverfahren = $this->app->DB->Select("SELECT kommissionierverfahren FROM projekt where id = '$projekt'");
if($projekt && ($projektkommissionierverfahren == "" || $projektkommissionierverfahren == "rechnungsmail" || $projektkommissionierverfahren == "lieferschein" || $projektkommissionierverfahren == "lieferscheinscan" || $projektkommissionierverfahren == "lieferscheinlager" || $projektkommissionierverfahren == "lieferscheinlagerscan"))
{
if(($bestellmengelagerartikel != $liefermengelagerartikel && $bestellmengelagerartikel != $liefermengelagerartikel2) && $status!='angelegt' && $status!='storniert') {
$auslagern = '<option value="auslagern">Lieferschein auslagern</option>';
}
}
}
if($status!="angelegt" && $lieferantenretoure!="1")
{
$alsrechnung = "<option value=\"rechnung\">als Rechnung weiterf&uuml;hren</option>";
if($this->app->erp->RechteVorhanden('lieferschein', 'proformarechnung') && $this->app->erp->ModulVorhanden('proformarechnung'))
{
$alsrechnung .= "<option value=\"proformarechnung\">als Proformarechnung weiterf&uuml;hren</option>";
}
}
if($this->app->erp->RechteVorhanden('belegeimport', 'belegcsvexport'))
{
@ -738,7 +628,6 @@ class Lieferschein extends GenLieferschein
$casehook
$hookcase
$casebelegeimport
case 'umlagern': window.location.href='index.php?module=lieferschein&action=umlagern&id=%value%'; break;
}
}
@ -749,17 +638,16 @@ class Lieferschein extends GenLieferschein
<option value=\"storno\">Lieferschein stornieren</option>
<option value=\"copy\">Lieferschein kopieren</option>
$freigabe
$abschicken
<option value=\"abschicken\">Lieferschein abschicken</option>
$abschliessen
$auslagern
$optionumlagern
$alsrechnung
$optionbelegeimport
<option value=\"pdf\">PDF &ouml;ffnen</option>
$etiketten
$optioncustom
$optionhook
$hookoption
$hookoption
</select>&nbsp;
<a href=\"index.php?module=lieferschein&action=pdf&id=%value%\" title=\"PDF\"><img border=\"0\" src=\"./themes/new/images/pdf.svg\"></a>
@ -1072,7 +960,6 @@ class Lieferschein extends GenLieferschein
$this->app->Tpl->Set('VERSANDART',$auftragArr[0]['versandart']);
/*
$tracking = $this->app->DB->SelectArr("SELECT
if(v.tracking_link IS NOT NULL AND v.tracking_link != '', CONCAT(UPPER(versandunternehmen), ':<a href=\"', v.tracking_link, '\">', v.tracking, '</a>'),
if(versandunternehmen = 'dhlexpress' AND l.land = 'DE' AND v.tracking != '', CONCAT(UPPER(versandunternehmen), ':<a href=\"https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode=', v.tracking, '\" target=\"_blank\">', v.tracking, '</a>'),
@ -1131,32 +1018,7 @@ class Lieferschein extends GenLieferschein
if (!is_null($tmp)) {
$this->app->Tpl->Set('TRACKING',implode(', ',$tmp));
}
*/
$sql = "SELECT SQL_CALC_FOUND_ROWS
v.id,
v.tracking as tracking,
v.tracking_link
FROM
versandpakete v
LEFT JOIN
versandpaket_lieferschein_position vlp ON v.id = vlp.versandpaket
LEFT JOIN
lieferschein_position lp ON lp.id = vlp.lieferschein_position
LEFT JOIN
lieferschein l ON lp.lieferschein = l.id
WHERE l.id = ".$id." OR v.lieferschein_ohne_pos = ".$id."
GROUP BY
v.id
";
$tracking = $this->app->DB->SelectArr($sql);
$tracking_list = array();
foreach ($tracking as $single_tracking) {
$tracking_list[] = '<a href="index.php?module=versandpakete&action=edit&id='.$single_tracking['id'].'">Paket Nr.'.$single_tracking['id'].'</a>'.
' ('.'<a href="'.$single_tracking['tracking_link'].'">'.$single_tracking['tracking'].'</a>'.')';
}
$this->app->Tpl->Set('TRACKING',implode('<br>',$tracking_list));
$returnOrders = (array)$this->app->DB->SelectArr(
sprintf(
@ -2397,18 +2259,6 @@ class Lieferschein extends GenLieferschein
}
}
break;
case 'versanduebergabe':
if(!empty($selectedIds)) {
$this->app->DB->Update(
sprintf(
"UPDATE `lieferschein`
SET `versand_status` = 1
WHERE `id` IN (%s) AND `versand_status` = 0",
implode(',' , $selectedIds)
)
);
}
break;
}
}
}

56
www/pages/paketmarke.php Normal file
View File

@ -0,0 +1,56 @@
<?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
class Paketmarke {
/** @var Application $app */
var $app;
/**
* Paketmarke constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false) {
//parent::GenPaketmarke($app);
$this->app=$app;
if($intern) {
return;
}
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","PaketmarkeCreatePopup");
$this->app->ActionHandler("tracking","PaketmarkeTracking");
$this->app->ActionHandlerListen($app);
}
function PaketmarkeTracking()
{
$this->app->erp->Headlines('Paketmarken Drucker');
$this->app->Tpl->Set('PAGE',"Tracking-Nummer: <input type=\"text\" id=\"tracking\"><script type=\"text/javascript\">document.getElementById(\"tracking\").focus(); </script>");
//$this->app->BuildNavigation=false;
}
function PaketmarkeCreatePopup()
{
$this->app->erp->Headlines('Paketmarken Drucker');
$this->app->erp->PaketmarkeDHLEmbedded('PAGE','lieferschein');
}
}

View File

@ -2727,8 +2727,6 @@ class Projekt extends GenProjekt {
if($oldProjectId > 0){
$this->createAdditionalInputForCopyProjects($oldProjectId,$check);
$msg = $this->app->erp->base64_url_encode("<div class=\"info\">Das Projekt wurde erfolgreich kopiert.</div>");
$this->app->Location->execute("index.php?module=projekt&action=uebersicht&id=$check&msg=$msg");
return;
}
$msg = $this->app->erp->base64_url_encode("<div class=\"info\">Das Projekt wurde erfolgreich angelegt.</div>");
@ -2850,7 +2848,7 @@ class Projekt extends GenProjekt {
* @param int $copyProjectId
* @return bool
*/
public function createAdditionalInputForCopyProjects(int $oldProjectId, int $copyProjectId)
public function createAdditionalInputForCopyProjects(int $oldProjectId, int $copyProjectId): bool
{
$hasAdditionalInput = false;
$this->app->Tpl->Set('TOID',$copyProjectId);

View File

@ -2362,7 +2362,6 @@ class Rechnung extends GenRechnung
$belegmax = '';
$ohnebriefpapier = $this->app->erp->Firmendaten('rechnung_ohnebriefpapier');
$abweichendebezeichnung = $this->app->erp->Firmendaten('rechnungersatz_standard');
$usereditid = 0;
if(isset($this->app->User) && $this->app->User && method_exists($this->app->User,'GetID')){
@ -2376,24 +2375,24 @@ class Rechnung extends GenRechnung
zahlungszieltageskonto,
zahlungszielskonto,
lieferdatum,
status,projekt,adresse,auftragid,ohne_briefpapier,angelegtam,usereditid,abweichendebezeichnung)
status,projekt,adresse,auftragid,ohne_briefpapier,angelegtam,usereditid)
VALUES ('',NOW(),'','".$this->app->User->GetFirma()."','$belegmax','".$this->app->erp->StandardZahlungsweise($projekt)."',
'".$this->app->erp->ZahlungsZielTage($projekt)."',
'".$this->app->erp->ZahlungsZielTageSkonto($projekt)."',
'".$this->app->erp->ZahlungsZielSkonto($projekt)."',NOW(),
'angelegt','$projekt','$adresse',0,'".$ohnebriefpapier."',NOW(),'$usereditid','$abweichendebezeichnung')");
'angelegt','$projekt','$adresse',0,'".$ohnebriefpapier."',NOW(),'$usereditid')");
} else {
$this->app->DB->Insert("INSERT INTO rechnung (id,datum,bearbeiter,firma,belegnr,zahlungsweise,
zahlungszieltage,
zahlungszieltageskonto,
zahlungszielskonto,
lieferdatum,
status,projekt,adresse,auftragid,ohne_briefpapier,angelegtam,usereditid,abweichendebezeichnung)
status,projekt,adresse,auftragid,ohne_briefpapier,angelegtam,usereditid)
VALUES ('',NOW(),'','".$this->app->User->GetFirma()."','$belegmax','".$this->app->erp->StandardZahlungsweise($projekt)."',
'0',
'0',
'0',NOW(),
'angelegt','$projekt','$adresse',0,'".$ohnebriefpapier."',NOW(),'$usereditid','$abweichendebezeichnung')");
'angelegt','$projekt','$adresse',0,'".$ohnebriefpapier."',NOW(),'$usereditid')");
}
$id = $this->app->DB->GetInsertID();
@ -2519,6 +2518,9 @@ class Rechnung extends GenRechnung
$this->app->Secure->POST[$value] = str_replace("'", '&apos;',$arr[0][$value]);
$uparr[$value] = str_replace("'", '&apos;',$arr[0][$value]);
}
//$this->app->Secure->POST[$value] = $arr[0][$value];
//$uparr[$value] = $arr[0][$value];
}
$uparr['adresse'] = $adresse;
@ -2529,10 +2531,6 @@ class Rechnung extends GenRechnung
$uparr['ohne_briefpapier'] = '1';
}
if($this->app->erp->Firmendaten('rechnungersatz_standard')=='1'){
$uparr['abweichendebezeichnung']=1;
}
$this->app->DB->UpdateArr('rechnung',$id,'id',$uparr,true);
$uparr=null;

View File

@ -94,7 +94,7 @@ class Rechnungslauf {
DATE_ADD(@start, INTERVAL (FLOOR(TIMESTAMPDIFF(DAY, @start, IF(aa.enddatum = '0000-00-00' OR aa.enddatum > '$scalcdate', '$scalcdate', aa.enddatum)) / 30)+1)*30 DAY )
END, '%d.%m.%Y') SEPARATOR '<br>') as end,
SUM((100-aa.rabatt)/100 * aa.preis * aa.menge *
(GREATEST(aa.zahlzyklus, CASE
(CASE
WHEN aa.preisart = 'monat' THEN
TIMESTAMPDIFF(MONTH, @start, @end)
WHEN aa.preisart = 'jahr' THEN
@ -102,7 +102,7 @@ class Rechnungslauf {
WHEN aa.preisart = '30tage' THEN
FLOOR(TIMESTAMPDIFF(DAY, @start, @end) / 30)
END
))
)
) as amount,
adr.id
FROM abrechnungsartikel aa
@ -248,17 +248,6 @@ class Rechnungslauf {
$this->app->Tpl->addMessage('info', 'Die Aufträge werden nun im Hintergrund erstellt', false, 'MESSAGE_ORDERS');
}
}
$cronjobActive = $this->app->DB->Select(
"SELECT ps.id
FROM `prozessstarter` AS `ps`
WHERE ps.aktiv = 1 and (ps.parameter = 'rechnungslauf_manual')
LIMIT 1"
);
if(!$cronjobActive) {
$this->app->Tpl->addMessage('warning', 'Der Prozessstarter \'rechnungslauf_manual\' ist nicht aktiv');
}
$this->app->Tpl->Parse('PAGE', 'rechnungslauf_list.tpl');
}
@ -291,4 +280,4 @@ class Rechnungslauf {
$this->app->Tpl->Output('rechnungslauf_minidetail.tpl');
$this->app->ExitXentral();
}
}
}

View File

@ -109,7 +109,6 @@ class Report
$this->app->ActionHandler('transfer', 'ReportTransfer');
$this->app->ActionHandler('share', 'HandleActionShare');
$this->app->ActionHandler('export', 'ReportExport');
$this->app->ActionHandler('databaseview', 'DataBaseView');
$this->app->ActionHandlerListen($app);
$this->app->erp->Headlines('Berichte');
@ -527,29 +526,7 @@ class Report
IF(c.sum = 1, 'Ja', 'Nein') as `sum`, c.sequence, c.id
FROM `report_column` AS `c`";
break;
case 'databaseview':
$selectedtable = $this->app->User->GetParameter('report_databaseview_selectedtable');
$selectedcolumns = $this->app->User->GetParameter('report_databaseview_selectedcolumns');
if (!empty($selectedcolumns)) {
$columns = explode(',',$selectedcolumns);
} else {
$sql = "SHOW COLUMNS FROM `".$selectedtable."`";
$columns = array_column($this->app->DB->SelectArr($sql),'Field');
$columns = array_slice($columns,0,10);
}
$heading = $columns;
$heading[] = '';
$findcols = $columns;
$searchsql = $columns;
$sql = "SELECT `".$columns[0]."`, `".implode("`,`",$columns)."` from `".$selectedtable."`";
break;
}
$erg = [];
@ -3121,7 +3098,7 @@ class Report
'Zur&uuml;ck zur &Uuml;bersicht'
);
if ($action === 'list' or $action == 'databaseview') {
if ($action === 'list') {
$this->app->erp->MenuEintrag('index.php?module=report&action=list', '&Uuml;bersicht');
} else {
$this->app->erp->MenuEintrag(
@ -3141,7 +3118,6 @@ class Report
'Übertragung'
);
}
$this->app->erp->MenuEintrag('index.php?module=report&action=databaseview', 'Datenbankansicht');
}
/**
@ -3211,91 +3187,4 @@ class Report
}
}
}
function DataBaseView() {
$this->createMenu();
$this->template->Set('KURZUEBERSCHRIFT', 'Datenbank');
$sql = "SHOW TABLES";
$tables = $this->app->DB->SelectArr($sql);
$table_easytable = new EasyTable($this->app);
$table_easytable->headings = array('Tabelle');
foreach ($tables as $table) {
$table = reset($table);
$row = array(
'<a href="index.php?module=report&action=databaseview&table='.$table.'#tabs-2">'.$table.'</a>'
);
$table_easytable->AddRow($row);
}
$table_easytable->DisplayNew('TAB1');
$selectedtable = $this->app->Secure->GetGet('table');
if (!empty($selectedtable)) {
$this->app->User->SetParameter('report_databaseview_selectedtable',$selectedtable);
$submit = $this->app->Secure->GetPost('submit');
$selectedcolumns = $this->app->Secure->GetPost('auswahl');
$sql = "SHOW COLUMNS FROM `".$selectedtable."`";
$columns = $this->app->DB->SelectArr($sql);
$column_easytable = new EasyTable($this->app);
$column_easytable->headings = array_merge(['Auswahl'],array_keys(reset($columns)));
foreach ($columns as $column) {
$checked = '';
if (!empty($selectedcolumns)) {
if (in_array($column['Field'],$selectedcolumns)) {
$checked = 'checked';
}
}
$row = array();
$row[] = '<input type="checkbox" name="auswahl[]" '.$checked.' value="'.$column['Field'].'">';
$row = array_merge($row,$column);
$column_easytable->AddRow($row);
}
$column_easytable->DisplayNew('TAB2');
$this->app->Tpl->Set('TABLENAME',ucfirst($selectedtable));
switch($submit) {
case 'vorschau':
if (!empty($selectedcolumns)) {
$this->app->User->SetParameter('report_databaseview_selectedcolumns',implode(',',$selectedcolumns));
} else {
$this->app->YUI->Message('warning','Spalten w&auml;hlen');
}
$this->app->YUI->TableSearch('TAB3', 'databaseview', 'show', '', '', basename(__FILE__), __CLASS__);
break;
case 'erzeugen':
$selectedcolumns = $this->app->User->GetParameter('report_databaseview_selectedcolumns');
$columns = explode(',',$selectedcolumns);
$sql = "SELECT `".implode("`,`",$columns)."` from `".$selectedtable."`";
$name = $this->service->generateIncrementedReportName(ucfirst($selectedtable));
$userId = $this->app->User->GetID();
$report = ReportData::fromFormData(['name' => $name, 'sql_query' => $sql, 'description' => 'Erzeugt aus Datenbankansicht Tabelle '.ucfirst($selectedtable)]);
$newId = $this->service->saveReport($report);
if ($newId > 0) {
$this->service->saveReportUserArray([
'report_id' => $newId,
'user_id' => $userId,
'name' => $this->app->User->GetName(),
'chart_enabled' => 0,
'file_enabled' => 0,
'menu_enabled' => 0,
'tab_enabled' => 0,
]);
$report = $this->gateway->getReportById($newId);
$newReport = $this->service->autoCreateColumns($report);
$newId = $this->service->saveReport($newReport);
header('Location: index.php?module=report&action=edit&id='.$newId);
} else {
$this->app->YUI->Message('error','Bericht konnte nicht erzeugt werden');
}
break;
}
} else {
$this->app->YUI->Message('warning','Tabelle w&auml;hlen');
}
$this->template->Parse('PAGE', 'report_databaseview.tpl');
}
}

View File

@ -23,7 +23,6 @@ class Shopimporter_Presta extends ShopimporterBase
// TODO
private $langidToIso = [3 => 'de', 1 => 'en'];
private $taxationByDestinationCountry;
private $orderSearchLimit;
public function __construct($app, $intern = false)
@ -285,20 +284,17 @@ class Shopimporter_Presta extends ShopimporterBase
$cart['articlelist'] = [];
foreach ($order->associations->order_rows->order_row as $order_row) {
$article = [
$steuersatz = (strval($order_row->unit_price_tax_incl) / strval($order_row->unit_price_tax_excl)) - 1;
$steuersatz = round($steuersatz, 1);
$cart['articlelist'][] = [
'articleid' => strval($order_row->product_reference),
'name' => strval($order_row->product_name),
'quantity' => strval($order_row->product_quantity),
'price_netto' => strval($order_row->unit_price_tax_excl),
'steuersatz' => $steuersatz
];
if ($order_row->unit_price_tax_excl > 0) {
$steuersatz = (strval($order_row->unit_price_tax_incl) / strval($order_row->unit_price_tax_excl)) - 1;
$steuersatz = round($steuersatz, 1);
$article['steuersatz'] = $steuersatz;
}
$cart['articlelist'][] = $article;
}
$fetchedOrders[] = [
@ -385,26 +381,13 @@ class Shopimporter_Presta extends ShopimporterBase
$res['kurztext_de'] = strip_tags($shortdescriptions['de']);
$res['kurztext_en'] = strip_tags($shortdescriptions['en']);
$res['hersteller'] = strval($product->product->manufacturer_name);
$res['metakeywords_de'] = $metakeywords['de'];
$res['metakeywords_en'] = $metakeywords['en'];
$res['metatitle_de'] = $metatitles['de'];
$res['metatitle_en'] = $metatitles['en'];
$res['metadescription_de'] = $metadescriptions['de'];
$res['metadescription_en'] = $metadescriptions['en'];
$tags = $product->product->associations->tags->tag;
$keywords = [];
foreach ($tags as $tag) {
$tagid = intval($tag->id);
$endpoint = "tags/{$tagid}";
$tagdata = $this->prestaRequest('GET', $endpoint);
$tagiso = $this->langidToIso[intval($tagdata->tag->id_lang)];
$tagvalue = strval($tagdata->tag->name);
if (!array_key_exists($tagiso, $keywords))
$keywords[$tagiso] = [];
$keywords[$tagiso][] = $tagvalue;
}
$res['metakeywords_de'] = join(',', $keywords['de'] ?? []);
$res['metakeywords_en'] = join(',', $keywords['en'] ?? []);
$images = [];
foreach ($product->product->associations->images->image as $img) {
$endpoint = "images/products/$productId/$img->id";

View File

@ -23,7 +23,6 @@ class Ticket {
$this->app->ActionHandler("text_ausgang", "ticket_text_ausgang"); // Output text for iframe display
$this->app->ActionHandler("statusfix", "ticket_statusfix"); // Xentral 20 compatibility set all ticket status to latest ticket_nachricht status
$this->app->ActionHandler("datefix", "ticket_datefix"); // Xentral 20 compatibility set all ticket dates to latest ticket_nachricht date
$this->app->ActionHandler("dateien", "ticket_dateien");
$this->app->DefaultActionHandler("list");
$this->app->ActionHandlerListen($app);
}
@ -187,7 +186,6 @@ class Ticket {
// Process multi action
$auswahl = $this->app->Secure->GetPOST('auswahl');
$submit = $this->app->Secure->GetPOST('submit');
$selectedIds = [];
if(!empty($auswahl)) {
foreach($auswahl as $selectedId) {
@ -197,71 +195,19 @@ class Ticket {
}
}
switch ($submit) {
case 'zuordnen':
$status = $this->app->Secure->GetPOST('status');
$warteschlange = $this->app->Secure->GetPOST('warteschlange');
$status = $this->app->Secure->GetPOST('status');
$warteschlange = $this->app->Secure->GetPOST('warteschlange');
$sql = "UPDATE ticket SET status = '".$status."', zeit = NOW()";
if ($warteschlange != '') {
$sql .= ", warteschlange = '".explode(" ",$warteschlange)[0]."'";
}
$sql = "UPDATE ticket SET status = '".$status."', zeit = NOW()";
if ($warteschlange != '') {
$sql .= ", warteschlange = '".explode(" ",$warteschlange)[0]."'";
}
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
$this->app->DB->Update($sql);
$this->ticket_set_self_assigned_status($selectedIds);
break;
case 'spam_filter':
if($this->app->erp->RechteVorhanden('ticketregeln','create')) {
$sql = "UPDATE ticket SET status = 'spam', zeit = NOW()";
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
$this->app->DB->Update($sql);
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
$this->app->DB->Update($sql);
foreach ($selectedIds as $selectedId) {
$this->ticket_set_self_assigned_status($selectedIds);
// Check existing
$sql = "SELECT id FROM ticket_regeln WHERE
empfaenger_email = '' AND
sender_email = (SELECT mailadresse FROM ticket WHERE id = ".$selectedId." LIMIT 1) AND
name = '' AND
betreff = '' AND
spam = 1 AND
aktiv = 1
";
if (!$this->app->DB->Select($sql)) {
$sql = "INSERT IGNORE INTO ticket_regeln (
empfaenger_email,
sender_email,
name,
betreff,
spam,
persoenlich,
prio,
dsgvo,
adresse,
warteschlange,
aktiv
) VALUES (
'',
(SELECT mailadresse FROM ticket WHERE id = ".$selectedId." LIMIT 1),
'',
'',
1,
0,
0,
0,
0,
'',
1
)";
$this->app->DB->Insert($sql);
}
}
}
break;
}
}
// List
@ -276,10 +222,6 @@ class Ticket {
$this->app->Tpl->Set('STATUS', $this->app->erp->GetStatusTicketSelect('neu'));
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
if(!$this->app->erp->RechteVorhanden('ticketregeln','create')) {
$this->app->Tpl->Set('SPAM_HIDDEN', 'hidden');
}
$this->app->YUI->TableSearch('TAB1', 'ticket_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "ticket_list.tpl");
}
@ -363,27 +305,6 @@ class Ticket {
}
}
function add_attachments_header_html($ticket_id, $templatepos) {
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('%','ticket_header',$ticket_id);
if (!empty($file_attachments)) {
$this->app->Tpl->Add($templatepos,"<tr><td>{|Anh&auml;nge|}:</td><td><div class=\"ticket_attachments\">");
foreach ($file_attachments as $file_attachment) {
$this->app->Tpl->Add($templatepos,
"<a href=\"index.php?module=dateien&action=send&id=".$file_attachment.
"\">".
htmlentities($this->app->erp->GetDateiName($file_attachment)).
" (".
$this->app->erp->GetDateiSize($file_attachment).
")".
"</a>".
"<br>");
}
$this->app->Tpl->Add($templatepos,"</div></td></tr>");
}
}
function add_messages_tpl($messages, $showdrafts) {
// Add Messages now
@ -669,19 +590,6 @@ class Ticket {
$this->app->Tpl->Parse('PAGE', "ticket_create.tpl");
}
function ticket_menu($id) {
$this->app->erp->MenuEintrag("index.php?module=ticket&action=edit&id=$id", "Details");
$this->app->erp->MenuEintrag("index.php?module=ticket&action=list", "Zur&uuml;ck zur &Uuml;bersicht");
$anzahldateien = $this->app->erp->AnzahlDateien("ticket_header",$id);
if ($anzahldateien > 0) {
$anzahldateien = " (".$anzahldateien.")";
} else {
$anzahldateien="";
}
$this->app->erp->MenuEintrag("index.php?module=ticket&action=dateien&id=$id", "Dateien".$anzahldateien);
}
function ticket_edit() {
$id = $this->app->Secure->GetGET('id');
@ -689,10 +597,10 @@ class Ticket {
return;
}
$this->ticket_menu($id);
$this->app->Tpl->Set('ID', $id);
$this->app->erp->MenuEintrag("index.php?module=ticket&action=edit&id=$id", "Details");
$this->app->erp->MenuEintrag("index.php?module=ticket&action=list", "Zur&uuml;ck zur &Uuml;bersicht");
$id = $this->app->Secure->GetGET('id');
$cmd = $this->app->Secure->GetGET('cmd');
$input = $this->GetInput();
@ -716,7 +624,7 @@ class Ticket {
$ticket_from_db = $this->app->DB->SelectArr($sql)[0];
$ticket_from_db['betreff'] = strip_tags($ticket_from_db['betreff']);
$ticket_from_db['betreff'] = htmlentities(strip_tags($ticket_from_db['betreff'])); //+ #20230916 XSS
foreach ($ticket_from_db as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
@ -813,12 +721,7 @@ class Ticket {
$messages = $this->get_messages_of_ticket($id, 1, NULL);
$recv_messages = $this->get_messages_of_ticket($id,"n.versendet != 1",NULL);
$an_alle = false;
switch ($submit) {
case 'neue_email_alle':
$an_alle = true;
// break omitted
case 'neue_email':
$senderName = $this->app->User->GetName()." (".$this->app->erp->GetFirmaAbsender().")";
@ -840,18 +743,17 @@ class Ticket {
$betreff = strip_tags($recv_messages[0]['betreff']); //+ #20230916 XSS
}
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='to'";
$to = $recv_messages[0]['mail'];
if ($an_alle) {
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='to'";
$to_additional = $this->app->DB->Select($sql);
if (!empty($to_additional)) {
$to .= ", ".$to_additional;
}
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='cc'";
$cc = $this->app->DB->Select($sql);
} else {
$cc = null;
}
$to_additional = $this->app->DB->Select($sql);
if (!empty($to_additional)) {
$to .= ", ".$to_additional;
}
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='cc'";
$cc = $this->app->DB->Select($sql);
}
else {
$betreff = $ticket_from_db['betreff'];
@ -993,19 +895,11 @@ class Ticket {
}
$this->add_messages_tpl($messages, false);
$this->add_attachments_header_html($id,'TICKET_ANHANG');
$this->app->Tpl->Set('MESSAGE', $msg);
$this->app->Tpl->Parse('PAGE', "ticket_edit.tpl");
}
function ticket_dateien()
{
$id = $this->app->Secure->GetGET("id");
$this->ticket_menu($id);
$this->app->Tpl->Add('UEBERSCHRIFT'," (Dateien)");
$this->app->YUI->DateiUpload('PAGE',"ticket_header",$id);
}
/**
* Get all paramters from html form and save into $input
*/

Some files were not shown because too many files have changed in this diff Show More