Auftrag deckungsbeitrag implemented

This commit is contained in:
OpenXE 2023-11-11 22:57:32 +01:00
parent 2ae5e9f44a
commit 7cfb87c2c5
6 changed files with 402 additions and 348 deletions

View File

@ -2578,11 +2578,19 @@ class YUI {
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung)) if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung))
) $erweiterte_ansicht) ) $erweiterte_ansicht)
as Artikel, 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,
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, "; CONCAT(ROUND(deckungsbeitrag*100),'%') AS DB,
";
}
$sql .= "b.id as id $sql .= "b.id as id
FROM $table b FROM $table b
@ -14718,7 +14726,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift" || $module == "proformarechnung") { if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift" || $module == "proformarechnung") {
if ($schreibschutz != 1) { 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"> $addrow[] = '<input type="submit" value="einf&uuml;gen" name="ajaxbuchen">
<script type="text/javascript"> <script type="text/javascript">
document.onkeydown = function(evt) { document.onkeydown = function(evt) {
@ -14881,9 +14889,11 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
} }
$table->headings[6] = 'Preis'; $table->headings[6] = 'Preis';
$mengencol = 5; $mengencol = 5;
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[7] = 'W&auml;hrung'; if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") {
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[8] = 'Rabatt'; $table->headings[7] = 'W&auml;hrung';
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $rabattcol = 8; $table->headings[8] = 'Rabatt';
$rabattcol = 8;
}
} }
$__arr = array($summencol, $mengencol, $rabattcol, $ecol, $dcol,$zwischensumme); $__arr = array($summencol, $mengencol, $rabattcol, $ecol, $dcol,$zwischensumme);
$this->app->erp->RunHook('yui_sortlistadd_draw', 2,$table,$__arr); $this->app->erp->RunHook('yui_sortlistadd_draw', 2,$table,$__arr);

View File

@ -1990,8 +1990,30 @@ class Auftrag extends GenAuftrag
$gebuchtezeit = str_replace(".", ",", round($gebuchtezeit,2)); $gebuchtezeit = str_replace(".", ",", round($gebuchtezeit,2));
} }
$summebrutto = $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$id' LIMIT 1"); $summebrutto = $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$id' LIMIT 1");
$this->app->Tpl->Set('DECKUNGSBEITRAG',0);
$this->app->Tpl->Set('DBPROZENT',0); $sql = "
SELECT
umsatz_netto_gesamt,
artikel,
menge
FROM
`auftrag_position`
WHERE
`auftrag` = ".$id."
";
$positionen = $this->app->DB->SelectArr($sql);
$umsatz_gesamt = 0;
$db_gesamt = 0;
foreach ($positionen as $position) {
$ek = $this->app->erp->GetEinkaufspreis($position['artikel'],$position['menge']);
$db = $position['umsatz_netto_gesamt']-($ek*$position['menge']);
$db_gesamt += $db;
$umsatz_gesamt = $position['umsatz_netto_gesamt'];
}
$this->app->Tpl->Set('DECKUNGSBEITRAG',$db_gesamt);
$this->app->Tpl->Set('DBPROZENT',$umsatz_gesamt==0?"-":(round($db_gesamt/$umsatz_gesamt*100)."%"));
$this->app->Tpl->Set('GEBUCHTEZEIT',0); $this->app->Tpl->Set('GEBUCHTEZEIT',0);
if($auftragArr[0]['ust_befreit']==0){ if($auftragArr[0]['ust_befreit']==0){
@ -4947,6 +4969,9 @@ class Auftrag extends GenAuftrag
$this->app->erp->LieferadresseButton($adresse); $this->app->erp->LieferadresseButton($adresse);
$this->app->erp->AnsprechpartnerAlsLieferadresseButton($adresse); $this->app->erp->AnsprechpartnerAlsLieferadresseButton($adresse);
$this->app->erp->AdresseAlsLieferadresseButton($adresse); $this->app->erp->AdresseAlsLieferadresseButton($adresse);
$this->app->erp->BerechneDeckungsbeitrag($id,'auftrag');
} }
if($nummer!='') { if($nummer!='') {

View File

@ -118,12 +118,13 @@
</div> </div>
<div style="background-color:white"> <div style="background-color:white">
<h2 class="greyh2">{|Deckungsbeitrag|}</h2> <h2 class="greyh2">{|Deckungsbeitrag|}</h2>
<div style="padding:10px"> <table width="100%">
<tbody><tr><td>Deckungsbeitrag (netto) in EUR</td><td>DB (netto) in %</td></tr>
<div class="info">{|Dieses Modul ist erst ab Version Professional verfügbar|}</div> <tr>
<td class="greybox" width="50%">[DECKUNGSBEITRAG]</td>
<td class="greybox" width="50%">[DBPROZENT]</td>
</div> </tr>
</tbody></table>
</div> </div>
[INTERNEBEMERKUNGEDIT] [INTERNEBEMERKUNGEDIT]

View File

@ -1,308 +1,312 @@
<?php <?php
/* /*
**** 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 * 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. * 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 * 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. * to obtain the text of the corresponding license version.
* *
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE **** **** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/ */
?> ?>
<?php <?php
class WidgetGenauftrag_position class WidgetGenauftrag_position
{ {
private $app; //application object private $app; //application object
public $form; //store form object public $form; //store form object
protected $parsetarget; //target for content protected $parsetarget; //target for content
public function __construct($app,$parsetarget) public function __construct($app,$parsetarget)
{ {
$this->app = $app; $this->app = $app;
$this->parsetarget = $parsetarget; $this->parsetarget = $parsetarget;
$this->Form(); $this->Form();
} }
public function auftrag_positionDelete() public function auftrag_positionDelete()
{ {
$this->form->Execute("auftrag_position","delete"); $this->form->Execute("auftrag_position","delete");
$this->auftrag_positionList(); $this->auftrag_positionList();
} }
function Edit() function Edit()
{ {
$this->form->Edit(); $this->form->Edit();
} }
function Copy() function Copy()
{ {
$this->form->Copy(); $this->form->Copy();
} }
public function Create() public function Create()
{ {
$this->form->Create(); $this->form->Create();
} }
public function Search() public function Search()
{ {
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE"); $this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
} }
public function Summary() public function Summary()
{ {
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle"); $this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
} }
function Form() function Form()
{ {
$this->form = $this->app->FormHandler->CreateNew("auftrag_position"); $this->form = $this->app->FormHandler->CreateNew("auftrag_position");
$this->form->UseTable("auftrag_position"); $this->form->UseTable("auftrag_position");
$this->form->UseTemplate("auftrag_position.tpl",$this->parsetarget); $this->form->UseTemplate("auftrag_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","",""); $field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","",""); $field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG"); $this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0"); $field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","0","",""); $field = new HTMLInput("menge","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE"); $this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","",""); $field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLTextarea("formelmenge",2,48,"","","","","0"); $field = new HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0"); $field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0"); $field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0"); $field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","",""); $field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0"); $field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('Standard',''); $field->AddOption('Standard','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt'); $field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit'); $field->AddOption('Befreit','befreit');
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0"); $field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","",""); $field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0"); $field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","",""); $field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","",""); $field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","",""); $field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","",""); $field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","",""); $field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","",""); $field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0"); $field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","0","",""); $field = new HTMLInput("rabatt","text","","15","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","",""); $field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","",""); $field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","",""); $field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0"); $field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","",""); $field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","",""); $field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","",""); $field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","",""); $field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","",""); $field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","",""); $field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","",""); $field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","",""); $this->form->NewField($field);
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","",""); $this->form->NewField($field);
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0"); $this->form->NewField($field);
$this->form->NewField($field);
if ($this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0"); $field = new HTMLInput("einkaufspreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field); $this->form->NewField($field);
}
}
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
} $this->form->NewField($field);
?> }
}
?>

