mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-12 06:41:14 +01:00
Merge branch 'smartyrechnung'
This commit is contained in:
commit
65a577bfb1
@ -3682,6 +3682,17 @@
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "rechnung_smarty_template",
|
||||
"Type": "int(11)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
}
|
||||
],
|
||||
"keys": [
|
||||
@ -119101,6 +119112,56 @@
|
||||
"Non_unique": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "smarty_templates",
|
||||
"collation": "utf8mb3_general_ci",
|
||||
"type": "BASE TABLE",
|
||||
"columns": [
|
||||
{
|
||||
"Field": "id",
|
||||
"Type": "int(11)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": null,
|
||||
"Extra": "auto_increment",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "name",
|
||||
"Type": "varchar(30)",
|
||||
"Collation": "utf8mb3_general_ci",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "template",
|
||||
"Type": "text",
|
||||
"Collation": "utf8mb3_general_ci",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
}
|
||||
],
|
||||
"keys": [
|
||||
{
|
||||
"Key_name": "PRIMARY",
|
||||
"Index_type": "BTREE",
|
||||
"columns": [
|
||||
"id"
|
||||
],
|
||||
"Non_unique": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
|
@ -13858,6 +13858,18 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
||||
}
|
||||
}
|
||||
|
||||
function ReplaceSmartyTemplate($db,$value,$fromform = null) {
|
||||
$value = $this->app->DB->real_escape_string($value);
|
||||
|
||||
if ($db) {
|
||||
$smarty_template = explode(' ',$value)[0];
|
||||
return($smarty_template);
|
||||
} else {
|
||||
$smarty_template = $this->app->DB->Select("SELECT CONCAT(id,' ',name) FROM smarty_templates WHERE id = '$value' LIMIT 1");
|
||||
return($smarty_template);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @refactor FormHelper Komponente
|
||||
function ReplaceLieferant($db,$value,$fromform)
|
||||
|
File diff suppressed because one or more lines are too long
@ -4224,6 +4224,14 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
|
||||
);
|
||||
|
||||
break;
|
||||
case "smarty_template":
|
||||
$newarr = $this->app->DB->SelectFirstCols(
|
||||
sprintf(
|
||||
"SELECT CONCAT(`id`,' ',`name`) FROM `smarty_templates` WHERE (`name` LIKE '%%%s%%')",
|
||||
$term
|
||||
)
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$newarr = null;
|
||||
$this->app->erp->RunHook('ajax_filter_hook1', 5,$filtername,$newarr, $term, $term2, $term3);
|
||||
|
@ -1,157 +1,237 @@
|
||||
<div class="inside">
|
||||
<fieldset><legend>{|Allgemein|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%"><a href="index.php?module=firmendaten&action=edit"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=benutzer&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=geschaeftsbrief_vorlagen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_3.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a [EMAILBACKUPLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_4.gif" border="0" width="30%"></a>[GREYEMAILBACKUP]</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=firmendaten&action=edit">{|Grundeinstellungen|}</a></td>
|
||||
<td><a href="index.php?module=benutzer&action=list">{|Benutzer|}</a></td>
|
||||
<td><a href="index.php?module=geschaeftsbrief_vorlagen&action=list">{|Geschäftsbrief Vorlagen|}</a></td>
|
||||
<td><a [EMAILBACKUPLINK]>{|E-Mail Accounts|}</a></td>
|
||||
</tr>
|
||||
<tr><td colspan="4"><br></td></tr>
|
||||
<fieldset>
|
||||
<legend>{|Allgemein|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%">
|
||||
<a href="index.php?module=firmendaten&action=edit"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=benutzer&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=geschaeftsbrief_vorlagen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_3.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [EMAILBACKUPLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_4.gif" border="0" width="30%" /></a>[GREYEMAILBACKUP]
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=firmendaten&action=edit">{|Grundeinstellungen|}</a></td>
|
||||
<td><a href="index.php?module=benutzer&action=list">{|Benutzer|}</a></td>
|
||||
<td><a href="index.php?module=geschaeftsbrief_vorlagen&action=list">{|Geschäftsbrief Vorlagen|}</a></td>
|
||||
<td><a [EMAILBACKUPLINK]>{|E-Mail Accounts|}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><br /></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td width="25%" style="position:relative"><a [TICKETVORLAGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_5.gif" border="0" width="30%"></a>[GREYTICKETVORLAGEN]</td>
|
||||
<td width="25%" style="position:relative"><a [WARTESCHLANGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_6.gif" border="0" width="30%"></a>[GREYWARTESCHLANGEN]</td>
|
||||
<!--<td width="25%"><a href="index.php?module=generic&action=edit"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_7.gif" border="0" width="30%"></a></td>-->
|
||||
<td width="25%" style="position:relative"><a [ARTIKELKATEGORIENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_15.gif" border="0" width="30%"></a>[GREYARTIKELKATEGORIEN]</td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=artikeleinheit&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [TICKETVORLAGENLINK]>{|Ticket Vorlagen|}</a></td>
|
||||
<td><a [WARTESCHLANGENLINK]>{|Ticket Warteschlangen|}</a></td>
|
||||
<!--<td><a href="index.php?module=generic&action=edit">Startseite</a></td>-->
|
||||
<td><a [ARTIKELKATEGORIENLINK]>{|Artikel Kategorien|}</a></td>
|
||||
<td><a href="index.php?module=artikeleinheit&action=list">{|Artikel Einheiten|}</a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [TICKETVORLAGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_5.gif" border="0" width="30%" /></a>[GREYTICKETVORLAGEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [WARTESCHLANGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_6.gif" border="0" width="30%" /></a>[GREYWARTESCHLANGEN]
|
||||
</td>
|
||||
<!--<td width="25%"><a href="index.php?module=generic&action=edit"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_7.gif" border="0" width="30%"></a></td>-->
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [ARTIKELKATEGORIENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_15.gif" border="0" width="30%" /></a>[GREYARTIKELKATEGORIEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=artikeleinheit&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [TICKETVORLAGENLINK]>{|Ticket Vorlagen|}</a></td>
|
||||
<td><a [WARTESCHLANGENLINK]>{|Ticket Warteschlangen|}</a></td>
|
||||
<!--<td><a href="index.php?module=generic&action=edit">Startseite</a></td>-->
|
||||
<td><a [ARTIKELKATEGORIENLINK]>{|Artikel Kategorien|}</a></td>
|
||||
<td><a href="index.php?module=artikeleinheit&action=list">{|Artikel Einheiten|}</a></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="4"><br></td></tr>
|
||||
<tr align="center">
|
||||
<td width="25%" style="position:relative"><a [GRUPPENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%"></a>[GREYGRUPPEN]</td>
|
||||
<td width="25%" style="position:relative"><a [USERVORLAGELINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%"></a>[GREYUSERVORLAGE]</td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=laender&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=kalender&action=gruppenlist"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [GRUPPENLINK]>{|Gruppen|}</a></td>
|
||||
<td><a [USERVORLAGELINK]>{|Benutzer Vorlage|}</a></td>
|
||||
<td><a href="index.php?module=laender&action=list">{|Länderliste|}</a></td>
|
||||
<td><a href="index.php?module=kalender&action=gruppenlist">{|Kalender Gruppen|}</a></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
<tr>
|
||||
<td colspan="4"><br /></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [GRUPPENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%" /></a>[GREYGRUPPEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [USERVORLAGELINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%" /></a>[GREYUSERVORLAGE]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=laender&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=kalender&action=gruppenlist"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_2.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [GRUPPENLINK]>{|Gruppen|}</a></td>
|
||||
<td><a [USERVORLAGELINK]>{|Benutzer Vorlage|}</a></td>
|
||||
<td><a href="index.php?module=laender&action=list">{|Länderliste|}</a></td>
|
||||
<td><a href="index.php?module=kalender&action=gruppenlist">{|Kalender Gruppen|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<fieldset><legend>{|Definitionen|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<fieldset>
|
||||
<legend>{|Definitionen|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [KONTENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%" /></a>[GREYKONTEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [KOSTENSTELLENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_17.gif" border="0" width="30%" /></a>[GREYKOSTENSTELLEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [KONTORAHMENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_18.gif" border="0" width="30%" /></a>[GREYKONTORAHMEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [ZOLLTARIFNUMMERLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%" /></a>[GREYZOLLTARIFNUMMER]
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [KONTENLINK]>{|Geschäftskonten|}</a></td>
|
||||
<td><a [KOSTENSTELLENLINK]>{|Kostenstellen|}</a></td>
|
||||
<td><a [KONTORAHMENLINK]>{|Kontenrahmen|}</a></td>
|
||||
<td><a [ZOLLTARIFNUMMERLINK]>{|Zolltarifnummer|}</a></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td width="25%" style="position:relative"><a [KONTENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYKONTEN]</td>
|
||||
<td width="25%" style="position:relative"><a [KOSTENSTELLENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_17.gif" border="0" width="30%"></a>[GREYKOSTENSTELLEN]</td>
|
||||
<td width="25%" style="position:relative"><a [KONTORAHMENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_18.gif" border="0" width="30%"></a>[GREYKONTORAHMEN]</td>
|
||||
<td width="25%" style="position:relative"><a [ZOLLTARIFNUMMERLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYZOLLTARIFNUMMER]</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a [KONTENLINK]>{|Geschäftskonten|}</a></td>
|
||||
<td><a [KOSTENSTELLENLINK]>{|Kostenstellen|}</a></td>
|
||||
<td><a [KONTORAHMENLINK]>{|Kontenrahmen|}</a></td>
|
||||
<td><a [ZOLLTARIFNUMMERLINK]>{|Zolltarifnummer|}</a></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=versandarten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=zahlungsweisen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a [LIEFERBEDINGUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYLIEFERBEDINGUNGEN]</td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=mahnwesen&action=einstellungen"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_11.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=versandarten&action=list">{|Versandarten|}</a></td>
|
||||
<td><a href="index.php?module=zahlungsweisen&action=list">{|Zahlungsweisen|}</a></td>
|
||||
<td><a [LIEFERBEDINGUNGENLINK]>{|Lieferbedingungen|}</a></td>
|
||||
<td><a href="index.php?module=mahnwesen&action=einstellungen">{|Mahnwesen|}</a></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
<tr align="center">
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=versandarten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=zahlungsweisen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [LIEFERBEDINGUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%" /></a>[GREYLIEFERBEDINGUNGEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=mahnwesen&action=einstellungen"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_11.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=versandarten&action=list">{|Versandarten|}</a></td>
|
||||
<td><a href="index.php?module=zahlungsweisen&action=list">{|Zahlungsweisen|}</a></td>
|
||||
<td><a [LIEFERBEDINGUNGENLINK]>{|Lieferbedingungen|}</a></td>
|
||||
<td><a href="index.php?module=mahnwesen&action=einstellungen">{|Mahnwesen|}</a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td width="25%" style="position: relative;">
|
||||
<a href="index.php?module=smarty_templates&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_26.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=smarty_templates&action=list">{|Smarty Templates|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<fieldset><legend>{|Online-Shop|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%"><a href="index.php?module=onlineshops&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%"></a></td>
|
||||
<!--<td width="25%"><a href="index.php?module=inhalt&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_21.gif" border="0" width="30%"></a></td>-->
|
||||
<!--<td width="25%"><a href="index.php?module=artikelgruppen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_15.gif" border="0" width="30%"></a></td>-->
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=onlineshops&action=list">Online-Shops</a></td>
|
||||
<!--<td><a href="index.php?module=inhalt&action=list">Online-Shop Content</a></td>-->
|
||||
<!--<td><a href="index.php?module=artikelgruppen&action=list">Artikelgruppen (Shop)</a></td>-->
|
||||
<td></td>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{|Online-Shop|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%">
|
||||
<a href="index.php?module=onlineshops&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<!--<td width="25%"><a href="index.php?module=inhalt&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_21.gif" border="0" width="30%"></a></td>-->
|
||||
<!--<td width="25%"><a href="index.php?module=artikelgruppen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_15.gif" border="0" width="30%"></a></td>-->
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
<td width="25%"></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=onlineshops&action=list">Online-Shops</a></td>
|
||||
<!--<td><a href="index.php?module=inhalt&action=list">Online-Shop Content</a></td>-->
|
||||
<!--<td><a href="index.php?module=artikelgruppen&action=list">Artikelgruppen (Shop)</a></td>-->
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<fieldset><legend>{|System|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%"><a href="index.php?module=prozessstarter&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=protokoll&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=logfile&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=log&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<fieldset>
|
||||
<legend>{|System|}</legend>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%">
|
||||
<a href="index.php?module=prozessstarter&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=protokoll&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=logfile&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=log&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_22.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Prozessstarter|}</a></td>
|
||||
<td><a href="index.php?module=protokoll&action=list">{|Protokoll|}</a></td>
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Logfile|}</a></td>
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Log|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%"><a href="index.php?module=etiketten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a [UEBERSETZUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%"></a>[GREYUEBERSETZUNGEN]</td>
|
||||
<td width="25%" style="position:relative"><a [ARBEITSFREIETAGELINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%"></a>[GREYARBEITSFREIETAGE]</td>
|
||||
<td width="25%"><a href="index.php?module=drucker&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_24.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Prozessstarter|}</a></td>
|
||||
<td><a href="index.php?module=protokoll&action=list">{|Protokoll|}</a></td>
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Logfile|}</a></td>
|
||||
<td><a href="index.php?module=prozessstarter&action=list">{|Log|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%">
|
||||
<a href="index.php?module=etiketten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [UEBERSETZUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%" /></a>[GREYUEBERSETZUNGEN]
|
||||
</td>
|
||||
<td width="25%" style="position: relative;">
|
||||
<a [ARBEITSFREIETAGELINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_14.gif" border="0" width="30%" /></a>[GREYARBEITSFREIETAGE]
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=drucker&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_24.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=etiketten&action=list">{|Etiketten|}</a></td>
|
||||
<td><a [UEBERSETZUNGENLINK]>{|Übersetzungen|}</a></td>
|
||||
<td width="25%"><a [ARBEITSFREIETAGELINK]>{|Arbeitsfreie Tage|}</a></td>
|
||||
<td><a href="index.php?module=drucker&action=list">{|Drucker|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=etiketten&action=list">{|Etiketten|}</a></td>
|
||||
<td><a [UEBERSETZUNGENLINK]>{|Übersetzungen|}</a></td>
|
||||
<td width="25%"><a [ARBEITSFREIETAGELINK]>{|Arbeitsfreie Tage|}</a></td>
|
||||
<td><a href="index.php?module=drucker&action=list">{|Drucker|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%">
|
||||
<a href="index.php?module=welcome&action=info"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_23.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=support&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_23.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=api_account&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_25.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
<td width="25%">
|
||||
<a href="index.php?module=adapterbox&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_25.gif" border="0" width="30%" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<table width="800" border="0" align="center">
|
||||
<tr align="center">
|
||||
<td width="25%"><a href="index.php?module=welcome&action=info"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_23.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=support&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_23.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%"><a href="index.php?module=api_account&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_25.gif" border="0" width="30%"></td>
|
||||
<td width="25%"><a href="index.php?module=adapterbox&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_25.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=welcome&action=info">{|Lizenz|}</a></td>
|
||||
<td><a href="index.php?module=support&action=list">{|Support|}</a></td>
|
||||
<td><a href="index.php?module=api_account&action=list">{|API-Account|}</a></td>
|
||||
<td><a href="index.php?module=adapterbox&action=list">{|Adapterbox|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=welcome&action=info">{|Lizenz|}</a></td>
|
||||
<td><a href="index.php?module=support&action=list">{|Support|}</a></td>
|
||||
<td><a href="index.php?module=api_account&action=list">{|API-Account|}</a></td>
|
||||
<td><a href="index.php?module=adapterbox&action=list">{|Adapterbox|}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
[SETTINGMODULES]
|
||||
|
||||
<br><br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
103
www/pages/content/smarty_templates_edit.tpl
Normal file
103
www/pages/content/smarty_templates_edit.tpl
Normal file
@ -0,0 +1,103 @@
|
||||
<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>-->Smarty Templates|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Name|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="name" id="name" value="[NAME]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Template|}:
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="template" id="template" rows="80" cols="180">[TEMPLATE]</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Example for 2nd row
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Another legend|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Name|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="name" id="name" value="[NAME]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Template|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="template" id="template" value="[TEMPLATE]" 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>
|
||||
|
10
www/pages/content/smarty_templates_list.tpl
Normal file
10
www/pages/content/smarty_templates_list.tpl
Normal file
@ -0,0 +1,10 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</div>
|
@ -55,6 +55,8 @@ class Rechnung extends GenRechnung
|
||||
$this->app->ActionHandler("freigabe","RechnungFreigabe");
|
||||
$this->app->ActionHandler("abschicken","RechnungAbschicken");
|
||||
$this->app->ActionHandler("pdf","RechnungPDF");
|
||||
$this->app->ActionHandler("xml","RechnungSmarty");
|
||||
$this->app->ActionHandler("json","RechnungJSON");
|
||||
$this->app->ActionHandler("alternativpdf","RechnungAlternativPDF");
|
||||
$this->app->ActionHandler("inlinepdf","RechnungInlinePDF");
|
||||
$this->app->ActionHandler("lastschrift","RechnungLastschrift");
|
||||
@ -549,6 +551,7 @@ class Rechnung extends GenRechnung
|
||||
$menu .= "
|
||||
|
||||
<a href=\"index.php?module=rechnung&action=pdf&id=%value%\"><img border=\"0\" src=\"./themes/new/images/pdf.svg\" title=\"PDF\"></a>
|
||||
<a href=\"index.php?module=rechnung&action=xml&id=%value%\"><img border=\"0\" src=\"./themes/new/images/xml.svg\" title=\"XML\"></a>
|
||||
<!-- <a href=\"index.php?module=rechnung&action=edit&id=%value%\" title=\"Bearbeiten\"><img border=\"0\" src=\"./themes/new/images/edit.svg\"></a>
|
||||
<a onclick=\"if(!confirm('Wirklich stornieren?')) return false; else window.location.href='index.php?module=rechnung&action=delete&id=%value%';\" title=\"Stornieren\">
|
||||
<img src=\"./themes/new/images/delete.svg\" border=\"0\"></a>
|
||||
@ -1245,6 +1248,79 @@ class Rechnung extends GenRechnung
|
||||
$this->RechnungList();
|
||||
}
|
||||
|
||||
// Print PHP array for SmartyXML
|
||||
function RechnungJSON() {
|
||||
$this->RechnungSmarty(true);
|
||||
}
|
||||
|
||||
function RechnungSmarty($json = false) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$result = Array();
|
||||
|
||||
$result['rechnungssteller']['name'] = $this->app->erp->Firmendaten('name');
|
||||
$result['rechnungssteller']['strasse'] = $this->app->erp->Firmendaten('strasse');
|
||||
$result['rechnungssteller']['ort'] = $this->app->erp->Firmendaten('ort');
|
||||
$result['rechnungssteller']['plz'] = $this->app->erp->Firmendaten('plz');
|
||||
$result['rechnungssteller']['land'] = $this->app->erp->Firmendaten('land');
|
||||
$result['rechnungssteller']['steuernummer'] = $this->app->erp->Firmendaten('steuernummer');
|
||||
|
||||
$rechnung = $this->app->DB->SelectRow("
|
||||
SELECT * FROM rechnung WHERE id = $id LIMIT 1
|
||||
");
|
||||
$result['kopf'] = $rechnung;
|
||||
$result['kopf']['internet_bestellnummer'] = $this->app->DB->Select("SELECT a.internet FROM rechnung r LEFT JOIN auftrag a ON a.id=r.auftragid WHERE r.id='$id' AND r.id > 0 LIMIT 1");
|
||||
|
||||
$adresse = $this->app->DB->SelectArr("
|
||||
SELECT * FROM adresse WHERE id = (SELECT adresse FROM rechnung WHERE id = $id LIMIT 1)
|
||||
");
|
||||
$result['adresse'] = $adresse[0];
|
||||
|
||||
$positionen = $this->app->DB->SelectArr("
|
||||
SELECT * FROM rechnung_position WHERE rechnung = $id ORDER BY sort ASC
|
||||
");
|
||||
$steuern = Array();
|
||||
foreach ($positionen as $key => $position) {
|
||||
$this->app->erp->GetSteuerPosition('rechnung', $position['id'], $steuersatz, $steuertext, $erloes);
|
||||
$positionen[$key]['steuersatz'] = $steuersatz;
|
||||
$positionen[$key]['steuertext'] = $steuertext;
|
||||
$positionen[$key]['erloese'] = $erloes;
|
||||
|
||||
$steuern[$steuersatz]['umsatz_netto'] += $position['umsatz_netto_gesamt'];
|
||||
$steuern[$steuersatz]['umsatz_brutto'] += $position['umsatz_brutto_gesamt'];
|
||||
$steuern[$steuersatz]['prozent'] = $steuersatz;
|
||||
}
|
||||
|
||||
$result['positionen'] = $positionen;
|
||||
$result['steuern'] = $steuern;
|
||||
|
||||
$filename = str_replace('-','',$result['kopf']['datum']).'_RE'.$result['kopf']['belegnr'];
|
||||
|
||||
if ($json) {
|
||||
header('Content-type:text/plain');
|
||||
header('Content-Disposition: attachment;filename='.$filename.'.json');
|
||||
echo(json_encode($result,JSON_PRETTY_PRINT));
|
||||
} else {
|
||||
|
||||
$template = $this->app->DB->Select("SELECT template from smarty_templates WHERE id = '".$adresse[0]['rechnung_smarty_template']."' LIMIT 1");
|
||||
|
||||
if(empty($template)) {
|
||||
header('Content-type:text/plain');
|
||||
header('Content-Disposition: attachment;filename='.$filename.'.xml');
|
||||
echo('Kein Smarty Template in der Adresse hinterlegt.');
|
||||
} else {
|
||||
$smarty = new Smarty;
|
||||
$directory = $this->app->erp->GetTMP().'/smarty/templates';
|
||||
$smarty->setCompileDir($directory);
|
||||
$smarty->assign('rechnung', $result);
|
||||
$html = $smarty->fetch('string:'.$template);
|
||||
header('Content-type:application/xml');
|
||||
header('Content-Disposition: attachment;filename='.$filename.'.xml');
|
||||
echo($html);
|
||||
}
|
||||
}
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
|
||||
function RechnungSuche()
|
||||
{
|
||||
$this->app->Tpl->Set('UEBERSCHRIFT','Rechnungen');
|
||||
|
218
www/pages/smarty_templates.php
Normal file
218
www/pages/smarty_templates.php
Normal file
@ -0,0 +1,218 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 OpenXE project
|
||||
*/
|
||||
|
||||
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||
|
||||
class Smarty_templates {
|
||||
|
||||
function __construct($app, $intern = false) {
|
||||
$this->app = $app;
|
||||
if ($intern)
|
||||
return;
|
||||
|
||||
$this->app->ActionHandlerInit($this);
|
||||
$this->app->ActionHandler("list", "smarty_templates_list");
|
||||
$this->app->ActionHandler("create", "smarty_templates_edit"); // This automatically adds a "New" button
|
||||
$this->app->ActionHandler("edit", "smarty_templates_edit");
|
||||
$this->app->ActionHandler("delete", "smarty_templates_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 "smarty_templates_list":
|
||||
$allowed['smarty_templates_list'] = array('list');
|
||||
$heading = array('','','Name', 'Menü');
|
||||
$width = array('1%','1%','80%','1%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array('s.id','s.id','s.name'); // use 'null' for non-searchable columns
|
||||
$searchsql = array('s.name', 's.template');
|
||||
|
||||
$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=\"',s.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=smarty_templates&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=smarty_templates&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 s.id, $dropnbox, s.name, s.id FROM smarty_templates s";
|
||||
|
||||
$where = "1";
|
||||
$count = "SELECT count(DISTINCT id) FROM smarty_templates 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 smarty_templates_list() {
|
||||
$this->app->erp->MenuEintrag("index.php?module=smarty_templates&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=smarty_templates&action=create", "Neu anlegen");
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=einstellungen&action=list", "Zurück zur Übersicht");
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'smarty_templates_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "smarty_templates_list.tpl");
|
||||
}
|
||||
|
||||
public function smarty_templates_delete() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
$this->app->DB->Delete("DELETE FROM `smarty_templates` WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gelöscht');
|
||||
$this->smarty_templates_list();
|
||||
}
|
||||
|
||||
/*
|
||||
* Edit smarty_templates item
|
||||
* If id is empty, create a new one
|
||||
*/
|
||||
|
||||
function smarty_templates_edit() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
/* // Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('smarty_templates',$id))
|
||||
{
|
||||
return;
|
||||
} */
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=smarty_templates&action=edit&id=$id", "Details");
|
||||
$this->app->erp->MenuEintrag("index.php?module=smarty_templates&action=list", "Zurück zur Ü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['template'] = html_entity_decode($input['template']);
|
||||
|
||||
// $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 smarty_templates (".$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=smarty_templates&action=list&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich ü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=\"',s.id,'\" />') AS `auswahl`";
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS s.id, $dropnbox, s.name, s.template, s.id FROM smarty_templates s"." WHERE id=$id");
|
||||
|
||||
$result[0]['template'] = htmlentities($result[0]['template']);
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
if (!empty($result)) {
|
||||
$smarty_templates_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,$smarty_templates_from_db['projekt'],false));
|
||||
$this->app->Tpl->Set('PRIO', $smarty_templates_from_db['prio']==1?"checked":"");
|
||||
|
||||
*/
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "smarty_templates_edit.tpl");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all paramters from html form and save into $input
|
||||
*/
|
||||
public function GetInput(): array {
|
||||
$input = array();
|
||||
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
|
||||
|
||||
$input['name'] = $this->app->Secure->GetPOST('name');
|
||||
$input['template'] = $this->app->Secure->GetPOST('template');
|
||||
|
||||
|
||||
return $input;
|
||||
}
|
||||
}
|
BIN
www/themes/new/images/einstellungen/Icons_dunkel_26.gif
Normal file
BIN
www/themes/new/images/einstellungen/Icons_dunkel_26.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
1
www/themes/new/images/xml.svg
Normal file
1
www/themes/new/images/xml.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg version="1.2" width="5.56mm" height="5.56mm" viewBox="0 0 556 556" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"><defs class="ClipPathGroup"><clipPath id="a" clipPathUnits="userSpaceOnUse"><path d="M0 0h556v556H0z"/></clipPath></defs><g class="SlideGroup"><g class="Slide" clip-path="url(#a)"><g class="Page"><g class="com.sun.star.drawing.PolyPolygonShape"><path class="BoundingBox" fill="none" d="M57 57h443v443H57z"/><path fill="#929292" d="M246 299h22l-32-69 29-62h-21l-22 46-21-46h-22l31 62-34 69h22l24-52 24 52Zm112 0h18V168h-27l-18 77-4 21-4-18-1-7-17-73h-28v131h18V191l7 35 18 73h14l17-73 8-35-1 23v85Zm33 0h73v-21h-52V168h-21v131Zm63-241h5l4 1 4 1 4 1 4 2 4 2 3 3 3 3 3 3 3 3 2 4 2 4 1 4 1 4 1 4v274l-1 4-1 4-1 4-2 4-2 4-3 3-3 3-3 3-3 3-4 2-4 2-4 1-4 1-4 1H185l-4-1-4-1-4-1-4-2-4-2-3-3-3-3-3-3-3-3-2-4-2-4-1-4-1-4-1-4V97l1-4 1-4 1-4 2-4 2-4 3-3 3-3 3-3 3-3 4-2 4-2 4-1 4-1 4-1h269ZM71 147l11-1h2l2 1h2l2 1 2 2 2 1 1 1 2 2 1 1 1 2 1 2 1 2v2l1 2v272l1 2 1 2v2l2 1 1 2 1 2 2 1 2 1 1 2h2l2 1 2 1h272l2 1h2l2 1 2 1 2 1 1 1 2 2 1 1 1 2 2 2 1 2v2l1 2v9l-1 2v2l-1 2-2 1-1 2-1 2-2 1-1 1-2 1-2 1-2 1-2 1H97l-4-1-4-1-4-1-4-2-4-2-3-3-3-3-3-3-3-3-2-4-2-4-1-4-1-4-1-4V163l1-2 1-2 1-2 1-2 1-1 1-2 2-1 2-1 1-2 2-1Z"/></g></g></g></g></svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -279,6 +279,9 @@ class WidgetGenadresse
|
||||
$field->AddOption('{|nur Rechnung erstellen|}','rechnung');
|
||||
$this->form->NewField($field);
|
||||
|
||||
$field = new HTMLInput("rechnung_smarty_template","text","","","","","","","","","","0","","");
|
||||
$this->form->NewField($field);
|
||||
|
||||
$field = new HTMLInput("kommissionskonsignationslager","text","","","","","","","","","","0","","");
|
||||
$this->form->NewField($field);
|
||||
|
||||
|
@ -478,6 +478,10 @@ function abweichend(cmd) {
|
||||
<tr>
|
||||
<td>{|Belege im Auto-Versand erstellen|}:</td>
|
||||
<td>[ART][MSGART]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{|Smarty Template für XML-Rechnung|}:</td>
|
||||
<td>[RECHNUNG_SMARTY_TEMPLATE][MSGRECHNUNG_SMARTY_TEMPLATE]</td>
|
||||
</tr> [VORKOMMISSIONIERLAGER]
|
||||
<tr>
|
||||
<td>{|Kommissions-/Konsignationslager|}:</td>
|
||||
|
@ -35,7 +35,9 @@ class WidgetAdresse extends WidgetGenAdresse
|
||||
$this->form->ReplaceFunction("kreditlimiteinmalig",$this,"ReplaceBetrag");
|
||||
|
||||
$this->app->YUI->AutoComplete("sachkonto","sachkonto",1);
|
||||
$this->form->ReplaceFunction("sachkonto",$this,"ReplaceKontorahmen");
|
||||
$this->form->ReplaceFunction("sachkonto",$this,"ReplaceKontorahmen");
|
||||
|
||||
$this->form->ReplaceFunction("rechnung_smarty_template",$this,"ReplaceSmartyTemplate");
|
||||
|
||||
$this->form->ReplaceFunction("lat",$this,"ReplaceBetrag");
|
||||
$this->form->ReplaceFunction("lng",$this,"ReplaceBetrag");
|
||||
@ -48,6 +50,8 @@ class WidgetAdresse extends WidgetGenAdresse
|
||||
|
||||
$this->app->YUI->AutoComplete("lieferbedingung","lieferbedingungen");
|
||||
|
||||
$this->app->YUI->AutoComplete("rechnung_smarty_template","smarty_template",1);
|
||||
|
||||
$this->app->YUI->AutoComplete("kassiererprojekt","projektname",1);
|
||||
$this->form->ReplaceFunction("kassiererprojekt",$this,"ReplaceProjekt");
|
||||
|
||||
@ -485,6 +489,11 @@ class WidgetAdresse extends WidgetGenAdresse
|
||||
{
|
||||
return $this->app->erp->ReplaceKontorahmen($db,$value,$fromform);
|
||||
}
|
||||
|
||||
function ReplaceSmartyTemplate($db,$value,$fromform)
|
||||
{
|
||||
return $this->app->erp->ReplaceSmartyTemplate($db,$value,$fromform);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|bool $db
|
||||
|
Loading…
x
Reference in New Issue
Block a user