Merge branch 'verbindlichkeit'

This commit is contained in:
OpenXE
2023-12-27 18:19:20 +01:00
15 changed files with 2196 additions and 1016 deletions
@@ -1,129 +1,129 @@
<?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 WidgetGenverbindlichkeit_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function verbindlichkeit_positionDelete()
{
$this->form->Execute("verbindlichkeit_position","delete");
$this->verbindlichkeit_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("verbindlichkeit_position");
$this->form->UseTable("verbindlichkeit_position");
$this->form->UseTemplate("verbindlichkeit_position.tpl",$this->parsetarget);
$field = new HTMLInput("artikel","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("artikel","notempty","Pflichtfeld!","MSGARTIKEL");
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("beschreibung",5,30,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","8","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('Standard','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("projekt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
}
}
?>
<?php
class WidgetGenverbindlichkeit_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function verbindlichkeit_positionDelete()
{
$this->form->Execute("verbindlichkeit_position","delete");
$this->verbindlichkeit_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("verbindlichkeit_position");
$this->form->UseTable("verbindlichkeit_position");
$this->form->UseTemplate("verbindlichkeit_position.tpl",$this->parsetarget);
$field = new HTMLInput("artikel","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("artikel","notempty","Pflichtfeld!","MSGARTIKEL");
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("beschreibung",5,30,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","8","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('Standard','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("projekt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("sachkonto","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
}
}
?>
@@ -25,31 +25,41 @@ $('#anderersteuersatz').click(function() { if (!$(this).is(':checked')) {
});
</script>
<form action="" method="post" name="eprooform">
[FORMHANDLEREVENT]
<table border="0" style="padding-right:10px;" class="mkTableFormular">
<tbody>
<tr><td nowrap>{|Artikel-Nr|}:</td><td>[ARTIKEL][MSGARTIKEL]</td></tr>
<tr><td nowrap>{|Beschreibung|}:</td><td>[BEZEICHNUNG][MSGBEZEICHNUNG]</td></tr>
<tr><td nowrap>{|Artikel-Nr|}:</td><td>[NUMMER][MSGNUMMER]</td></tr>
<tr><td>{|Beschreibung|}:</td><td>[BESCHREIBUNG][MSGBESCHREIBUNG]</td></tr>
<tr><td>{|Menge|}:</td><td>[MENGE][MSGMENGE]</td></tr>
<tr><td>{|Preis|}:</td><td>[PREIS][MSGPREIS]</td></tr>
<tr><td>{|W&auml;hrung|}:</td><td>[WAEHRUNG][MSGWAEHRUNG]&nbsp;[WAEHRUNGSBUTTON]</td></tr>
<tr><td>{|Steuersatz|}:</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]&nbsp;
[ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ]&nbsp;individuellen Steuersatz verwenden
</td></tr>
<tr style="display:none" class="steuersatz"><td>{|Individueller Steuersatz|}:</td><td>[STEUERSATZ][MSGSTEUERSATZ]&nbsp;in Prozent</td></tr>
<tr><td>{|Rechtlicher Steuerhinweis|}:</td><td>
[STEUERTEXT][MSGSTEUERTEXT]
</td></tr>
<tr><td>{|Einheit|}:</td><td>[EINHEIT][MSGEINHEIT]</td></tr>
<tr><td>{|VPE|}:</td><td>[VPE][MSGVPE]</td></tr>
<tr><td>{|Projekt|}:</td><td>[PROJEKT][MSGPROJEKT]</td></tr>
<tr><td>{|Kostenstelle|}:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td></tr>
<tr><td>{|Lieferdatum|}:</td><td>[LIEFERDATUM][MSGLIEFERDATUM]</td></tr>
<tr><td></td><td><input type="submit" value="Speichern" ></td></tr>
</tbody></table>
[FORMHANDLEREVENT]
<table border="0" style="padding-right:10px;" class="mkTableFormular">
<tbody>
<tr valign="top">
<td width="550">
<table border="0" style="padding-right:10px;" class="mkTableFormular">
<tr><td nowrap>{|Artikel-Nr|}:</td><td>[ARTIKEL][MSGARTIKEL]</td></tr>
<tr><td nowrap>{|Beschreibung|}:</td><td>[BEZEICHNUNG][MSGBEZEICHNUNG]</td></tr>
<tr><td nowrap>{|Artikel-Nr|}:</td><td>[NUMMER][MSGNUMMER]</td></tr>
<tr><td>{|Beschreibung|}:</td><td>[BESCHREIBUNG][MSGBESCHREIBUNG]</td></tr>
<tr><td>{|Menge|}:</td><td>[MENGE][MSGMENGE]</td></tr>
<tr><td>{|Preis|}:</td><td>[PREIS][MSGPREIS][WAEHRUNG]</td></tr>
<!-- <tr><td>{|W&auml;hrung|}:</td><td>[WAEHRUNG][MSGWAEHRUNG]&nbsp;[WAEHRUNGSBUTTON]</td></tr>-->
<tr><td>{|Steuersatz|}:</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]&nbsp;
[ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ]&nbsp;individuellen Steuersatz verwenden
</td></tr>
<tr style="display:none" class="steuersatz"><td>{|Individueller Steuersatz|}:</td><td>[STEUERSATZ][MSGSTEUERSATZ]&nbsp;in Prozent</td></tr>
<tr><td>{|Rechtlicher Steuerhinweis|}:</td><td>
[STEUERTEXT][MSGSTEUERTEXT]
</td></tr>
<tr><td>{|Einheit|}:</td><td>[EINHEIT][MSGEINHEIT]</td></tr>
<tr><td>{|VPE|}:</td><td>[VPE][MSGVPE]</td></tr>
<tr><td>{|Lieferdatum|}:</td><td>[LIEFERDATUM][MSGLIEFERDATUM]</td></tr>
</table>
</td>
<td width="30%" [STYLERECHTS]>
<table width="100%">
<tr><td></td><td align="right"><input type="submit" value="Speichern" ></td></tr>
<tr><td>{|Projekt|}:</td><td>[PROJEKT][MSGPROJEKT]</td></tr>
<tr><td>{|Kostenstelle|}:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td></tr>
<tr><td>{|Sachkonto|}:</td><td>[SACHKONTO][MSGSACHKONTO]</td></tr>
</table>
</td>
</tr>
</tbody>
</table>
</form>
[WAEHRUNGSTABELLE]
@@ -24,6 +24,7 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position
$this->app->YUI->AutoComplete("projekt","projektname",1);
$this->app->YUI->AutoComplete("kostenstelle","kostenstelle",1);
$this->app->YUI->AutoComplete("sachkonto","sachkonto_aufwendungen",1);
$this->app->YUI->AutoComplete("artikel","artikelnummer");
//$this->app->YUI->AutoComplete(AUTO,"artikel",array('nummer','name_de','warengruppe'),"nummer");
@@ -36,6 +37,7 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position
$this->form->ReplaceFunction("menge",$this,"ReplaceMenge");
//$this->form->ReplaceFunction("geliefert",$this,"ReplaceMenge");
$this->form->ReplaceFunction("projekt",$this,"ReplaceProjekt");
$this->form->ReplaceFunction("sachkonto",$this,"ReplaceSachkonto");
if($this->app->erp->Firmendaten("briefhtml")=="1")
{
@@ -79,6 +81,11 @@ class WidgetVerbindlichkeit_position extends WidgetGenVerbindlichkeit_position
return $this->app->erp->ReplaceProjekt($db,$value,$fromform);
}
function ReplaceSachkonto($db,$value,$fromform)
{
return $this->app->erp->ReplaceKontorahmen($db,$value,$fromform);
}
function ReplaceSteuersatz($db,$value,$fromform)
{
if($db)