xrechnung smartytest

This commit is contained in:
OpenXE 2024-10-28 13:11:10 +01:00
parent cfb0cf4e4e
commit 052552adfb
4 changed files with 1115 additions and 0 deletions

279
www/pages/arbeitspaket.php Normal file
View File

@ -0,0 +1,279 @@
<?php
/*
* Copyright (c) 2022 OpenXE project
*/
use Xentral\Components\Database\Exception\QueryFailureException;
use Xentral\Modules\TransferSmartyTemplate\TransferSmartyTemplate;
class Arbeitspaket {
function __construct($app, $intern = false) {
$this->app = $app;
if ($intern)
return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "arbeitspaket_list");
$this->app->ActionHandler("create", "arbeitspaket_edit"); // This automatically adds a "New" button
$this->app->ActionHandler("edit", "arbeitspaket_edit");
$this->app->ActionHandler("delete", "arbeitspaket_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 "arbeitspaket_list":
$allowed['arbeitspaket_list'] = array('list');
$heading = array('','','Adresse', 'Aufgabe', 'Beschreibung', 'Projekt', 'Zeit_geplant', 'Kostenstelle', 'Status', 'Abgabe', 'Abgenommen', 'Abgenommen_von', 'Abgenommen_bemerkung', 'Initiator', 'Art', 'Abgabedatum', 'Logdatei', 'Geloescht', 'Vorgaenger', 'Kosten_geplant', 'Artikel_geplant', 'Auftragid', 'Abgerechnet', 'Cache_BE', 'Cache_PR', 'Cache_AN', 'Cache_AB', 'Cache_LS', 'Cache_RE', 'Cache_GS', 'Last_cache', 'Aktiv', 'Startdatum', 'Sort', 'Ek_geplant', 'Vk_geplant', 'Kalkulationbasis', 'Cache_PF', 'Farbe', 'Vkkalkulationbasis', 'Projektplanausblenden', '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('a.id','a.id','a.adresse', 'a.aufgabe', 'a.beschreibung', 'a.projekt', 'a.zeit_geplant', 'a.kostenstelle', 'a.status', 'a.abgabe', 'a.abgenommen', 'a.abgenommen_von', 'a.abgenommen_bemerkung', 'a.initiator', 'a.art', 'a.abgabedatum', 'a.logdatei', 'a.geloescht', 'a.vorgaenger', 'a.kosten_geplant', 'a.artikel_geplant', 'a.auftragid', 'a.abgerechnet', 'a.cache_BE', 'a.cache_PR', 'a.cache_AN', 'a.cache_AB', 'a.cache_LS', 'a.cache_RE', 'a.cache_GS', 'a.last_cache', 'a.aktiv', 'a.startdatum', 'a.sort', 'a.ek_geplant', 'a.vk_geplant', 'a.kalkulationbasis', 'a.cache_PF', 'a.farbe', 'a.vkkalkulationbasis', 'a.projektplanausblenden'); // use 'null' for non-searchable columns
$searchsql = array('a.adresse', 'a.aufgabe', 'a.beschreibung', 'a.projekt', 'a.zeit_geplant', 'a.kostenstelle', 'a.status', 'a.abgabe', 'a.abgenommen', 'a.abgenommen_von', 'a.abgenommen_bemerkung', 'a.initiator', 'a.art', 'a.abgabedatum', 'a.logdatei', 'a.geloescht', 'a.vorgaenger', 'a.kosten_geplant', 'a.artikel_geplant', 'a.auftragid', 'a.abgerechnet', 'a.cache_BE', 'a.cache_PR', 'a.cache_AN', 'a.cache_AB', 'a.cache_LS', 'a.cache_RE', 'a.cache_GS', 'a.last_cache', 'a.aktiv', 'a.startdatum', 'a.sort', 'a.ek_geplant', 'a.vk_geplant', 'a.kalkulationbasis', 'a.cache_PF', 'a.farbe', 'a.vkkalkulationbasis', 'a.projektplanausblenden');
$defaultorder = 1;
$defaultorderdesc = 0;
$aligncenter = array();
$alignright = array();
$numbercols = array();
$sumcol = array();
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
// $moreinfo = true; // Allow drop down details
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
// $menucol = 11; // Set id col for moredata/menu
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=arbeitspaket&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=arbeitspaket&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.adresse, a.aufgabe, a.beschreibung, a.projekt, a.zeit_geplant, a.kostenstelle, a.status, a.abgabe, a.abgenommen, a.abgenommen_von, a.abgenommen_bemerkung, a.initiator, a.art, a.abgabedatum, a.logdatei, a.geloescht, a.vorgaenger, a.kosten_geplant, a.artikel_geplant, a.auftragid, a.abgerechnet, a.cache_BE, a.cache_PR, a.cache_AN, a.cache_AB, a.cache_LS, a.cache_RE, a.cache_GS, a.last_cache, a.aktiv, a.startdatum, a.sort, a.ek_geplant, a.vk_geplant, a.kalkulationbasis, a.cache_PF, a.farbe, a.vkkalkulationbasis, a.projektplanausblenden, a.id FROM arbeitspaket a";
$where = "1";
$count = "SELECT count(DISTINCT id) FROM arbeitspaket WHERE $where";
// $groupby = "";
// echo($sql." WHERE ".$where." ".$groupby);
break;
}
$erg = false;
foreach ($erlaubtevars as $k => $v) {
if (isset($$v)) {
$erg[$v] = $$v;
}
}
return $erg;
}
function arbeitspaket_list() {
$this->app->erp->MenuEintrag("index.php?module=arbeitspaket&action=list", "&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=arbeitspaket&action=create", "Neu anlegen");
$this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck");
$smarty = new Smarty;
$smarty->assign('text', 'Smarty-Ausgabe für Rechnung 1');
$rechnung = $this->app->DB->SelectRow("
SELECT * FROM rechnung WHERE id = 1 LIMIT 1
");
$adresse = $this->app->DB->SelectArr("
SELECT * FROM adresse WHERE id = (SELECT adresse FROM rechnung WHERE id = 1 LIMIT 1)
");
$rechnung['adresse'] = $adresse;
$positionen = $this->app->DB->SelectArr("
SELECT * FROM rechnung_position WHERE rechnung = 1 ORDER BY sort ASC
");
$rechnung['positionen'] = $positionen;
$this->app->Tpl->Set('DUMP',print_r($rechnung,true));
$smarty->assign('rechnung', $rechnung);
$html = $smarty->fetch('../www/pages/content/smarty/smartytest.tpl');
$this->app->Tpl->Set('SMARTY', $html);
$this->app->YUI->TableSearch('TAB1', 'arbeitspaket_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "arbeitspaket_list.tpl");
}
public function arbeitspaket_delete() {
$id = (int) $this->app->Secure->GetGET('id');
$this->app->DB->Delete("DELETE FROM `arbeitspaket` WHERE `id` = '{$id}'");
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gel&ouml;scht');
$this->arbeitspaket_list();
}
/*
* Edit arbeitspaket item
* If id is empty, create a new one
*/
function arbeitspaket_edit() {
$id = $this->app->Secure->GetGET('id');
// Check if other users are editing this id
if($this->app->erp->DisableModul('arbeitspaket',$id))
{
return;
}
$this->app->Tpl->Set('ID', $id);
$this->app->erp->MenuEintrag("index.php?module=arbeitspaket&action=edit&id=$id", "Details");
$this->app->erp->MenuEintrag("index.php?module=arbeitspaket&action=list", "Zur&uuml;ck zur &Uuml;bersicht");
$id = $this->app->Secure->GetGET('id');
$input = $this->GetInput();
// Convert here
// $input['prio'] = !empty($this->app->Secure->GetPOST('prio'))?"1":"0";
$submit = $this->app->Secure->GetPOST('submit');
if (empty($id)) {
// New item
$id = 'NULL';
}
if ($submit != '')
{
// Write to database
// Add checks here
// $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
$columns = "id, ";
$values = "$id, ";
$update = "";
$fix = "";
foreach ($input as $key => $value) {
$columns = $columns.$fix.$key;
$values = $values.$fix."'".$value."'";
$update = $update.$fix.$key." = '$value'";
$fix = ", ";
}
// echo($columns."<br>");
// echo($values."<br>");
// echo($update."<br>");
$sql = "INSERT INTO arbeitspaket (".$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=arbeitspaket&action=list&msg=$msg");
} else {
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich &uuml;bernommen.');
}
}
// Load values again from database
if ($id != 'NULL') {
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.adresse, a.aufgabe, a.beschreibung, a.projekt, a.zeit_geplant, a.kostenstelle, a.status, a.abgabe, a.abgenommen, a.abgenommen_von, a.abgenommen_bemerkung, a.initiator, a.art, a.abgabedatum, a.logdatei, a.geloescht, a.vorgaenger, a.kosten_geplant, a.artikel_geplant, a.auftragid, a.abgerechnet, a.cache_BE, a.cache_PR, a.cache_AN, a.cache_AB, a.cache_LS, a.cache_RE, a.cache_GS, a.last_cache, a.aktiv, a.startdatum, a.sort, a.ek_geplant, a.vk_geplant, a.kalkulationbasis, a.cache_PF, a.farbe, a.vkkalkulationbasis, a.projektplanausblenden, a.id FROM arbeitspaket a"." WHERE id=$id");
foreach ($result[0] as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
if (!empty($result)) {
$arbeitspaket_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->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$arbeitspaket_from_db['projekt'],false));
$this->app->Tpl->Set('PRIO', $arbeitspaket_from_db['prio']==1?"checked":"");
*/
$this->app->Tpl->Parse('PAGE', "arbeitspaket_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['adresse'] = $this->app->Secure->GetPOST('adresse');
$input['aufgabe'] = $this->app->Secure->GetPOST('aufgabe');
$input['beschreibung'] = $this->app->Secure->GetPOST('beschreibung');
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
$input['zeit_geplant'] = $this->app->Secure->GetPOST('zeit_geplant');
$input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle');
$input['status'] = $this->app->Secure->GetPOST('status');
$input['abgabe'] = $this->app->Secure->GetPOST('abgabe');
$input['abgenommen'] = $this->app->Secure->GetPOST('abgenommen');
$input['abgenommen_von'] = $this->app->Secure->GetPOST('abgenommen_von');
$input['abgenommen_bemerkung'] = $this->app->Secure->GetPOST('abgenommen_bemerkung');
$input['initiator'] = $this->app->Secure->GetPOST('initiator');
$input['art'] = $this->app->Secure->GetPOST('art');
$input['abgabedatum'] = $this->app->Secure->GetPOST('abgabedatum');
$input['logdatei'] = $this->app->Secure->GetPOST('logdatei');
$input['geloescht'] = $this->app->Secure->GetPOST('geloescht');
$input['vorgaenger'] = $this->app->Secure->GetPOST('vorgaenger');
$input['kosten_geplant'] = $this->app->Secure->GetPOST('kosten_geplant');
$input['artikel_geplant'] = $this->app->Secure->GetPOST('artikel_geplant');
$input['auftragid'] = $this->app->Secure->GetPOST('auftragid');
$input['abgerechnet'] = $this->app->Secure->GetPOST('abgerechnet');
$input['cache_BE'] = $this->app->Secure->GetPOST('cache_BE');
$input['cache_PR'] = $this->app->Secure->GetPOST('cache_PR');
$input['cache_AN'] = $this->app->Secure->GetPOST('cache_AN');
$input['cache_AB'] = $this->app->Secure->GetPOST('cache_AB');
$input['cache_LS'] = $this->app->Secure->GetPOST('cache_LS');
$input['cache_RE'] = $this->app->Secure->GetPOST('cache_RE');
$input['cache_GS'] = $this->app->Secure->GetPOST('cache_GS');
$input['last_cache'] = $this->app->Secure->GetPOST('last_cache');
$input['aktiv'] = $this->app->Secure->GetPOST('aktiv');
$input['startdatum'] = $this->app->Secure->GetPOST('startdatum');
$input['sort'] = $this->app->Secure->GetPOST('sort');
$input['ek_geplant'] = $this->app->Secure->GetPOST('ek_geplant');
$input['vk_geplant'] = $this->app->Secure->GetPOST('vk_geplant');
$input['kalkulationbasis'] = $this->app->Secure->GetPOST('kalkulationbasis');
$input['cache_PF'] = $this->app->Secure->GetPOST('cache_PF');
$input['farbe'] = $this->app->Secure->GetPOST('farbe');
$input['vkkalkulationbasis'] = $this->app->Secure->GetPOST('vkkalkulationbasis');
$input['projektplanausblenden'] = $this->app->Secure->GetPOST('projektplanausblenden');
return $input;
}
}

View File

@ -0,0 +1,695 @@
<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>-->arbeitspaket|}</legend><i>Info like this.</i>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Adresse|}:
</td>
<td>
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20">
</td>
</tr>
<tr>
<td>
{|Aufgabe|}:
</td>
<td>
<input type="text" name="aufgabe" id="aufgabe" value="[AUFGABE]" size="20">
</td>
</tr>
<tr>
<td>
{|Beschreibung|}:
</td>
<td>
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Zeit_geplant|}:
</td>
<td>
<input type="text" name="zeit_geplant" id="zeit_geplant" value="[ZEIT_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kostenstelle|}:
</td>
<td>
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
</td>
</tr>
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" name="status" id="status" value="[STATUS]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgabe|}:
</td>
<td>
<input type="text" name="abgabe" id="abgabe" value="[ABGABE]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen|}:
</td>
<td>
<input type="text" name="abgenommen" id="abgenommen" value="[ABGENOMMEN]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen_von|}:
</td>
<td>
<input type="text" name="abgenommen_von" id="abgenommen_von" value="[ABGENOMMEN_VON]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen_bemerkung|}:
</td>
<td>
<input type="text" name="abgenommen_bemerkung" id="abgenommen_bemerkung" value="[ABGENOMMEN_BEMERKUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Initiator|}:
</td>
<td>
<input type="text" name="initiator" id="initiator" value="[INITIATOR]" size="20">
</td>
</tr>
<tr>
<td>
{|Art|}:
</td>
<td>
<input type="text" name="art" id="art" value="[ART]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgabedatum|}:
</td>
<td>
<input type="text" name="abgabedatum" id="abgabedatum" value="[ABGABEDATUM]" size="20">
</td>
</tr>
<tr>
<td>
{|Logdatei|}:
</td>
<td>
<input type="text" name="logdatei" id="logdatei" value="[LOGDATEI]" size="20">
</td>
</tr>
<tr>
<td>
{|Geloescht|}:
</td>
<td>
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
</td>
</tr>
<tr>
<td>
{|Vorgaenger|}:
</td>
<td>
<input type="text" name="vorgaenger" id="vorgaenger" value="[VORGAENGER]" size="20">
</td>
</tr>
<tr>
<td>
{|Kosten_geplant|}:
</td>
<td>
<input type="text" name="kosten_geplant" id="kosten_geplant" value="[KOSTEN_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Artikel_geplant|}:
</td>
<td>
<input type="text" name="artikel_geplant" id="artikel_geplant" value="[ARTIKEL_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Auftragid|}:
</td>
<td>
<input type="text" name="auftragid" id="auftragid" value="[AUFTRAGID]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgerechnet|}:
</td>
<td>
<input type="text" name="abgerechnet" id="abgerechnet" value="[ABGERECHNET]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_BE|}:
</td>
<td>
<input type="text" name="cache_BE" id="cache_BE" value="[CACHE_BE]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_PR|}:
</td>
<td>
<input type="text" name="cache_PR" id="cache_PR" value="[CACHE_PR]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_AN|}:
</td>
<td>
<input type="text" name="cache_AN" id="cache_AN" value="[CACHE_AN]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_AB|}:
</td>
<td>
<input type="text" name="cache_AB" id="cache_AB" value="[CACHE_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_LS|}:
</td>
<td>
<input type="text" name="cache_LS" id="cache_LS" value="[CACHE_LS]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_RE|}:
</td>
<td>
<input type="text" name="cache_RE" id="cache_RE" value="[CACHE_RE]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_GS|}:
</td>
<td>
<input type="text" name="cache_GS" id="cache_GS" value="[CACHE_GS]" size="20">
</td>
</tr>
<tr>
<td>
{|Last_cache|}:
</td>
<td>
<input type="text" name="last_cache" id="last_cache" value="[LAST_CACHE]" size="20">
</td>
</tr>
<tr>
<td>
{|Aktiv|}:
</td>
<td>
<input type="text" name="aktiv" id="aktiv" value="[AKTIV]" size="20">
</td>
</tr>
<tr>
<td>
{|Startdatum|}:
</td>
<td>
<input type="text" name="startdatum" id="startdatum" value="[STARTDATUM]" size="20">
</td>
</tr>
<tr>
<td>
{|Sort|}:
</td>
<td>
<input type="text" name="sort" id="sort" value="[SORT]" size="20">
</td>
</tr>
<tr>
<td>
{|Ek_geplant|}:
</td>
<td>
<input type="text" name="ek_geplant" id="ek_geplant" value="[EK_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Vk_geplant|}:
</td>
<td>
<input type="text" name="vk_geplant" id="vk_geplant" value="[VK_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kalkulationbasis|}:
</td>
<td>
<input type="text" name="kalkulationbasis" id="kalkulationbasis" value="[KALKULATIONBASIS]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_PF|}:
</td>
<td>
<input type="text" name="cache_PF" id="cache_PF" value="[CACHE_PF]" size="20">
</td>
</tr>
<tr>
<td>
{|Farbe|}:
</td>
<td>
<input type="text" name="farbe" id="farbe" value="[FARBE]" size="20">
</td>
</tr>
<tr>
<td>
{|Vkkalkulationbasis|}:
</td>
<td>
<input type="text" name="vkkalkulationbasis" id="vkkalkulationbasis" value="[VKKALKULATIONBASIS]" size="20">
</td>
</tr>
<tr>
<td>
{|Projektplanausblenden|}:
</td>
<td>
<input type="text" name="projektplanausblenden" id="projektplanausblenden" value="[PROJEKTPLANAUSBLENDEN]" 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>
{|Adresse|}:
</td>
<td>
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20">
</td>
</tr>
<tr>
<td>
{|Aufgabe|}:
</td>
<td>
<input type="text" name="aufgabe" id="aufgabe" value="[AUFGABE]" size="20">
</td>
</tr>
<tr>
<td>
{|Beschreibung|}:
</td>
<td>
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Zeit_geplant|}:
</td>
<td>
<input type="text" name="zeit_geplant" id="zeit_geplant" value="[ZEIT_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kostenstelle|}:
</td>
<td>
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
</td>
</tr>
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" name="status" id="status" value="[STATUS]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgabe|}:
</td>
<td>
<input type="text" name="abgabe" id="abgabe" value="[ABGABE]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen|}:
</td>
<td>
<input type="text" name="abgenommen" id="abgenommen" value="[ABGENOMMEN]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen_von|}:
</td>
<td>
<input type="text" name="abgenommen_von" id="abgenommen_von" value="[ABGENOMMEN_VON]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgenommen_bemerkung|}:
</td>
<td>
<input type="text" name="abgenommen_bemerkung" id="abgenommen_bemerkung" value="[ABGENOMMEN_BEMERKUNG]" size="20">
</td>
</tr>
<tr>
<td>
{|Initiator|}:
</td>
<td>
<input type="text" name="initiator" id="initiator" value="[INITIATOR]" size="20">
</td>
</tr>
<tr>
<td>
{|Art|}:
</td>
<td>
<input type="text" name="art" id="art" value="[ART]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgabedatum|}:
</td>
<td>
<input type="text" name="abgabedatum" id="abgabedatum" value="[ABGABEDATUM]" size="20">
</td>
</tr>
<tr>
<td>
{|Logdatei|}:
</td>
<td>
<input type="text" name="logdatei" id="logdatei" value="[LOGDATEI]" size="20">
</td>
</tr>
<tr>
<td>
{|Geloescht|}:
</td>
<td>
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
</td>
</tr>
<tr>
<td>
{|Vorgaenger|}:
</td>
<td>
<input type="text" name="vorgaenger" id="vorgaenger" value="[VORGAENGER]" size="20">
</td>
</tr>
<tr>
<td>
{|Kosten_geplant|}:
</td>
<td>
<input type="text" name="kosten_geplant" id="kosten_geplant" value="[KOSTEN_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Artikel_geplant|}:
</td>
<td>
<input type="text" name="artikel_geplant" id="artikel_geplant" value="[ARTIKEL_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Auftragid|}:
</td>
<td>
<input type="text" name="auftragid" id="auftragid" value="[AUFTRAGID]" size="20">
</td>
</tr>
<tr>
<td>
{|Abgerechnet|}:
</td>
<td>
<input type="text" name="abgerechnet" id="abgerechnet" value="[ABGERECHNET]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_BE|}:
</td>
<td>
<input type="text" name="cache_BE" id="cache_BE" value="[CACHE_BE]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_PR|}:
</td>
<td>
<input type="text" name="cache_PR" id="cache_PR" value="[CACHE_PR]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_AN|}:
</td>
<td>
<input type="text" name="cache_AN" id="cache_AN" value="[CACHE_AN]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_AB|}:
</td>
<td>
<input type="text" name="cache_AB" id="cache_AB" value="[CACHE_AB]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_LS|}:
</td>
<td>
<input type="text" name="cache_LS" id="cache_LS" value="[CACHE_LS]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_RE|}:
</td>
<td>
<input type="text" name="cache_RE" id="cache_RE" value="[CACHE_RE]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_GS|}:
</td>
<td>
<input type="text" name="cache_GS" id="cache_GS" value="[CACHE_GS]" size="20">
</td>
</tr>
<tr>
<td>
{|Last_cache|}:
</td>
<td>
<input type="text" name="last_cache" id="last_cache" value="[LAST_CACHE]" size="20">
</td>
</tr>
<tr>
<td>
{|Aktiv|}:
</td>
<td>
<input type="text" name="aktiv" id="aktiv" value="[AKTIV]" size="20">
</td>
</tr>
<tr>
<td>
{|Startdatum|}:
</td>
<td>
<input type="text" name="startdatum" id="startdatum" value="[STARTDATUM]" size="20">
</td>
</tr>
<tr>
<td>
{|Sort|}:
</td>
<td>
<input type="text" name="sort" id="sort" value="[SORT]" size="20">
</td>
</tr>
<tr>
<td>
{|Ek_geplant|}:
</td>
<td>
<input type="text" name="ek_geplant" id="ek_geplant" value="[EK_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Vk_geplant|}:
</td>
<td>
<input type="text" name="vk_geplant" id="vk_geplant" value="[VK_GEPLANT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kalkulationbasis|}:
</td>
<td>
<input type="text" name="kalkulationbasis" id="kalkulationbasis" value="[KALKULATIONBASIS]" size="20">
</td>
</tr>
<tr>
<td>
{|Cache_PF|}:
</td>
<td>
<input type="text" name="cache_PF" id="cache_PF" value="[CACHE_PF]" size="20">
</td>
</tr>
<tr>
<td>
{|Farbe|}:
</td>
<td>
<input type="text" name="farbe" id="farbe" value="[FARBE]" size="20">
</td>
</tr>
<tr>
<td>
{|Vkkalkulationbasis|}:
</td>
<td>
<input type="text" name="vkkalkulationbasis" id="vkkalkulationbasis" value="[VKKALKULATIONBASIS]" size="20">
</td>
</tr>
<tr>
<td>
{|Projektplanausblenden|}:
</td>
<td>
<input type="text" name="projektplanausblenden" id="projektplanausblenden" value="[PROJEKTPLANAUSBLENDEN]" 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