View File

@ -222,34 +222,47 @@ $( document ).ready(function() {
</table> </table>
</td> </td>
<td width="30%" [STYLERECHTS]> <td width="30%" [STYLERECHTS]>
<table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table> <table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table>
<div id="positionaccordion"> <div id="positionaccordion"> [ANZEIGEEINKAUFLAGER]
[ANZEIGEEINKAUFLAGER] <h3>{|Steuer|}</h3>
<div class="table-responsive">
<h3>{|Steuer|}</h3> <table>
<div class="table-responsive"> <tbody> [VORSTEUER]
<table> <tr>
<tbody> <td>{|Kostenstelle|}:</td>
[VORSTEUER] <td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
<tr><td>{|Kostenstelle|}:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td></tr> </tr>
<tr><td>{|Erl&ouml;se|}:</td><td>[ERLOESE][MSGERLOESE]</td></tr> <tr>
<tr><td>{|festschreiben|}:</td><td>[ERLOESEFESTSCHREIBEN][MSGERLOESEFESTSCHREIBEN]</td></tr> <td>{|Erl&ouml;se|}:</td>
[NACHSTEUER] <td>[ERLOESE][MSGERLOESE]</td>
</tbody> </tr>
</table> <tr>
<td>{|festschreiben|}:</td>
<td>[ERLOESEFESTSCHREIBEN][MSGERLOESEFESTSCHREIBEN]</td>
</tr> [NACHSTEUER] </tbody>
</table>
</div>
<h3>{|Einkaufspreis f&uuml;r Deckungsbeitrag|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr>
<td>[EINKAUFSPREIS][MSGEINKAUFSPREIS]</td>
</tr>
</tbody>
</table>
</div>
<h3>{|Bemerkung|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr>
<td> [BEMERKUNG][MSGBEMERKUNG] </td>
</tr>
</tbody>
</table>
</div>
</div> </div>
<h3>{|Bemerkung|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr><td>
[BEMERKUNG][MSGBEMERKUNG]
</td></tr>
</tbody>
</table>
</div>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -43,6 +43,7 @@ class WidgetAuftrag_position extends WidgetGenAuftrag_position
$this->app->YUI->DatePicker("lieferdatum"); $this->app->YUI->DatePicker("lieferdatum");
$this->form->ReplaceFunction("lieferdatum",$this,"ReplaceDatum"); $this->form->ReplaceFunction("lieferdatum",$this,"ReplaceDatum");
$this->form->ReplaceFunction("preis",$this,"ReplaceMengeBetrag"); $this->form->ReplaceFunction("preis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("einkaufspreis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("steuersatz",$this,"ReplaceSteuersatz"); $this->form->ReplaceFunction("steuersatz",$this,"ReplaceSteuersatz");
$this->form->ReplaceFunction("menge",$this,"ReplaceMenge"); $this->form->ReplaceFunction("menge",$this,"ReplaceMenge");
$this->form->ReplaceFunction("grundrabatt",$this,"ReplaceDecimal"); $this->form->ReplaceFunction("grundrabatt",$this,"ReplaceDecimal");