angebot deckungsbeitrag

This commit is contained in:
OpenXE 2024-01-24 18:27:34 +01:00
parent f84e7af78a
commit 63b85f213a
6 changed files with 439 additions and 365 deletions

View File

@ -2839,6 +2839,14 @@ class YUI {
,b.waehrung, b.rabatt as rabatt,";
if ($this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$sql .= $this->FormatPreis('einkaufspreis')." as einkaufspreis,
CONCAT(".$this->app->erp->FormatPreis("ROUND(deckungsbeitrag*100,2)",2).",'%') AS DB,
";
}
}else{
$sql = "SELECT $sortcol, CONCAT($hersteller_ansicht if(b.beschreibung!='',
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnung,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnung,' *')),

View File

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

View File

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

View File

@ -1,320 +1,325 @@
<?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 WidgetGenangebot_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 angebot_positionDelete()
{
$this->form->Execute("angebot_position","delete");
$this->angebot_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("angebot_position");
$this->form->UseTable("angebot_position");
$this->form->UseTemplate("angebot_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","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 HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("optional","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("textalternativpreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("berechnen_aus_teile","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("explodiert_parent","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("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","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("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>
<?php
class WidgetGenangebot_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 angebot_positionDelete()
{
$this->form->Execute("angebot_position","delete");
$this->angebot_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("angebot_position");
$this->form->UseTable("angebot_position");
$this->form->UseTemplate("angebot_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","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 HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("optional","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("textalternativpreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("berechnen_aus_teile","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("explodiert_parent","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("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","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("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
if ($this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$field = new HTMLInput("einkaufspreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
}
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>

View File

@ -215,36 +215,48 @@ $('#anderersteuersatz').click(function() { if (!$(this).is(':checked')) {
</tbody>
</table>
</td>
<td width="30%">
<table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table>
<div id="positionaccordion">
[ANZEIGEEINKAUFLAGER]
<h3>{|Steuer|}</h3>
<div class="table-responsive">
<table>
<tbody>
[VORSTEUER]
<tr><td>{|Kostenstelle|}:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td></tr>
<tr><td>{|Erl&ouml;se|}:</td><td>[ERLOESE][MSGERLOESE]</td></tr>
<tr><td>{|festschreiben|}:</td><td>[ERLOESEFESTSCHREIBEN][MSGERLOESEFESTSCHREIBEN]</td></tr>
[NACHSTEUER]
</tbody>
</table>
<td width="30%" [STYLERECHTS]>
<table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table>
<div id="positionaccordion"> [ANZEIGEEINKAUFLAGER]
<h3>{|Steuer|}</h3>
<div class="table-responsive">
<table>
<tbody> [VORSTEUER]
<tr>
<td>{|Kostenstelle|}:</td>
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
</tr>
<tr>
<td>{|Erl&ouml;se|}:</td>
<td>[ERLOESE][MSGERLOESE]</td>
</tr>
<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>
<h3>{|Bemerkung|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr><td>
[BEMERKUNG][MSGBEMERKUNG]
</td></tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</tbody>

View File

@ -35,6 +35,7 @@ class WidgetAngebot_position extends WidgetGenAngebot_position
$this->app->YUI->AutoComplete("kostenstelle","kostenstelle",1);
$this->app->YUI->AutoComplete("explodiert_parent","angebot_position",0,"&angebotposition=".$id."&angebot=".$this->app->DB->Select("SELECT angebot FROM angebot_position WHERE id = '$id' LIMIT 1"));
$this->form->ReplaceFunction("preis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("einkaufspreis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("steuersatz",$this,"ReplaceSteuersatz");
$this->form->ReplaceFunction("menge",$this,"ReplaceMenge");
$this->form->ReplaceFunction("grundrabatt",$this,"ReplaceDecimal");