@ -0,0 +1,12 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[TAB1]
<pre style="float:left; width:40%; min-height:800px;">[DUMP]</pre>
<textarea style="float:right; width:40%; min-height:800px;">[SMARTY]</textarea>
[TAB1NEXT]
</div>
</div>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>{$rechnung.belegnr}</cbc:ID>
<cbc:IssueDate>{$rechnung.datum}</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>#ADU#Es gelten unsere Allgem. Geschäftsbedingungen, die Sie unter […] finden.</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-12345-03</cbc:BuyerReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">seller@email.de</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>[Seller trading name]</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>[Seller address line 1]</cbc:StreetName>
<cbc:CityName>[Seller city]</cbc:CityName>
<cbc:PostalZone>12345</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE 123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>[Seller name]</cbc:RegistrationName>
<cbc:CompanyID>[HRA-Eintrag]</cbc:CompanyID>
<cbc:CompanyLegalForm>123/456/7890, HRA-Eintrag in […]</cbc:CompanyLegalForm>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>nicht vorhanden</cbc:Name>
<cbc:Telephone>+49 1234-5678</cbc:Telephone>
<cbc:ElectronicMail>seller@email.de</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">buyer@info.de</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>[Buyer identifier]</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>[Buyer address line 1]</cbc:StreetName>
<cbc:CityName>[Buyer city]</cbc:CityName>
<cbc:PostalZone>12345</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>[Buyer name]</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<!-- dies ist eine nicht existerende aber valide IBAN als test dummy -->
<cbc:ID>DE75512108001245126199</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Zahlbar sofort ohne Abzug.</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">22.04</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">314.86</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">22.04</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">$rechnung.10.17</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">314.86</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">336.9</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">336.9</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
{foreach from=$rechnung.positionen item=position}
<cac:InvoiceLine>
<cbc:ID>{$position.bezeichnung}</cbc:ID>
<cbc:Note>Die letzte Lieferung im Rahmen des abgerechneten Abonnements erfolgt in 12/2016 Lieferung erfolgt / erfolgte direkt vom Verlag</cbc:Note>
<cbc:InvoicedQuantity unitCode="XPP">{$position.menge}</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="{$position.waehrung}">{$position.umsatz_netto_gesamt|string_format:"%.2f"}</cbc:LineExtensionAmount>
<cac:InvoicePeriod>
<cbc:StartDate>2016-01-01</cbc:StartDate>
<cbc:EndDate>2016-12-31</cbc:EndDate>
</cac:InvoicePeriod>
<cac:OrderLineReference>
<cbc:LineID>6171175.1</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Zeitschrift Inland</cbc:Description>
<cbc:Name>Zeitschrift [...]</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>246</cbc:ID>
</cac:SellersItemIdentification>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="IB">0721-880X</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="{$position.waehrung}">{$position.umsatz_netto_gesamt|string_format:"%.2f"}</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
{/foreach}
</ubl:Invoice>