mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Merge branch 'verbindlichkeit'
This commit is contained in:
commit
dc5de062b8
@ -1,361 +1,361 @@
|
||||
<?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
|
||||
|
||||
/// represent a HTML Form structure
|
||||
class HTMLForm
|
||||
{
|
||||
var $action;
|
||||
var $method;
|
||||
var $name;
|
||||
var $id;
|
||||
|
||||
var $FieldList;
|
||||
|
||||
function __construct($action="",$method="post",$name="",$id="")
|
||||
{
|
||||
$this->action=$action;
|
||||
$this->name=$name;
|
||||
$this->method=$method;
|
||||
$this->id=$id;
|
||||
}
|
||||
|
||||
function Set($value)
|
||||
{
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class HTMLTextarea
|
||||
{
|
||||
var $name;
|
||||
var $rows;
|
||||
var $value;
|
||||
var $cols;
|
||||
var $id="";
|
||||
var $readonly="";
|
||||
var $disabled="";
|
||||
var $class;
|
||||
|
||||
function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="")
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->rows = $rows;
|
||||
$this->cols = $cols;
|
||||
$this->class = $class;
|
||||
$this->value = $defvalue;
|
||||
$this->id = $id;
|
||||
|
||||
if($id=="")
|
||||
$this->id = $name;
|
||||
|
||||
$this->readonly = $readonly;
|
||||
$this->disabled = $disabled;
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
// TEMP ACHTUNG HIER IST MIST!!!
|
||||
$value = $this->value;
|
||||
/*
|
||||
if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('/<br\\s*?\/??>/i', "\n", $value);
|
||||
*/
|
||||
// $value = str_replace("\\r\\n","\n",$value);
|
||||
|
||||
$html = "<textarea rows=\"{$this->rows}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" cols=\"{$this->cols}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>$value</textarea>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den
|
||||
/// user in irgendeiner art und weise gesehen und manipuliert werden koennen
|
||||
|
||||
class BlindField
|
||||
{
|
||||
var $name;
|
||||
var $value;
|
||||
|
||||
function __construct($name,$value)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
}
|
||||
function Get(){}
|
||||
function GetClose(){}
|
||||
}
|
||||
|
||||
|
||||
class HTMLInput
|
||||
{
|
||||
var $name;
|
||||
var $type;
|
||||
var $value;
|
||||
var $dbvalue;
|
||||
var $checkvalue;
|
||||
var $onchange;
|
||||
var $onclick;
|
||||
var $defvalue;
|
||||
var $size;
|
||||
var $maxlength;
|
||||
var $tabindex;
|
||||
var $id="";
|
||||
var $readonly="";
|
||||
var $disabled="";
|
||||
var $placeholder="";
|
||||
var $class;
|
||||
var $checked;
|
||||
|
||||
function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="")
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->value = $value;
|
||||
$this->size = $size;
|
||||
$this->maxlength = $maxlength;
|
||||
$this->id = $id;
|
||||
$this->readonly = $readonly;
|
||||
$this->disabled = $disabled;
|
||||
$this->class=$class;
|
||||
$this->checked=$checked;
|
||||
$this->tabindex=$tabindex;
|
||||
$this->placeholder=$placeholder;
|
||||
$this->defvalue=$defvalue; // if value is empty use this
|
||||
$this->onclick=$onclick;
|
||||
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
if($this->id=="") $this->id = $this->name;
|
||||
|
||||
switch($this->type)
|
||||
{
|
||||
case "text":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"".preg_replace("/\"/",""",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "password":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "checkbox":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "radio":
|
||||
|
||||
if($this->value==$this->defvalue) $this->checked="checked";
|
||||
|
||||
$tmpname = str_replace('_'.$this->defvalue,'',$this->name);
|
||||
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "submit":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\"
|
||||
{$this->readonly} {$this->disabled}>";
|
||||
break;
|
||||
case "hidden":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>";
|
||||
break;
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class HTMLCheckbox extends HTMLInput
|
||||
{
|
||||
function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="")
|
||||
{
|
||||
|
||||
if($checkvalue!="")
|
||||
$this->checkvalue=$checkvalue;
|
||||
else
|
||||
$this->checkvalue=$value;
|
||||
|
||||
$this->name = $name;
|
||||
$this->type = "checkbox";
|
||||
$this->checkradiovalue = isset($okvalue)?$okvalue:null;
|
||||
$this->defvalue = $defvalue;
|
||||
$this->value = $value;
|
||||
$this->onclick= $onclick;
|
||||
$this->tabindex= $tabindex;
|
||||
$this->orgvalue = $value;
|
||||
}
|
||||
|
||||
|
||||
function Get()
|
||||
{
|
||||
if(($this->value=="" && $this->defvalue==$this->checkvalue)) {
|
||||
}
|
||||
if($this->checkvalue==$this->value) {
|
||||
$this->checked="checked";
|
||||
}
|
||||
if($this->value=="" && $this->defvalue!=$this->checkvalue)
|
||||
$this->checked="";
|
||||
|
||||
$this->value = $this->checkvalue;
|
||||
//$this->value=1;
|
||||
return parent::Get();
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class HTMLSelect
|
||||
{
|
||||
var $name;
|
||||
var $size;
|
||||
var $id;
|
||||
var $readonly;
|
||||
var $disabled;
|
||||
|
||||
var $options;
|
||||
var $onchange;
|
||||
var $selected;
|
||||
var $tabindex;
|
||||
|
||||
var $class;
|
||||
|
||||
function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="")
|
||||
{
|
||||
$this->name=$name;
|
||||
$this->size=$size;
|
||||
$this->id=$id;
|
||||
$this->readonly=$readonly;
|
||||
$this->disabled=$disabled;
|
||||
$this->tabindex=$tabindex;
|
||||
$this->class="";
|
||||
|
||||
if($id=="")
|
||||
$this->id = $name;
|
||||
}
|
||||
|
||||
function AddOption($option,$value)
|
||||
{
|
||||
$this->options[] = array($option,$value);
|
||||
}
|
||||
|
||||
function AddOptionsDimensionalArray($values)
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
{
|
||||
$this->options[] = array($value[wert],$value[schluessel]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function AddOptionsAsocSimpleArray($values)
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
$this->options[] = array($value,$key);
|
||||
}
|
||||
|
||||
function AddOptionsSimpleArray($values)
|
||||
{
|
||||
if(is_array($values))
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
{
|
||||
if(!is_numeric($key))
|
||||
$this->options[] = array($value,$key);
|
||||
else
|
||||
$this->options[] = array($value,$value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AddOptions($values)
|
||||
{
|
||||
$number=0;
|
||||
if(count($values)>0)
|
||||
{
|
||||
foreach($values as $key=>$row)
|
||||
foreach($row as $value)
|
||||
{
|
||||
if($number==0){
|
||||
$option=$value;
|
||||
$number=1;
|
||||
}
|
||||
else {
|
||||
$this->options[] = array($option,$value);
|
||||
$number=0;
|
||||
$option="";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
$html = "<select name=\"{$this->name}\" size=\"{$this->size}\" tabindex=\"{$this->tabindex}\"
|
||||
id=\"{$this->id}\" class=\"{$this->class}\" onchange=\"{$this->onchange}\" [COMMONREADONLYSELECT]>";
|
||||
|
||||
if($this->options && count($this->options)>0)
|
||||
{
|
||||
foreach($this->options as $key=>$value)
|
||||
{
|
||||
if($this->value==$value[1])
|
||||
$html .="<option value=\"{$value[1]}\" selected>{$value[0]}</option>";
|
||||
else
|
||||
$html .="<option value=\"{$value[1]}\">{$value[0]}</option>";
|
||||
}
|
||||
|
||||
}
|
||||
$html .="</select>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/// represent a HTML Form structure
|
||||
class HTMLForm
|
||||
{
|
||||
var $action;
|
||||
var $method;
|
||||
var $name;
|
||||
var $id;
|
||||
|
||||
var $FieldList;
|
||||
|
||||
function __construct($action="",$method="post",$name="",$id="")
|
||||
{
|
||||
$this->action=$action;
|
||||
$this->name=$name;
|
||||
$this->method=$method;
|
||||
$this->id=$id;
|
||||
}
|
||||
|
||||
function Set($value)
|
||||
{
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class HTMLTextarea
|
||||
{
|
||||
var $name;
|
||||
var $rows;
|
||||
var $value;
|
||||
var $cols;
|
||||
var $id="";
|
||||
var $readonly="";
|
||||
var $disabled="";
|
||||
var $class;
|
||||
|
||||
function __construct($name,$rows,$cols,$defvalue="",$id="",$readonly="",$disabled="",$class="")
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->rows = $rows;
|
||||
$this->cols = $cols;
|
||||
$this->class = $class;
|
||||
$this->value = $defvalue;
|
||||
$this->id = $id;
|
||||
|
||||
if($id=="")
|
||||
$this->id = $name;
|
||||
|
||||
$this->readonly = $readonly;
|
||||
$this->disabled = $disabled;
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
// TEMP ACHTUNG HIER IST MIST!!!
|
||||
$value = $this->value;
|
||||
/*
|
||||
if(!defined('WFHTMLTextareabr') || !WFHTMLTextareabr)$value = preg_replace('/<br\\s*?\/??>/i', "\n", $value);
|
||||
*/
|
||||
// $value = str_replace("\\r\\n","\n",$value);
|
||||
|
||||
$html = "<textarea rows=\"{$this->rows}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" cols=\"{$this->cols}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>$value</textarea>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// fuer Datenfelder die mit in die Datenbank o.ae. kommen sollen, aber nicht durch den
|
||||
/// user in irgendeiner art und weise gesehen und manipuliert werden koennen
|
||||
|
||||
class BlindField
|
||||
{
|
||||
var $name;
|
||||
var $value;
|
||||
|
||||
function __construct($name,$value)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
}
|
||||
function Get(){}
|
||||
function GetClose(){}
|
||||
}
|
||||
|
||||
|
||||
class HTMLInput
|
||||
{
|
||||
var $name;
|
||||
var $type;
|
||||
var $value;
|
||||
var $dbvalue;
|
||||
var $checkvalue;
|
||||
var $onchange;
|
||||
var $onclick;
|
||||
var $defvalue;
|
||||
var $size;
|
||||
var $maxlength;
|
||||
var $tabindex;
|
||||
var $id="";
|
||||
var $readonly="";
|
||||
var $disabled="";
|
||||
var $placeholder="";
|
||||
var $class;
|
||||
var $checked;
|
||||
|
||||
function __construct($name,$type,$value,$size="",$maxlength="",$id="",$defvalue="",$checked="",$readonly="",$disabled="",$class="",$onclick="",$tabindex="",$placeholder="")
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->value = $value;
|
||||
$this->size = $size;
|
||||
$this->maxlength = $maxlength;
|
||||
$this->id = $id;
|
||||
$this->readonly = $readonly;
|
||||
$this->disabled = $disabled;
|
||||
$this->class=$class;
|
||||
$this->checked=$checked;
|
||||
$this->tabindex=$tabindex;
|
||||
$this->placeholder=$placeholder;
|
||||
$this->defvalue=$defvalue; // if value is empty use this
|
||||
$this->onclick=$onclick;
|
||||
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
if($this->id=="") $this->id = $this->name;
|
||||
|
||||
switch($this->type)
|
||||
{
|
||||
case "text":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"".preg_replace("/\"/",""",$this->value)."\" size=\"{$this->size}\" placeholder=\"{$this->placeholder}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "password":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "checkbox":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" {$this->checked} onchange=\"{$this->onchange}\" onclick=\"{$this->onclick}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "radio":
|
||||
|
||||
if($this->value==$this->defvalue) $this->checked="checked";
|
||||
|
||||
$tmpname = str_replace('_'.$this->defvalue,'',$this->name);
|
||||
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\" tabindex=\"{$this->tabindex}\"
|
||||
name=\"{$tmpname}\" value=\"{$this->defvalue}\" {$this->checked} onchange=\"{$this->onchange}\"
|
||||
{$this->readonly} {$this->disabled} [COMMONREADONLYINPUT]>";
|
||||
break;
|
||||
case "submit":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\"
|
||||
{$this->readonly} {$this->disabled}>";
|
||||
break;
|
||||
case "hidden":
|
||||
$html = "<input type=\"{$this->type}\" id=\"{$this->id}\" class=\"{$this->class}\"
|
||||
name=\"{$this->name}\" value=\"{$this->value}\" size=\"{$this->size}\"
|
||||
maxlength=\"{$this->maxlength}\" {$this->readonly} {$this->disabled}>";
|
||||
break;
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class HTMLCheckbox extends HTMLInput
|
||||
{
|
||||
function __construct($name,$value,$defvalue,$checkvalue="",$onclick="",$tabindex="")
|
||||
{
|
||||
|
||||
if($checkvalue!="")
|
||||
$this->checkvalue=$checkvalue;
|
||||
else
|
||||
$this->checkvalue=$value;
|
||||
|
||||
$this->name = $name;
|
||||
$this->type = "checkbox";
|
||||
$this->checkradiovalue = isset($okvalue)?$okvalue:null;
|
||||
$this->defvalue = $defvalue;
|
||||
$this->value = $value;
|
||||
$this->onclick= $onclick;
|
||||
$this->tabindex= $tabindex;
|
||||
$this->orgvalue = $value;
|
||||
}
|
||||
|
||||
|
||||
function Get()
|
||||
{
|
||||
if(($this->value=="" && $this->defvalue==$this->checkvalue)) {
|
||||
}
|
||||
if($this->checkvalue==$this->value) {
|
||||
$this->checked="checked";
|
||||
}
|
||||
if($this->value=="" && $this->defvalue!=$this->checkvalue)
|
||||
$this->checked="";
|
||||
|
||||
$this->value = $this->checkvalue;
|
||||
//$this->value=1;
|
||||
return parent::Get();
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class HTMLSelect
|
||||
{
|
||||
var $name;
|
||||
var $size;
|
||||
var $id;
|
||||
var $readonly;
|
||||
var $disabled;
|
||||
|
||||
var $options;
|
||||
var $onchange;
|
||||
var $selected;
|
||||
var $tabindex;
|
||||
|
||||
var $class;
|
||||
|
||||
function __construct($name,$size,$id="",$readonly=false,$disabled=false,$tabindex="")
|
||||
{
|
||||
$this->name=$name;
|
||||
$this->size=$size;
|
||||
$this->id=$id;
|
||||
$this->readonly=$readonly;
|
||||
$this->disabled=$disabled;
|
||||
$this->tabindex=$tabindex;
|
||||
$this->class="";
|
||||
|
||||
if($id=="")
|
||||
$this->id = $name;
|
||||
}
|
||||
|
||||
function AddOption($option,$value)
|
||||
{
|
||||
$this->options[] = array($option,$value);
|
||||
}
|
||||
|
||||
function AddOptionsDimensionalArray($values)
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
{
|
||||
$this->options[] = array($value[wert],$value[schluessel]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function AddOptionsAsocSimpleArray($values)
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
$this->options[] = array($value,$key);
|
||||
}
|
||||
|
||||
function AddOptionsSimpleArray($values)
|
||||
{
|
||||
if(is_array($values))
|
||||
{
|
||||
foreach($values as $key=>$value)
|
||||
{
|
||||
if(!is_numeric($key))
|
||||
$this->options[] = array($value,$key);
|
||||
else
|
||||
$this->options[] = array($value,$value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AddOptions($values)
|
||||
{
|
||||
$number=0;
|
||||
if(count($values)>0)
|
||||
{
|
||||
foreach($values as $key=>$row)
|
||||
foreach($row as $value)
|
||||
{
|
||||
if($number==0){
|
||||
$option=$value;
|
||||
$number=1;
|
||||
}
|
||||
else {
|
||||
$this->options[] = array($option,$value);
|
||||
$number=0;
|
||||
$option="";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Get()
|
||||
{
|
||||
$html = "<select name=\"{$this->name}\" size=\"{$this->size}\" tabindex=\"{$this->tabindex}\"
|
||||
id=\"{$this->id}\" class=\"{$this->class}\" onchange=\"{$this->onchange}\" [COMMONREADONLYSELECT]>";
|
||||
|
||||
if($this->options && count($this->options)>0)
|
||||
{
|
||||
foreach($this->options as $key=>$value)
|
||||
{
|
||||
if($this->value==$value[1])
|
||||
$html .="<option value=\"{$value[1]}\" selected>{$value[0]}</option>";
|
||||
else
|
||||
$html .="<option value=\"{$value[1]}\">{$value[0]}</option>";
|
||||
}
|
||||
|
||||
}
|
||||
$html .="</select>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
function GetClose()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2563,7 +2563,7 @@ class YUI {
|
||||
$anzeigebrutto = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sortcol = ' b.sort ';
|
||||
$schreibschutz = !empty($docArr)?$docArr['schreibschutz']:$this->app->DB->Select("SELECT schreibschutz FROM $module WHERE id='$id'");
|
||||
if(!$schreibschutz)$sortcol = " concat('<input type=\"checkbox\" name=\"belegsort[]\" value=\"',b.id,'\" />',b.sort) as sort ";
|
||||
@ -2853,7 +2853,64 @@ class YUI {
|
||||
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
||||
WHERE b.$module='$id'";
|
||||
|
||||
} else {
|
||||
}
|
||||
else if ($module == "verbindlichkeit") // OpenXE
|
||||
{
|
||||
$sql = "
|
||||
SELECT
|
||||
$sortcol,
|
||||
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, ' *')
|
||||
),
|
||||
IF(
|
||||
CHAR_LENGTH(b.bezeichnung) > " . $this->app->erp->MaxArtikelbezeichnung() . ",
|
||||
CONCAT(
|
||||
SUBSTR(
|
||||
b.bezeichnung,
|
||||
1,
|
||||
" . $this->app->erp->MaxArtikelbezeichnung() . "
|
||||
),
|
||||
'...'
|
||||
),
|
||||
b.bezeichnung
|
||||
)
|
||||
) AS Artikel,
|
||||
p.abkuerzung AS projekt,
|
||||
a.nummer,
|
||||
".$this->app->erp->FormatDate('lieferdatum')." AS lieferdatum,
|
||||
TRIM(b.menge) +0 AS menge,
|
||||
" . $this->FormatPreis($preiscell) . " AS preis,
|
||||
" . $this->FormatPreis($preiscell."*menge") . " AS Betrag,
|
||||
CONCAT(
|
||||
k.sachkonto,
|
||||
' - ',
|
||||
k.beschriftung
|
||||
) AS sachkonto,
|
||||
b.id AS id
|
||||
FROM
|
||||
$table b
|
||||
LEFT JOIN artikel a ON
|
||||
a.id = b.artikel
|
||||
LEFT JOIN projekt p ON
|
||||
b.projekt = p.id
|
||||
LEFT JOIN kontorahmen k ON
|
||||
k.id = b.sachkonto
|
||||
WHERE
|
||||
b.$module = '$id'
|
||||
";
|
||||
}
|
||||
else {
|
||||
$sql = null;
|
||||
$this->app->erp->RunHook('yui_position_sql', 3, $table, $id, $sql);
|
||||
if($sql === null){
|
||||
@ -3549,24 +3606,11 @@ class YUI {
|
||||
|
||||
$stop_betragbezahlt = "<img alt=\"Zahlung fehlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassestop.png\" style=\"margin-right:1px\" title=\"Zahlung fehlt\" border=\"0\">";
|
||||
$gostop_betragbezahlt = "<img alt=\"teilweise bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassegostop.png\" style=\"margin-right:1px\" title=\"teilweise bezahlt\" border=\"0\">";
|
||||
$go_betragbezahlt = "<img alt=\"nicht bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"komplett bezahlt\" border=\"0\">";
|
||||
$go_betragbezahlt = "<img alt=\"nicht bezahlt\" src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/vorkassego.png\" style=\"margin-right:1px\" title=\"bezahlt\" border=\"0\">";
|
||||
return "CONCAT('<table><tr><td nowrap>',
|
||||
if(v.freigabe,'$go_ware','$stop_ware'),
|
||||
if(v.rechnungsfreigabe,'$go_summe','$stop_summe'),
|
||||
IF( v.betragbezahlt = 0 OR (v.betrag > 0 AND v.betragbezahlt < 0),'$stop_betragbezahlt',
|
||||
IF(v.betrag > 0 AND (v.betragbezahlt + v.skonto_erhalten) >= v.betrag, '$go_betragbezahlt',
|
||||
IF(v.betrag - v.betragbezahlt <= v.betrag-((v.betrag/100.0)*v.skonto),
|
||||
'$gostop_betragbezahlt',
|
||||
'$go_betragbezahlt'
|
||||
)
|
||||
)
|
||||
),
|
||||
if((
|
||||
(SELECT COUNT(ka.id)
|
||||
FROM kontoauszuege_zahlungsausgang ka WHERE ka.parameter=v.id AND ka.objekt='verbindlichkeit') +
|
||||
(SELECT COUNT(ke.id) FROM kontoauszuege_zahlungseingang ke WHERE ke.parameter=v.id AND ke.objekt='verbindlichkeit')) > 0,
|
||||
'$go_zahlung','$stop_zahlung'
|
||||
),
|
||||
if(v.bezahlt,'$go_betragbezahlt','$stop_betragbezahlt'),
|
||||
'</td></tr></table>')";
|
||||
}
|
||||
|
||||
@ -14862,8 +14906,6 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
$table->headings[4] = 'Abr. bei Kd';
|
||||
$table->headings[5] = 'sonst. MwSt'; // kann man auch umbenennen in Keine
|
||||
|
||||
|
||||
|
||||
$table->headings[6] = 'MwSt';
|
||||
$table->headings[7] = 'Kommentar';
|
||||
$table->headings[8] = 'Bezahlt';
|
||||
|
@ -41,6 +41,10 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 0;
|
||||
$aligncenter = array();
|
||||
$alignright = array();
|
||||
$numbercols = array();
|
||||
$sumcol = array();
|
||||
|
||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||
|
||||
@ -159,11 +163,17 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
|
||||
// Load values again from database
|
||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
||||
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
if (!empty($result)) {
|
||||
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add displayed items later
|
||||
@ -177,7 +187,6 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||
|
||||
*/
|
||||
|
||||
// $this->SetInput($input);
|
||||
$this->app->Tpl->Parse('PAGE', "PLACEHOLDER_MODULENAME_edit.tpl");
|
||||
}
|
||||
|
||||
|
@ -52382,6 +52382,17 @@
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "nummer",
|
||||
"Type": "int(11)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": null,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "bezeichnung",
|
||||
"Type": "varchar(255)",
|
||||
@ -52393,6 +52404,17 @@
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "beschreibung",
|
||||
"Type": "varchar(255)",
|
||||
"Collation": "utf8mb3_general_ci",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "projekt",
|
||||
"Type": "varchar(255)",
|
||||
@ -108981,6 +109003,17 @@
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "datum",
|
||||
"Type": "date",
|
||||
"Collation": null,
|
||||
"Null": "YES",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "status_beleg",
|
||||
"Type": "varchar(64)",
|
||||
@ -110707,6 +110740,39 @@
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "steuersatz_normal",
|
||||
"Type": "decimal(5,2)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "steuersatz_ermaessigt",
|
||||
"Type": "decimal(5,2)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "ust_befreit",
|
||||
"Type": "int(1)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
}
|
||||
],
|
||||
"keys": [
|
||||
@ -111302,6 +111368,17 @@
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "sachkonto",
|
||||
"Type": "int(11)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "0",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
}
|
||||
],
|
||||
"keys": [
|
||||
|
@ -2676,7 +2676,7 @@ public function NavigationHooks(&$menu)
|
||||
// @refactor in Dateien Modul
|
||||
function AnzahlDateien($objekt,$id)
|
||||
{
|
||||
return $this->app->DB->Select("SELECT COUNT(id) FROM datei_stichwoerter WHERE objekt='$objekt' AND parameter='$id'");
|
||||
return $this->app->DB->Select("SELECT COUNT(ds.id) FROM datei_stichwoerter ds INNER JOIN datei d ON d.id = ds.datei WHERE ds.objekt='$objekt' AND ds.parameter='$id' AND d.geloescht <> 1");
|
||||
}
|
||||
|
||||
|
||||
@ -35375,6 +35375,7 @@ function Firmendaten($field,$projekt="")
|
||||
{
|
||||
case 'bestellung':
|
||||
case 'anfrage':
|
||||
case 'verbindlichkeit':
|
||||
$aufwendung = true;
|
||||
break;
|
||||
}
|
||||
@ -37298,7 +37299,7 @@ function Firmendaten($field,$projekt="")
|
||||
|
||||
function GetDateiSubjektObjekt($subjekt,$objekt,$parameter)
|
||||
{
|
||||
$dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' GROUP by datei");
|
||||
$dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter INNER JOIN datei d on d.id = datei WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' AND d.geloescht <> 1 GROUP by datei");
|
||||
if(empty($dateien)) {
|
||||
return null;
|
||||
}
|
||||
|
@ -1,238 +1,244 @@
|
||||
<?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 ObjGenVerbindlichkeit_Position
|
||||
{
|
||||
|
||||
private $id;
|
||||
private $verbindlichkeit;
|
||||
private $sort;
|
||||
private $artikel;
|
||||
private $projekt;
|
||||
private $bestellung;
|
||||
private $nummer;
|
||||
private $bestellnummer;
|
||||
private $waehrung;
|
||||
private $einheit;
|
||||
private $vpe;
|
||||
private $bezeichnung;
|
||||
private $umsatzsteuer;
|
||||
private $status;
|
||||
private $beschreibung;
|
||||
private $lieferdatum;
|
||||
private $steuersatz;
|
||||
private $steuertext;
|
||||
private $preis;
|
||||
private $menge;
|
||||
private $kostenstelle;
|
||||
|
||||
public $app; //application object
|
||||
|
||||
public function __construct($app)
|
||||
{
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
public function Select($id)
|
||||
{
|
||||
if(is_numeric($id))
|
||||
$result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')");
|
||||
else
|
||||
return -1;
|
||||
|
||||
$result = $result[0];
|
||||
|
||||
$this->id=$result['id'];
|
||||
$this->verbindlichkeit=$result['verbindlichkeit'];
|
||||
$this->sort=$result['sort'];
|
||||
$this->artikel=$result['artikel'];
|
||||
$this->projekt=$result['projekt'];
|
||||
$this->bestellung=$result['bestellung'];
|
||||
$this->nummer=$result['nummer'];
|
||||
$this->bestellnummer=$result['bestellnummer'];
|
||||
$this->waehrung=$result['waehrung'];
|
||||
$this->einheit=$result['einheit'];
|
||||
$this->vpe=$result['vpe'];
|
||||
$this->bezeichnung=$result['bezeichnung'];
|
||||
$this->umsatzsteuer=$result['umsatzsteuer'];
|
||||
$this->status=$result['status'];
|
||||
$this->beschreibung=$result['beschreibung'];
|
||||
$this->lieferdatum=$result['lieferdatum'];
|
||||
$this->steuersatz=$result['steuersatz'];
|
||||
$this->steuertext=$result['steuertext'];
|
||||
$this->preis=$result['preis'];
|
||||
$this->menge=$result['menge'];
|
||||
$this->kostenstelle=$result['kostenstelle'];
|
||||
}
|
||||
|
||||
public function Create()
|
||||
{
|
||||
$sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`)
|
||||
VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}')";
|
||||
|
||||
$this->app->DB->Insert($sql);
|
||||
$this->id = $this->app->DB->GetInsertID();
|
||||
}
|
||||
|
||||
public function Update()
|
||||
{
|
||||
if(!is_numeric($this->id)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$sql = "UPDATE `verbindlichkeit_position` SET
|
||||
`verbindlichkeit`='{$this->verbindlichkeit}',
|
||||
`sort`='{$this->sort}',
|
||||
`artikel`='{$this->artikel}',
|
||||
`projekt`='{$this->projekt}',
|
||||
`bestellung`='{$this->bestellung}',
|
||||
`nummer`='{$this->nummer}',
|
||||
`bestellnummer`='{$this->bestellnummer}',
|
||||
`waehrung`='{$this->waehrung}',
|
||||
`einheit`='{$this->einheit}',
|
||||
`vpe`='{$this->vpe}',
|
||||
`bezeichnung`='{$this->bezeichnung}',
|
||||
`umsatzsteuer`='{$this->umsatzsteuer}',
|
||||
`status`='{$this->status}',
|
||||
`beschreibung`='{$this->beschreibung}',
|
||||
`lieferdatum`='{$this->lieferdatum}',
|
||||
`steuersatz`='{$this->steuersatz}',
|
||||
`steuertext`='{$this->steuertext}',
|
||||
`preis`='{$this->preis}',
|
||||
`menge`='{$this->menge}',
|
||||
`kostenstelle`='{$this->kostenstelle}'
|
||||
WHERE (`id`='{$this->id}')";
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
|
||||
public function Delete($id='')
|
||||
{
|
||||
if(is_numeric($id))
|
||||
{
|
||||
$this->id=$id;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
|
||||
$sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')";
|
||||
$this->app->DB->Delete($sql);
|
||||
|
||||
$this->id='';
|
||||
$this->verbindlichkeit='';
|
||||
$this->sort='';
|
||||
$this->artikel='';
|
||||
$this->projekt='';
|
||||
$this->bestellung='';
|
||||
$this->nummer='';
|
||||
$this->bestellnummer='';
|
||||
$this->waehrung='';
|
||||
$this->einheit='';
|
||||
$this->vpe='';
|
||||
$this->bezeichnung='';
|
||||
$this->umsatzsteuer='';
|
||||
$this->status='';
|
||||
$this->beschreibung='';
|
||||
$this->lieferdatum='';
|
||||
$this->steuersatz='';
|
||||
$this->steuertext='';
|
||||
$this->preis='';
|
||||
$this->menge='';
|
||||
$this->kostenstelle='';
|
||||
}
|
||||
|
||||
public function Copy()
|
||||
{
|
||||
$this->id = '';
|
||||
$this->Create();
|
||||
}
|
||||
|
||||
/**
|
||||
Mit dieser Funktion kann man einen Datensatz suchen
|
||||
dafuer muss man die Attribute setzen nach denen gesucht werden soll
|
||||
dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt
|
||||
zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen
|
||||
**/
|
||||
|
||||
public function Find()
|
||||
{
|
||||
//TODO Suche mit den werten machen
|
||||
}
|
||||
|
||||
public function FindNext()
|
||||
{
|
||||
//TODO Suche mit den alten werten fortsetzen machen
|
||||
}
|
||||
|
||||
/** Funktionen um durch die Tabelle iterieren zu koennen */
|
||||
|
||||
public function Next()
|
||||
{
|
||||
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
|
||||
}
|
||||
|
||||
public function First()
|
||||
{
|
||||
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
|
||||
}
|
||||
|
||||
/** dank dieser funktionen kann man die tatsaechlichen werte einfach
|
||||
ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/
|
||||
|
||||
public function SetId($value) { $this->id=$value; }
|
||||
public function GetId() { return $this->id; }
|
||||
public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; }
|
||||
public function GetVerbindlichkeit() { return $this->verbindlichkeit; }
|
||||
public function SetSort($value) { $this->sort=$value; }
|
||||
public function GetSort() { return $this->sort; }
|
||||
public function SetArtikel($value) { $this->artikel=$value; }
|
||||
public function GetArtikel() { return $this->artikel; }
|
||||
public function SetProjekt($value) { $this->projekt=$value; }
|
||||
public function GetProjekt() { return $this->projekt; }
|
||||
public function SetBestellung($value) { $this->bestellung=$value; }
|
||||
public function GetBestellung() { return $this->bestellung; }
|
||||
public function SetNummer($value) { $this->nummer=$value; }
|
||||
public function GetNummer() { return $this->nummer; }
|
||||
public function SetBestellnummer($value) { $this->bestellnummer=$value; }
|
||||
public function GetBestellnummer() { return $this->bestellnummer; }
|
||||
public function SetWaehrung($value) { $this->waehrung=$value; }
|
||||
public function GetWaehrung() { return $this->waehrung; }
|
||||
public function SetEinheit($value) { $this->einheit=$value; }
|
||||
public function GetEinheit() { return $this->einheit; }
|
||||
public function SetVpe($value) { $this->vpe=$value; }
|
||||
public function GetVpe() { return $this->vpe; }
|
||||
public function SetBezeichnung($value) { $this->bezeichnung=$value; }
|
||||
public function GetBezeichnung() { return $this->bezeichnung; }
|
||||
public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; }
|
||||
public function GetUmsatzsteuer() { return $this->umsatzsteuer; }
|
||||
public function SetStatus($value) { $this->status=$value; }
|
||||
public function GetStatus() { return $this->status; }
|
||||
public function SetBeschreibung($value) { $this->beschreibung=$value; }
|
||||
public function GetBeschreibung() { return $this->beschreibung; }
|
||||
public function SetLieferdatum($value) { $this->lieferdatum=$value; }
|
||||
public function GetLieferdatum() { return $this->lieferdatum; }
|
||||
public function SetSteuersatz($value) { $this->steuersatz=$value; }
|
||||
public function GetSteuersatz() { return $this->steuersatz; }
|
||||
public function SetSteuertext($value) { $this->steuertext=$value; }
|
||||
public function GetSteuertext() { return $this->steuertext; }
|
||||
public function SetPreis($value) { $this->preis=$value; }
|
||||
public function GetPreis() { return $this->preis; }
|
||||
public function SetMenge($value) { $this->menge=$value; }
|
||||
public function GetMenge() { return $this->menge; }
|
||||
public function SetKostenstelle($value) { $this->kostenstelle=$value; }
|
||||
public function GetKostenstelle() { return $this->kostenstelle; }
|
||||
|
||||
}
|
||||
<?php
|
||||
|
||||
class ObjGenVerbindlichkeit_Position
|
||||
{
|
||||
|
||||
private $id;
|
||||
private $verbindlichkeit;
|
||||
private $sort;
|
||||
private $artikel;
|
||||
private $projekt;
|
||||
private $bestellung;
|
||||
private $nummer;
|
||||
private $bestellnummer;
|
||||
private $waehrung;
|
||||
private $einheit;
|
||||
private $vpe;
|
||||
private $bezeichnung;
|
||||
private $umsatzsteuer;
|
||||
private $status;
|
||||
private $beschreibung;
|
||||
private $lieferdatum;
|
||||
private $steuersatz;
|
||||
private $steuertext;
|
||||
private $preis;
|
||||
private $menge;
|
||||
private $kostenstelle;
|
||||
private $sachkonto;
|
||||
|
||||
public $app; //application object
|
||||
|
||||
public function __construct($app)
|
||||
{
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
public function Select($id)
|
||||
{
|
||||
if(is_numeric($id))
|
||||
$result = $this->app->DB->SelectArr("SELECT * FROM `verbindlichkeit_position` WHERE (`id` = '$id')");
|
||||
else
|
||||
return -1;
|
||||
|
||||
$result = $result[0];
|
||||
|
||||
$this->id=$result['id'];
|
||||
$this->verbindlichkeit=$result['verbindlichkeit'];
|
||||
$this->sort=$result['sort'];
|
||||
$this->artikel=$result['artikel'];
|
||||
$this->projekt=$result['projekt'];
|
||||
$this->bestellung=$result['bestellung'];
|
||||
$this->nummer=$result['nummer'];
|
||||
$this->bestellnummer=$result['bestellnummer'];
|
||||
$this->waehrung=$result['waehrung'];
|
||||
$this->einheit=$result['einheit'];
|
||||
$this->vpe=$result['vpe'];
|
||||
$this->bezeichnung=$result['bezeichnung'];
|
||||
$this->umsatzsteuer=$result['umsatzsteuer'];
|
||||
$this->status=$result['status'];
|
||||
$this->beschreibung=$result['beschreibung'];
|
||||
$this->lieferdatum=$result['lieferdatum'];
|
||||
$this->steuersatz=$result['steuersatz'];
|
||||
$this->steuertext=$result['steuertext'];
|
||||
$this->preis=$result['preis'];
|
||||
$this->menge=$result['menge'];
|
||||
$this->kostenstelle=$result['kostenstelle'];
|
||||
$this->sachkonto=$result['sachkonto'];
|
||||
}
|
||||
|
||||
public function Create()
|
||||
{
|
||||
$sql = "INSERT INTO `verbindlichkeit_position` (`id`,`verbindlichkeit`,`sort`,`artikel`,`projekt`,`bestellung`,`nummer`,`bestellnummer`,`waehrung`,`einheit`,`vpe`,`bezeichnung`,`umsatzsteuer`,`status`,`beschreibung`,`lieferdatum`,`steuersatz`,`steuertext`,`preis`,`menge`,`kostenstelle`)
|
||||
VALUES(NULL,'{$this->verbindlichkeit}','{$this->sort}','{$this->artikel}','{$this->projekt}','{$this->bestellung}','{$this->nummer}','{$this->bestellnummer}','{$this->waehrung}','{$this->einheit}','{$this->vpe}','{$this->bezeichnung}','{$this->umsatzsteuer}','{$this->status}','{$this->beschreibung}','{$this->lieferdatum}','{$this->steuersatz}','{$this->steuertext}','{$this->preis}','{$this->menge}','{$this->kostenstelle}','{$this->sachkonto}')";
|
||||
|
||||
$this->app->DB->Insert($sql);
|
||||
$this->id = $this->app->DB->GetInsertID();
|
||||
}
|
||||
|
||||
public function Update()
|
||||
{
|
||||
if(!is_numeric($this->id)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
$sql = "UPDATE `verbindlichkeit_position` SET
|
||||
`verbindlichkeit`='{$this->verbindlichkeit}',
|
||||
`sort`='{$this->sort}',
|
||||
`artikel`='{$this->artikel}',
|
||||
`projekt`='{$this->projekt}',
|
||||
`bestellung`='{$this->bestellung}',
|
||||
`nummer`='{$this->nummer}',
|
||||
`bestellnummer`='{$this->bestellnummer}',
|
||||
`waehrung`='{$this->waehrung}',
|
||||
`einheit`='{$this->einheit}',
|
||||
`vpe`='{$this->vpe}',
|
||||
`bezeichnung`='{$this->bezeichnung}',
|
||||
`umsatzsteuer`='{$this->umsatzsteuer}',
|
||||
`status`='{$this->status}',
|
||||
`beschreibung`='{$this->beschreibung}',
|
||||
`lieferdatum`='{$this->lieferdatum}',
|
||||
`steuersatz`='{$this->steuersatz}',
|
||||
`steuertext`='{$this->steuertext}',
|
||||
`preis`='{$this->preis}',
|
||||
`menge`='{$this->menge}',
|
||||
`kostenstelle`='{$this->kostenstelle}',
|
||||
`sachkonto`='{$this->sachkonto}'
|
||||
WHERE (`id`='{$this->id}')";
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
|
||||
public function Delete($id='')
|
||||
{
|
||||
if(is_numeric($id))
|
||||
{
|
||||
$this->id=$id;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
|
||||
$sql = "DELETE FROM `verbindlichkeit_position` WHERE (`id`='{$this->id}')";
|
||||
$this->app->DB->Delete($sql);
|
||||
|
||||
$this->id='';
|
||||
$this->verbindlichkeit='';
|
||||
$this->sort='';
|
||||
$this->artikel='';
|
||||
$this->projekt='';
|
||||
$this->bestellung='';
|
||||
$this->nummer='';
|
||||
$this->bestellnummer='';
|
||||
$this->waehrung='';
|
||||
$this->einheit='';
|
||||
$this->vpe='';
|
||||
$this->bezeichnung='';
|
||||
$this->umsatzsteuer='';
|
||||
$this->status='';
|
||||
$this->beschreibung='';
|
||||
$this->lieferdatum='';
|
||||
$this->steuersatz='';
|
||||
$this->steuertext='';
|
||||
$this->preis='';
|
||||
$this->menge='';
|
||||
$this->kostenstelle='';
|
||||
$this->sachkonto='';
|
||||
}
|
||||
|
||||
public function Copy()
|
||||
{
|
||||
$this->id = '';
|
||||
$this->Create();
|
||||
}
|
||||
|
||||
/**
|
||||
Mit dieser Funktion kann man einen Datensatz suchen
|
||||
dafuer muss man die Attribute setzen nach denen gesucht werden soll
|
||||
dann kriegt man als ergebnis den ersten Datensatz der auf die Suche uebereinstimmt
|
||||
zurueck. Mit Next() kann man sich alle weiteren Ergebnisse abholen
|
||||
**/
|
||||
|
||||
public function Find()
|
||||
{
|
||||
//TODO Suche mit den werten machen
|
||||
}
|
||||
|
||||
public function FindNext()
|
||||
{
|
||||
//TODO Suche mit den alten werten fortsetzen machen
|
||||
}
|
||||
|
||||
/** Funktionen um durch die Tabelle iterieren zu koennen */
|
||||
|
||||
public function Next()
|
||||
{
|
||||
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
|
||||
}
|
||||
|
||||
public function First()
|
||||
{
|
||||
//TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer
|
||||
}
|
||||
|
||||
/** dank dieser funktionen kann man die tatsaechlichen werte einfach
|
||||
ueberladen (in einem Objekt das mit seiner klasse ueber dieser steht)**/
|
||||
|
||||
public function SetId($value) { $this->id=$value; }
|
||||
public function GetId() { return $this->id; }
|
||||
public function SetVerbindlichkeit($value) { $this->verbindlichkeit=$value; }
|
||||
public function GetVerbindlichkeit() { return $this->verbindlichkeit; }
|
||||
public function SetSort($value) { $this->sort=$value; }
|
||||
public function GetSort() { return $this->sort; }
|
||||
public function SetArtikel($value) { $this->artikel=$value; }
|
||||
public function GetArtikel() { return $this->artikel; }
|
||||
public function SetProjekt($value) { $this->projekt=$value; }
|
||||
public function GetProjekt() { return $this->projekt; }
|
||||
public function SetBestellung($value) { $this->bestellung=$value; }
|
||||
public function GetBestellung() { return $this->bestellung; }
|
||||
public function SetNummer($value) { $this->nummer=$value; }
|
||||
public function GetNummer() { return $this->nummer; }
|
||||
public function SetBestellnummer($value) { $this->bestellnummer=$value; }
|
||||
public function GetBestellnummer() { return $this->bestellnummer; }
|
||||
public function SetWaehrung($value) { $this->waehrung=$value; }
|
||||
public function GetWaehrung() { return $this->waehrung; }
|
||||
public function SetEinheit($value) { $this->einheit=$value; }
|
||||
public function GetEinheit() { return $this->einheit; }
|
||||
public function SetVpe($value) { $this->vpe=$value; }
|
||||
public function GetVpe() { return $this->vpe; }
|
||||
public function SetBezeichnung($value) { $this->bezeichnung=$value; }
|
||||
public function GetBezeichnung() { return $this->bezeichnung; }
|
||||
public function SetUmsatzsteuer($value) { $this->umsatzsteuer=$value; }
|
||||
public function GetUmsatzsteuer() { return $this->umsatzsteuer; }
|
||||
public function SetStatus($value) { $this->status=$value; }
|
||||
public function GetStatus() { return $this->status; }
|
||||
public function SetBeschreibung($value) { $this->beschreibung=$value; }
|
||||
public function GetBeschreibung() { return $this->beschreibung; }
|
||||
public function SetLieferdatum($value) { $this->lieferdatum=$value; }
|
||||
public function GetLieferdatum() { return $this->lieferdatum; }
|
||||
public function SetSteuersatz($value) { $this->steuersatz=$value; }
|
||||
public function GetSteuersatz() { return $this->steuersatz; }
|
||||
public function SetSteuertext($value) { $this->steuertext=$value; }
|
||||
public function GetSteuertext() { return $this->steuertext; }
|
||||
public function SetPreis($value) { $this->preis=$value; }
|
||||
public function GetPreis() { return $this->preis; }
|
||||
public function SetMenge($value) { $this->menge=$value; }
|
||||
public function GetMenge() { return $this->menge; }
|
||||
public function SetKostenstelle($value) { $this->kostenstelle=$value; }
|
||||
public function GetKostenstelle() { return $this->kostenstelle; }
|
||||
public function SetSachkonto($value) { $this->sachkonto=$value; }
|
||||
public function GetSachkonto() { return $this->sachkonto; }
|
||||
|
||||
}
|
||||
|
@ -1,59 +1,59 @@
|
||||
<?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 GenAdresse {
|
||||
|
||||
function __construct(&$app) {
|
||||
|
||||
$this->app=&$app;
|
||||
$this->app->ActionHandlerInit($this);
|
||||
|
||||
$this->app->ActionHandler("create","AdresseCreate");
|
||||
$this->app->ActionHandler("edit","AdresseEdit");
|
||||
$this->app->ActionHandler("copy","AdresseCopy");
|
||||
$this->app->ActionHandler("list","AdresseList");
|
||||
$this->app->ActionHandler("delete","AdresseDelete");
|
||||
|
||||
$this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
|
||||
function AdresseCreate(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Anlegen)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_create.tpl");
|
||||
}
|
||||
|
||||
function AdresseEdit(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_edit.tpl");
|
||||
}
|
||||
|
||||
function AdresseCopy(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Kopieren)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_copy.tpl");
|
||||
}
|
||||
|
||||
function AdresseDelete(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Löschen)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_delete.tpl");
|
||||
}
|
||||
|
||||
function AdresseList(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Übersicht)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_list.tpl");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
|
||||
class GenAdresse {
|
||||
|
||||
function __construct(&$app) {
|
||||
|
||||
$this->app=&$app;
|
||||
$this->app->ActionHandlerInit($this);
|
||||
|
||||
$this->app->ActionHandler("create","AdresseCreate");
|
||||
$this->app->ActionHandler("edit","AdresseEdit");
|
||||
$this->app->ActionHandler("copy","AdresseCopy");
|
||||
$this->app->ActionHandler("list","AdresseList");
|
||||
$this->app->ActionHandler("delete","AdresseDelete");
|
||||
|
||||
$this->app->Tpl->Set("HEADING","Adresse"); //$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
|
||||
function AdresseCreate(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Anlegen)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_create.tpl");
|
||||
}
|
||||
|
||||
function AdresseEdit(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Bearbeiten)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_edit.tpl");
|
||||
}
|
||||
|
||||
function AdresseCopy(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Kopieren)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_copy.tpl");
|
||||
}
|
||||
|
||||
function AdresseDelete(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Löschen)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_delete.tpl");
|
||||
}
|
||||
|
||||
function AdresseList(){
|
||||
$this->app->Tpl->Set("HEADING","Adresse (Übersicht)");
|
||||
$this->app->PageBuilder->CreateGen("adresse_list.tpl");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -674,6 +674,7 @@ class Ajax {
|
||||
echo $str;
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!empty($datei['parameter'])) {
|
||||
if($cmd === 'projekt') {
|
||||
if(!$this->app->erp->UserProjektRecht($datei['parameter'])) {
|
||||
@ -707,8 +708,7 @@ class Ajax {
|
||||
}
|
||||
}
|
||||
}
|
||||
//Rechte prüfen
|
||||
|
||||
//Rechte prüfen
|
||||
$userdata = isset($this->app->Conf->WFuserdata)
|
||||
?$this->app->Conf->WFuserdata
|
||||
:(str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'../userdata');
|
||||
@ -746,34 +746,17 @@ class Ajax {
|
||||
exit;
|
||||
break;
|
||||
case 'application/pdf':
|
||||
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg');
|
||||
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.png');
|
||||
header('Content-type: image/png');
|
||||
echo $str;
|
||||
exit;
|
||||
break;
|
||||
default:
|
||||
$str = file_get_contents(dirname(__DIR__) . '/themes/new/images/pdf.svg');
|
||||
if(substr(strtolower($datei['dateiname']),-4) === '.gif'){
|
||||
header('Content-type: image/gif');
|
||||
echo $str;
|
||||
exit;
|
||||
}
|
||||
if(substr(strtolower($datei['dateiname']),-4) === '.png'){
|
||||
header('Content-type: image/png');
|
||||
echo $str;
|
||||
exit;
|
||||
}
|
||||
if(substr(strtolower($datei['dateiname']),-4) === '.jpg'
|
||||
|| substr(strtolower($datei['dateiname']),-4) === 'jpeg'){
|
||||
header('Content-type: image/jpg');
|
||||
echo $str;
|
||||
exit;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(file_exists($cachefolder.'/'.$datei['id'].'_100_100')) {
|
||||
$type = is_file($path.'/'.$datei['id'])? false : mime_content_type($path.'/'.$datei['id']);
|
||||
if($type === false) {
|
||||
@ -2379,7 +2362,14 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
|
||||
for($i = 0; $i < $carr; $i++)
|
||||
$newarr[] = $arr[$i]['name'];
|
||||
break;
|
||||
case "sachkonto_aufwendungen":
|
||||
$arr = $this->app->DB->SelectArr("SELECT CONCAT(sachkonto,' ',beschriftung) as name FROM kontorahmen
|
||||
WHERE art = 1 AND (beschriftung LIKE '%$term%' OR sachkonto LIKE '%$term%' OR sachkonto LIKE '%$term2%' OR sachkonto LIKE '%$term3%' OR beschriftung LIKE '%$term2%' OR beschriftung LIKE '%$term3%') AND ausblenden!=1 $andprojekt ORDER by sachkonto");
|
||||
|
||||
$carr = !empty($arr)?count($arr):0;
|
||||
for($i = 0; $i < $carr; $i++)
|
||||
$newarr[] = $arr[$i]['name'];
|
||||
break;
|
||||
case "lieferbedingungen":
|
||||
$arr = $this->app->DB->SelectArr("SELECT CONCAT(lieferbedingungen) as name FROM lieferbedingungen
|
||||
WHERE (lieferbedingungen LIKE '%$term%' OR lieferbedingungen LIKE '%$term2%' OR lieferbedingungen LIKE '%$term3%') ORDER by lieferbedingungen");
|
||||
@ -2458,6 +2448,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
|
||||
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
|
||||
|
||||
$arr = $this->app->DB->SelectArr("SELECT CONCAT(nummer,' ',beschreibung) as name FROM kostenstellen WHERE $subwhere ORDER by nummer");
|
||||
|
||||
$carr = !empty($arr)?count($arr):0;
|
||||
for($i = 0; $i < $carr; $i++)
|
||||
$newarr[] = $arr[$i]['name'];
|
||||
|
208
www/pages/content/verbindlichkeit_edit.tpl
Normal file
208
www/pages/content/verbindlichkeit_edit.tpl
Normal file
@ -0,0 +1,208 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Details</a></li>
|
||||
<!-- <li><a href="#tabs-2">Positionen</a></li> -->
|
||||
<li><a href="#tabs-3">Protokoll</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-6 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-8 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset style="float: left;">
|
||||
<legend>{|<b>Verbindlichkeit <font color="blue">[BELEGNR]</font></b> Lf-Nr. <a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]">[LIEFERANTENNUMMER]|}</a></legend>
|
||||
[STATUSICONS]
|
||||
</fieldset>
|
||||
<fieldset style="float: right;">
|
||||
<input type="submit" name="submit" value="Speichern"/>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-8 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Status|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" value="[STATUS]" size="20" disabled>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Adresse|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20" [SAVEDISABLED] required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Rechnungs-Nr.|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="rechnung" id="rechnung" value="[RECHNUNG]" size="20" [SAVEDISABLED] required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Rechnungsdatum|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Eingangsdatum|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="eingangsdatum" id="eingangsdatum" value="[EINGANGSDATUM]" size="20" [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Betrag brutto|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="betrag" id="betrag" value="[BETRAG]" size="20" [SAVEDISABLED]>
|
||||
<select name="waehrung" [SAVEDISABLED]>[WAEHRUNGSELECT]</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr hidden>
|
||||
<td>
|
||||
{|Betrag Positionen brutto|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="betragbruttopos" id="betragbruttopos" value="[BETRAGBRUTTOPOS]" size="20" disabled>
|
||||
</td>
|
||||
</tr>
|
||||
<tr hidden>
|
||||
<td>
|
||||
{|Betrag Positionen netto|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="betragnetto" id="betragnetto" value="[BETRAGNETTO]" size="20" disabled [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Zahlbarbis|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Skonto %|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="skonto" id="skonto" value="[SKONTO]" size="20" [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Skontobis|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Waren-/Leistungsprüfung (Einkauf)|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="wareneingang" value="1" [WARENEINGANGCHECKED] size="20" disabled>
|
||||
<a href="index.php?module=verbindlichkeit&action=freigabeeinkauf&id=[ID]" title="freigeben" [FREIGABEEINKAUFHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
|
||||
<a href="index.php?module=verbindlichkeit&action=ruecksetzeneinkauf&id=[ID]" title="rücksetzen" [RUECKSETZENEINKAUFHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Rechnungseingangsprüfung (Buchhaltung)|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="rechnungsfreigabe" [RECHNUNGSFREIGABECHECKED] size="20" disabled>
|
||||
<a href="index.php?module=verbindlichkeit&action=freigabebuchhaltung&id=[ID]" title="freigeben" [FREIGABEBUCHHALTUNGHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
|
||||
<a href="index.php?module=verbindlichkeit&action=ruecksetzenbuchhaltung&id=[ID]" title="rücksetzen" [RUECKSETZENBUCHHALTUNGHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Bezahlt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="zahlungsstatus" [BEZAHLTCHECKED] size="20" disabled>
|
||||
<a href="index.php?module=verbindlichkeit&action=freigabebezahlt&id=[ID]" title="auf 'bezahlt' setzen" [FREIGABEBEZAHLTHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
|
||||
<a href="index.php?module=verbindlichkeit&action=ruecksetzenbezahlt&id=[ID]" title="rücksetzen" [RUECKSETZENBEZAHLTHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Projekt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Kostenstelle|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Internebemerkung|}:
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="internebemerkung" id="internebemerkung" rows="6" style="width:100%;">[INTERNEBEMERKUNG]</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Vorschau|}</legend>
|
||||
[INLINEPDF]
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--
|
||||
<div id="tabs-2">
|
||||
[POS]
|
||||
</div>
|
||||
-->
|
||||
<div id="tabs-3">
|
||||
[MINIDETAIL]
|
||||
</div>
|
||||
</div>
|
||||
|
72
www/pages/content/verbindlichkeit_list.tpl
Normal file
72
www/pages/content/verbindlichkeit_list.tpl
Normal file
@ -0,0 +1,72 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
|
||||
<div class="filter-box filter-usersave">
|
||||
<div class="filter-block filter-inline">
|
||||
<div class="filter-title">{|Filter|}</div>
|
||||
<ul class="filter-list">
|
||||
<li class="filter-item">
|
||||
<label for="wareneingang" class="switch">
|
||||
<input type="checkbox" id="wareneingang">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="wareneingang">{|Wareingang/Leistungsprüfung fehlt|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="rechnungsfreigabe" class="switch">
|
||||
<input type="checkbox" id="rechnungsfreigabe">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="rechnungsfreigabe">{|Rechnungseingangsprüfung fehlt|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="nichtbezahlt" class="switch">
|
||||
<input type="checkbox" id="nichtbezahlt">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="nichtbezahlt">{|Nicht bezahlt|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="zahlbarbis">{|Zahlbar bis|}:</label>
|
||||
<input type="text" name="zahlbarbis" id="zahlbarbis" size="10">
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="skontobis">{|Skonto bis|}:</label>
|
||||
<input type="text" name="skontobis" id="skontobis" size="10">
|
||||
</li>
|
||||
</ul>
|
||||
<form method="post" action="#">
|
||||
<input type="submit" class="btnBlue" name="status_berechnen" value="{|Status berechnen|}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" action="#">
|
||||
[TAB1]
|
||||
<fieldset><legend>{|Stapelverarbeitung|}</legend>
|
||||
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" /> {|alle markieren|}
|
||||
<select id="sel_aktion" name="sel_aktion">
|
||||
<option value="">{|bitte wählen|} ...</option>
|
||||
[MANUELLFREIGABEEINKAUF]
|
||||
[MANUELLFREIGABEBUCHHALTUNG]
|
||||
[ALSBEZAHLTMARKIEREN]
|
||||
</select>
|
||||
<input type="submit" class="btnBlue" name="ausfuehren" value="{|ausführen|}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function alleauswaehlen()
|
||||
{
|
||||
var wert = $('#auswahlalle').prop('checked');
|
||||
$('#verbindlichkeit_list').find(':checkbox').prop('checked',wert);
|
||||
}
|
||||
|
||||
</script>
|
@ -1,176 +1,76 @@
|
||||
|
||||
[FORMHANDLEREVENT]
|
||||
[MESSAGE]
|
||||
|
||||
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tbody>
|
||||
<tr valign="top" colspan="3">
|
||||
<td >
|
||||
<fieldset><legend>{|Rechnungsdaten|}</legend>
|
||||
|
||||
<style>
|
||||
.auftraginfo_cell {
|
||||
color: #636363;border: 1px solid #ccc;padding: 5px;
|
||||
}
|
||||
.auftrag_cell {
|
||||
color: #636363;border: 1px solid #fff;padding: 0px; margin:0px;
|
||||
}
|
||||
</style>
|
||||
<div style="float:left; width:49%; padding-right:1%;">
|
||||
<table width="100%" border="0">
|
||||
<tr valign="top"><td width="150">Lieferant:</td><td>[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
|
||||
<td> </td>
|
||||
<td colspan="2" rowspan="2" align="center"><b style="color:green">[MELDUNG]</b>
|
||||
<br><font size="7">[VERBINDLICHKEIT]</font>
|
||||
</td></tr>
|
||||
|
||||
<tr><td><br><br>Rechnungs Nr.:</td><td><br><br>[RECHNUNG][MSGRECHNUNG]</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr><td>Bestellung:</td><td width="250">[DISABLESTART]<a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID]" target="_blank">[BESTELLUNG]</a>[MSGBESTELLUNG][MULTIBESTELLUNG][DISABLEENDE]</td>
|
||||
<td> </td>
|
||||
<td width="200">Zahlweise:</td><td>[ZAHLUNGSWEISE][MSGZAHLUNGSWEISE]</td></tr>
|
||||
|
||||
<tr><td>Rechnungsdatum:</td><td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
|
||||
<td> </td>
|
||||
<td width="200">Zahlbar bis:</td><td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td></tr>
|
||||
|
||||
<tr><td>Betrag/Total (Brutto):</td><td>[BETRAG][MSGBETRAG] [WAEHRUNG][MSGWAEHRUNG]</td><td> </td>
|
||||
<td>Skonto in %:</td><td>[SKONTO][MSGSKONTO]</td>
|
||||
</tr>
|
||||
|
||||
<tr><td>USt. 19%:</td><td>[SUMMENORMAL][MSGSUMMENORMAL]</td><td> </td>
|
||||
<td>Skonto bis:</td><td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>USt. 7%:</td><td>[SUMMEERMAESSIGT][MSGSUMMEERMAESSIGT]</td>
|
||||
<td> </td>
|
||||
<td>Umsatzsteuer</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[STEUERSATZNAME3]</td><td>[SUMMESATZ3][MSGSUMMESATZ3]</td>
|
||||
<td> </td>
|
||||
<td>[STEUERSATZNAME4]</td><td>[SUMMESATZ4][MSGSUMMESATZ4]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Verwendungszweck:</td><td>[VERWENDUNGSZWECK][MSGVERWENDUNGSZWECK]</td>
|
||||
<td> </td>
|
||||
<td>Frachtkosten:</td><td>[FRACHTKOSTEN][MSGFRACHTKOSTEN]</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Projekt:</td><td>[PROJEKT][MSGKOSTENSTELLE]</td>
|
||||
<td> </td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>Kostenstelle:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
|
||||
<td> </td>
|
||||
<td>Freigabe:</td><td>[MSGFREIGABE] <i>Wareneingangsprüfung:</i> [FREIGABE] [MSGRECHNUNGSFREIGABE] <i>Rechnungseingangsprüfung:</i> [RECHNUNGSFREIGABE]</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Sachkonto:</td><td>[SACHKONTO][MSGSACHKONTO]</td>
|
||||
<td> </td>
|
||||
<td>Aktion:</td><td>[BUTTONBEZAHLT]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interne Bemerkung:</td><td colspan="4">[INTERNEBEMERKUNG]</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</td></tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="tableborder" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr valign="top"><td width="50%">
|
||||
<table cellspacing="5" width="100%">
|
||||
<!--<tr><td><b>Bestellung</b></td><td><b>Bestell-Nr.</b></td><td><b>Teilbetrag</b></td><td><b>Projekt</b></td><td><b>Kostenstelle</b></td><td><b>Bemerkung</b></td></tr>
|
||||
<tr><td>Nr. 1</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID1]" target="_blank">[BESTELLUNG1]</a>[MSGBESTELLUNG1]</td><td>[BESTELLUNG1BETRAG][MSGBESTELLUNG1BETRAG]</td>
|
||||
<td>[BESTELLUNG1PROJEKT]</td><td>[BESTELLUNG1KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG1BEMERKUNG][MSGBESTELLUNG1BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 2</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID2]" target="_blank">[BESTELLUNG2]</a>[MSGBESTELLUNG2]</td><td>[BESTELLUNG2BETRAG][MSGBESTELLUNG2BETRAG]</td>
|
||||
<td>[BESTELLUNG2PROJEKT]</td><td>[BESTELLUNG2KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG2BEMERKUNG][MSGBESTELLUNG2BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 3</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID3]" target="_blank">[BESTELLUNG3]</a>[MSGBESTELLUNG3]</td><td>[BESTELLUNG3BETRAG][MSGBESTELLUNG3BETRAG]</td>
|
||||
<td>[BESTELLUNG3PROJEKT]</td><td>[BESTELLUNG3KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG3BEMERKUNG][MSGBESTELLUNG3BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 4</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID4]" target="_blank">[BESTELLUNG4]</a>[MSGBESTELLUNG4]</td><td>[BESTELLUNG4BETRAG][MSGBESTELLUNG4BETRAG]</td>
|
||||
<td>[BESTELLUNG4PROJEKT]</td><td>[BESTELLUNG4KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG4BEMERKUNG][MSGBESTELLUNG4BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 5</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID5]" target="_blank">[BESTELLUNG5]</a>[MSGBESTELLUNG5]</td><td>[BESTELLUNG5BETRAG][MSGBESTELLUNG5BETRAG]</td>
|
||||
<td>[BESTELLUNG5PROJEKT]</td><td>[BESTELLUNG5KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG5BEMERKUNG][MSGBESTELLUNG5BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 6</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID6]" target="_blank">[BESTELLUNG6]</a>[MSGBESTELLUNG6]</td><td>[BESTELLUNG6BETRAG][MSGBESTELLUNG6BETRAG]</td>
|
||||
<td>[BESTELLUNG6PROJEKT]</td><td>[BESTELLUNG6KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG6BEMERKUNG][MSGBESTELLUNG6BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 7</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID7]" target="_blank">[BESTELLUNG7]</a>[MSGBESTELLUNG7]</td><td>[BESTELLUNG7BETRAG][MSGBESTELLUNG7BETRAG]</td>
|
||||
<td>[BESTELLUNG7PROJEKT]</td><td>[BESTELLUNG7KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG7BEMERKUNG][MSGBESTELLUNG7BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 8</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID8]" target="_blank">[BESTELLUNG8]</a>[MSGBESTELLUNG8]</td><td>[BESTELLUNG8BETRAG][MSGBESTELLUNG8BETRAG]</td>
|
||||
<td>[BESTELLUNG8PROJEKT]</td><td>[BESTELLUNG8KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG8BEMERKUNG][MSGBESTELLUNG8BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 9</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID9]" target="_blank">[BESTELLUNG9]</a>[MSGBESTELLUNG9]</td><td>[BESTELLUNG9BETRAG][MSGBESTELLUNG9BETRAG]</td>
|
||||
<td>[BESTELLUNG9PROJEKT]</td><td>[BESTELLUNG9KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG9BEMERKUNG][MSGBESTELLUNG9BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 10</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID10]" target="_blank">[BESTELLUNG10]</a>[MSGBESTELLUNG10]</td><td>[BESTELLUNG10BETRAG][MSGBESTELLUNG10BETRAG]</td>
|
||||
<td>[BESTELLUNG10PROJEKT]</td><td>[BESTELLUNG10KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG10BEMERKUNG][MSGBESTELLUNG10BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 11</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID11]" target="_blank">[BESTELLUNG11]</a>[MSGBESTELLUNG11]</td><td>[BESTELLUNG11BETRAG][MSGBESTELLUNG11BETRAG]</td>
|
||||
<td>[BESTELLUNG11PROJEKT]</td><td>[BESTELLUNG11KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG11BEMERKUNG][MSGBESTELLUNG11BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 12</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID12]" target="_blank">[BESTELLUNG12]</a>[MSGBESTELLUNG12]</td><td>[BESTELLUNG12BETRAG][MSGBESTELLUNG12BETRAG]</td>
|
||||
<td>[BESTELLUNG12PROJEKT]</td><td>[BESTELLUNG12KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG12BEMERKUNG][MSGBESTELLUNG12BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 13</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID13]" target="_blank">[BESTELLUNG13]</a>[MSGBESTELLUNG13]</td><td>[BESTELLUNG13BETRAG][MSGBESTELLUNG13BETRAG]</td>
|
||||
<td>[BESTELLUNG13PROJEKT]</td><td>[BESTELLUNG13KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG13BEMERKUNG][MSGBESTELLUNG13BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 14</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID14]" target="_blank">[BESTELLUNG14]</a>[MSGBESTELLUNG14]</td><td>[BESTELLUNG14BETRAG][MSGBESTELLUNG14BETRAG]</td>
|
||||
<td>[BESTELLUNG14PROJEKT]</td><td>[BESTELLUNG14KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG14BEMERKUNG][MSGBESTELLUNG14BEMERKUNG]</td></tr>
|
||||
<tr><td>Nr. 15</td><td><a href="index.php?module=bestellung&action=edit&id=[BESTELLUNGID15]" target="_blank">[BESTELLUNG15]</a>[MSGBESTELLUNG15]</td><td>[BESTELLUNG15BETRAG][MSGBESTELLUNG15BETRAG]</td>
|
||||
<td>[BESTELLUNG15PROJEKT]</td><td>[BESTELLUNG15KOSTENSTELLE]</td>
|
||||
<td>[BESTELLUNG15BEMERKUNG][MSGBESTELLUNG15BEMERKUNG]</td></tr>-->
|
||||
|
||||
[TABELLEBESTELLUNGEN]
|
||||
|
||||
</table>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
<table width="100%>">
|
||||
<tr><td>Summe Verbindlichkeit</td><td>Summe Kontierung</td></tr>
|
||||
<tr>
|
||||
<td class="greybox" width="25%">[SUMMEVERBINDLICHKEIT]</td>
|
||||
<td class="greybox" width="25%">[SUMMEKONTIERUNG]</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
[MESSAGEVORKONTIERUNG]
|
||||
[VORKONTIERUNG]
|
||||
[ZAHLUNGEN]
|
||||
|
||||
<div style="background-color:white">
|
||||
<h2 class="greyh2">{|Protokoll|}</h2>
|
||||
<div style="padding:10px">
|
||||
[PROTOKOLL]
|
||||
<tr valign="top">
|
||||
<td width="150">Lieferant:</td>
|
||||
<td colspan="3">[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rechnungs-Nr.:</td>
|
||||
<td>[RECHNUNG][MSGRECHNUNG]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rechnungsdatum:</td>
|
||||
<td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
|
||||
<tr>
|
||||
</tr>
|
||||
</tr>
|
||||
<td width="200">Zahlbar bis:</td>
|
||||
<td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td>
|
||||
</tr>
|
||||
<td>Betrag/Total (Brutto):</td>
|
||||
<td>[BETRAG][MSGBETRAG] [WAEHRUNG][MSGWAEHRUNG]</td>
|
||||
<tr>
|
||||
<td>Skonto in %:</td>
|
||||
<td>[SKONTO][MSGSKONTO]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Skonto bis:</td>
|
||||
<td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Projekt:</td>
|
||||
<td>[PROJEKT][MSGKOSTENSTELLE]</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kostenstelle:</td>
|
||||
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interne Bemerkung:</td>
|
||||
<td colspan="4">[INTERNEBEMERKUNG]</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float:left; width:50%">
|
||||
<div style="background-color:white">
|
||||
<h2 class="greyh2">Artikel</h2>
|
||||
<div style="padding:10px">
|
||||
[ARTIKEL]
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color:white">
|
||||
<h2 class="greyh2">Buchungen</h2>
|
||||
<div style="padding:10px">
|
||||
[ZAHLUNGEN]
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color:white">
|
||||
<h2 class="greyh2">Protokoll</h2>
|
||||
<div style="padding:10px;">
|
||||
[PROTOKOLL]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
857
www/pages/verbindlichkeit.php
Normal file
857
www/pages/verbindlichkeit.php
Normal file
@ -0,0 +1,857 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (c) 2023 OpenXE project
|
||||
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
|
||||
*/
|
||||
|
||||
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||
|
||||
class Verbindlichkeit {
|
||||
|
||||
function __construct($app, $intern = false) {
|
||||
$this->app = $app;
|
||||
if ($intern)
|
||||
return;
|
||||
|
||||
$this->app->ActionHandlerInit($this);
|
||||
$this->app->ActionHandler("list", "verbindlichkeit_list");
|
||||
$this->app->ActionHandler("create", "verbindlichkeit_edit"); // This automatically adds a "New" button
|
||||
$this->app->ActionHandler("edit", "verbindlichkeit_edit");
|
||||
$this->app->ActionHandler("positionen", "verbindlichkeit_positionen");
|
||||
$this->app->ActionHandler("delete", "verbindlichkeit_delete");
|
||||
$this->app->ActionHandler("dateien", "verbindlichkeit_dateien");
|
||||
$this->app->ActionHandler("inlinepdf", "verbindlichkeit_inlinepdf");
|
||||
$this->app->ActionHandler("positioneneditpopup", "verbindlichkeit_positioneneditpopup");
|
||||
$this->app->ActionHandler("freigabe", "verbindlichkeit_freigabe");
|
||||
$this->app->ActionHandler("schreibschutz", "verbindlichkeit_schreibschutz");
|
||||
$this->app->ActionHandler("freigabeeinkauf", "verbindlichkeit_freigabeeinkauf");
|
||||
$this->app->ActionHandler("freigabebuchhaltung", "verbindlichkeit_freigabebuchhaltung");
|
||||
$this->app->ActionHandler("freigabebezahlt", "verbindlichkeit_freigabebezahlt");
|
||||
$this->app->ActionHandler("ruecksetzeneinkauf", "verbindlichkeit_ruecksetzeneinkauf");
|
||||
$this->app->ActionHandler("ruecksetzenbuchhaltung", "verbindlichkeit_ruecksetzenbuchhaltung");
|
||||
$this->app->ActionHandler("ruecksetzenbezahlt", "verbindlichkeit_ruecksetzenbezahlt");
|
||||
$this->app->ActionHandler("minidetail", "verbindlichkeit_minidetail");
|
||||
|
||||
$this->app->DefaultActionHandler("list");
|
||||
$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
|
||||
public function Install() {
|
||||
/* Fill out manually later */
|
||||
}
|
||||
|
||||
function TableSearch(&$app, $name, $erlaubtevars) {
|
||||
switch ($name) {
|
||||
case "verbindlichkeit_list":
|
||||
$allowed['verbindlichkeit_list'] = array('list');
|
||||
$heading = array('','','Belegnr','Adresse', 'Lieferant', 'RE-Nr', 'RE-Datum', 'Betrag (brutto)', 'Währung', 'Ziel','Skontoziel','Skonto','Status','Monitor', 'Menü');
|
||||
$width = array('1%','1%','10%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array(
|
||||
'v.id',
|
||||
'v.id',
|
||||
'v.id',
|
||||
'a.name',
|
||||
'a.lieferantennummer',
|
||||
'v.rechnung',
|
||||
'v.rechnungsdatum',
|
||||
'v.betrag',
|
||||
'v.waehrung',
|
||||
'v.zahlbarbis',
|
||||
'v.skontobis',
|
||||
'v.skonto',
|
||||
'v.status',
|
||||
'v.status_beleg',
|
||||
'v.id'
|
||||
);
|
||||
|
||||
$searchsql = array(
|
||||
'a.name',
|
||||
'a.lieferantennummer',
|
||||
'v.rechnung',
|
||||
'v.internebemerkung'
|
||||
);
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 0;
|
||||
$alignright = array(8);
|
||||
$sumcol = array(8);
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',v.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=verbindlichkeit&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=verbindlichkeit&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
|
||||
v.id,
|
||||
$dropnbox,
|
||||
v.belegnr,
|
||||
a.name,
|
||||
a.lieferantennummer,
|
||||
v.rechnung,
|
||||
".$app->erp->FormatDate("v.rechnungsdatum").",
|
||||
".$app->erp->FormatMenge('v.betrag',2).",
|
||||
v.waehrung,
|
||||
".$app->erp->FormatDate("v.zahlbarbis").",
|
||||
IF(v.skonto <> 0,".$app->erp->FormatDate("v.skontobis").",''),
|
||||
IF(v.skonto <> 0,CONCAT(".$app->erp->FormatMenge('v.skonto',0).",'%'),''),
|
||||
v.status,
|
||||
".$app->YUI->IconsSQLVerbindlichkeit().",
|
||||
v.id FROM verbindlichkeit v
|
||||
LEFT JOIN adresse a ON v.adresse = a.id
|
||||
|
||||
";
|
||||
|
||||
$where = "1";
|
||||
$count = "SELECT count(DISTINCT id) FROM verbindlichkeit WHERE $where";
|
||||
// $groupby = "";
|
||||
|
||||
// Toggle filters
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#wareneingang').click( function() { fnFilterColumn1( 0 ); } );");
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#rechnungsfreigabe').click( function() { fnFilterColumn2( 0 ); } );");
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#nichtbezahlt').click( function() { fnFilterColumn3( 0 ); } );");
|
||||
|
||||
for ($r = 1;$r <= 3;$r++) {
|
||||
$this->app->Tpl->Add('JAVASCRIPT', '
|
||||
function fnFilterColumn' . $r . ' ( i )
|
||||
{
|
||||
if(oMoreData' . $r . $name . '==1)
|
||||
oMoreData' . $r . $name . ' = 0;
|
||||
else
|
||||
oMoreData' . $r . $name . ' = 1;
|
||||
|
||||
$(\'#' . $name . '\').dataTable().fnFilter(
|
||||
\'\',
|
||||
i,
|
||||
0,0
|
||||
);
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
|
||||
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
||||
if ($more_data1 == 1) {
|
||||
$where .= " AND v.freigabe <> '1'";
|
||||
} else {
|
||||
}
|
||||
|
||||
$more_data2 = $this->app->Secure->GetGET("more_data2");
|
||||
if ($more_data2 == 1) {
|
||||
$where .= " AND v.rechnungsfreigabe <> '1'";
|
||||
}
|
||||
else {
|
||||
}
|
||||
|
||||
$more_data3 = $this->app->Secure->GetGET("more_data3");
|
||||
if ($more_data3 == 1) {
|
||||
$where .= " AND v.bezahlt <> '1'";
|
||||
}
|
||||
else {
|
||||
}
|
||||
// END Toggle filters
|
||||
|
||||
$this->app->YUI->DatePicker('zahlbarbis');
|
||||
$filterzahlbarbis = $this->app->YUI->TableSearchFilter($name, 4,'zahlbarbis');
|
||||
if (!empty($filterzahlbarbis)) {
|
||||
$filterzahlbarbis = $this->app->String->Convert($filterzahlbarbis,'%1.%2.%3','%3-%2-%1');
|
||||
$where .= " AND v.zahlbarbis <= '".$filterzahlbarbis."'";
|
||||
}
|
||||
|
||||
$this->app->YUI->DatePicker('skontobis');
|
||||
$filterskontobis = $this->app->YUI->TableSearchFilter($name, 5,'skontobis');
|
||||
if (!empty($filterskontobis)) {
|
||||
$filterskontobis = $this->app->String->Convert($filterskontobis,'%1.%2.%3','%3-%2-%1');
|
||||
$where .= " AND v.skontobis <= '".$filterskontobis."'";
|
||||
}
|
||||
|
||||
$moreinfo = true; // Allow drop down details
|
||||
$menucol = 1; // For moredata
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$erg = false;
|
||||
|
||||
foreach ($erlaubtevars as $k => $v) {
|
||||
if (isset($$v)) {
|
||||
$erg[$v] = $$v;
|
||||
}
|
||||
}
|
||||
return $erg;
|
||||
}
|
||||
|
||||
function verbindlichkeit_list() {
|
||||
|
||||
// Process multi action
|
||||
$submit = $this->app->Secure->GetPOST('ausfuehren');
|
||||
if (!empty($submit)) {
|
||||
$auswahl = $this->app->Secure->GetPOST('auswahl');
|
||||
$aktion = $this->app->Secure->GetPOST('sel_aktion');
|
||||
|
||||
$selectedIds = [];
|
||||
if(!empty($auswahl)) {
|
||||
foreach($auswahl as $selectedId) {
|
||||
$selectedId = (int)$selectedId;
|
||||
if($selectedId > 0) {
|
||||
$selectedIds[] = $selectedId;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($aktion) {
|
||||
case 'freigabeeinkauf':
|
||||
foreach ($selectedIds as $id) {
|
||||
$this->verbindlichkeit_freigabeeinkauf($id);
|
||||
}
|
||||
break;
|
||||
case 'freigabebuchhaltung':
|
||||
foreach ($selectedIds as $id) {
|
||||
$this->verbindlichkeit_freigabebuchhaltung($id);
|
||||
}
|
||||
break;
|
||||
case 'bezahlt':
|
||||
foreach ($selectedIds as $id) {
|
||||
$this->verbindlichkeit_freigabebezahlt($id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=create", "Neu anlegen");
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'verbindlichkeit_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
|
||||
/*
|
||||
|
||||
Prepared for later use...
|
||||
|
||||
if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabeeinkauf')){
|
||||
$this->app->Tpl->Set('MANUELLFREIGABEEINKAUF', '<option value="freigabeeinkauf">{|freigeben (Einkauf)|}</option>');
|
||||
}
|
||||
|
||||
if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabebuchhaltung')){
|
||||
$this->app->Tpl->Set('MANUELLFREIGABEBUCHHALTUNG', '<option value="freigabebuchhaltung">{|freigeben (Buchhaltung)|}</option>');
|
||||
}
|
||||
|
||||
if($this->app->erp->RechteVorhanden('verbindlichkeit', 'freigabebezahlt')){
|
||||
$this->app->Tpl->Set('ALSBEZAHLTMARKIEREN', '<option value="bezahlt">{|als bezahlt markieren|}</option>');
|
||||
}
|
||||
*/
|
||||
$this->app->User->SetParameter('table_verbindlichkeit_list_zahlbarbis', '');
|
||||
$this->app->User->SetParameter('table_verbindlichkeit_list_skontobis', '');
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "verbindlichkeit_list.tpl");
|
||||
}
|
||||
|
||||
public function verbindlichkeit_delete() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
|
||||
$this->app->DB->Delete("UPDATE `verbindlichkeit` SET status='storniert' WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde storniert.</div>");
|
||||
|
||||
$this->verbindlichkeit_list();
|
||||
}
|
||||
|
||||
/*
|
||||
* Edit verbindlichkeit item
|
||||
* If id is empty, create a new one
|
||||
*/
|
||||
|
||||
function verbindlichkeit_edit() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
$this->app->YUI->AARLGPositionen(true); // create iframe with positionen action
|
||||
|
||||
// Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('artikel',$id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
$this->verbindlichkeit_menu($id);
|
||||
|
||||
$input = $this->GetInput();
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
|
||||
if (empty($id)) {
|
||||
// New item
|
||||
$id = 'NULL';
|
||||
$input['status'] = 'angelegt';
|
||||
}
|
||||
|
||||
if ($submit != '')
|
||||
{
|
||||
|
||||
// Write to database
|
||||
// Add checks here
|
||||
$schreibschutz = $this->app->DB->Select("SELECT schreibschutz FROM verbindlichkeit WHERE id =".$id);
|
||||
|
||||
if ($schreibschutz) {
|
||||
$internebemerkung = $input['internebemerkung'];
|
||||
$projekt = $input['projekt'];
|
||||
$kostenstelle = $input['kostenstelle'];
|
||||
unset($input);
|
||||
$input['internebemerkung'] = $internebemerkung;
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$projekt,true);
|
||||
$input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$kostenstelle."'");
|
||||
} else {
|
||||
$input['adresse'] = $this->app->erp->ReplaceLieferantennummer(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||
$input['rechnungsdatum'] = $this->app->erp->ReplaceDatum(true,$input['rechnungsdatum'],true); // Parameters: Target db?, value, from form?
|
||||
$input['eingangsdatum'] = $this->app->erp->ReplaceDatum(true,$input['eingangsdatum'],true); // Parameters: Target db?, value, from form?
|
||||
$input['skontobis'] = $this->app->erp->ReplaceDatum(true,$input['skontobis'],true); // Parameters: Target db?, value, from form?
|
||||
$input['zahlbarbis'] = $this->app->erp->ReplaceDatum(true,$input['zahlbarbis'],true); // Parameters: Target db?, value, from form?
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true);
|
||||
$input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$input['kostenstelle']."'");
|
||||
if(empty($input['projekt']) && !empty($input['adresse'])) {
|
||||
$input['projekt'] = $this->app->erp->GetCreateProjekt($input['adresse']);
|
||||
}
|
||||
}
|
||||
|
||||
$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 verbindlichkeit (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
|
||||
|
||||
// echo($sql);
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
if ($id == 'NULL') {
|
||||
$id = $this->app->DB->GetInsertID();
|
||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||
header("Location: index.php?module=verbindlichkeit&action=edit&id=$id&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load values again from database
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',v.id,'\" />') AS `auswahl`";
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS v.id, $dropnbox, v.belegnr, v.status_beleg, v.schreibschutz, v.rechnung, v.zahlbarbis, v.betrag, v.umsatzsteuer, v.ustid, v.summenormal, v.summeermaessigt, v.summesatz3, v.summesatz4, v.steuersatzname3, v.steuersatzname4, v.skonto, v.skontobis, v.skontofestsetzen, v.freigabe, v.freigabemitarbeiter, v.bestellung, v.adresse, v.projekt, v.teilprojekt, v.auftrag, v.status, v.bezahlt, v.kontoauszuege, v.firma, v.logdatei, v.bestellung1, v.bestellung1betrag, v.bestellung1bemerkung, v.bestellung1projekt, v.bestellung1kostenstelle, v.bestellung1auftrag, v.bestellung2, v.bestellung2betrag, v.bestellung2bemerkung, v.bestellung2kostenstelle, v.bestellung2auftrag, v.bestellung2projekt, v.bestellung3, v.bestellung3betrag, v.bestellung3bemerkung, v.bestellung3kostenstelle, v.bestellung3auftrag, v.bestellung3projekt, v.bestellung4, v.bestellung4betrag, v.bestellung4bemerkung, v.bestellung4kostenstelle, v.bestellung4auftrag, v.bestellung4projekt, v.bestellung5, v.bestellung5betrag, v.bestellung5bemerkung, v.bestellung5kostenstelle, v.bestellung5auftrag, v.bestellung5projekt, v.bestellung6, v.bestellung6betrag, v.bestellung6bemerkung, v.bestellung6kostenstelle, v.bestellung6auftrag, v.bestellung6projekt, v.bestellung7, v.bestellung7betrag, v.bestellung7bemerkung, v.bestellung7kostenstelle, v.bestellung7auftrag, v.bestellung7projekt, v.bestellung8, v.bestellung8betrag, v.bestellung8bemerkung, v.bestellung8kostenstelle, v.bestellung8auftrag, v.bestellung8projekt, v.bestellung9, v.bestellung9betrag, v.bestellung9bemerkung, v.bestellung9kostenstelle, v.bestellung9auftrag, v.bestellung9projekt, v.bestellung10, v.bestellung10betrag, v.bestellung10bemerkung, v.bestellung10kostenstelle, v.bestellung10auftrag, v.bestellung10projekt, v.bestellung11, v.bestellung11betrag, v.bestellung11bemerkung, v.bestellung11kostenstelle, v.bestellung11auftrag, v.bestellung11projekt, v.bestellung12, v.bestellung12betrag, v.bestellung12bemerkung, v.bestellung12projekt, v.bestellung12kostenstelle, v.bestellung12auftrag, v.bestellung13, v.bestellung13betrag, v.bestellung13bemerkung, v.bestellung13kostenstelle, v.bestellung13auftrag, v.bestellung13projekt, v.bestellung14, v.bestellung14betrag, v.bestellung14bemerkung, v.bestellung14kostenstelle, v.bestellung14auftrag, v.bestellung14projekt, v.bestellung15, v.bestellung15betrag, v.bestellung15bemerkung, v.bestellung15kostenstelle, v.bestellung15auftrag, v.bestellung15projekt, v.waehrung, v.zahlungsweise, v.eingangsdatum, v.buha_konto1, v.buha_belegfeld1, v.buha_betrag1, v.buha_konto2, v.buha_belegfeld2, v.buha_betrag2, v.buha_konto3, v.buha_belegfeld3, v.buha_betrag3, v.buha_konto4, v.buha_belegfeld4, v.buha_betrag4, v.buha_konto5, v.buha_belegfeld5, v.buha_betrag5, v.rechnungsdatum, v.rechnungsfreigabe, v.kostenstelle, v.beschreibung, v.sachkonto, v.art, v.verwendungszweck, v.dta_datei, v.frachtkosten, v.internebemerkung, v.ustnormal, v.ustermaessigt, v.uststuer3, v.uststuer4, v.betragbezahlt, v.bezahltam, v.klaerfall, v.klaergrund, v.skonto_erhalten, v.kurs, v.sprache, v.id, a.lieferantennummer, a.name AS adresse_name FROM verbindlichkeit v LEFT JOIN adresse a ON a.id = v.adresse"." WHERE v.id=$id");
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
if (!empty($result[0])) {
|
||||
$verbindlichkeit_from_db = $result[0];
|
||||
}
|
||||
|
||||
// Summarize positions
|
||||
|
||||
$sql = "SELECT * FROM verbindlichkeit_position WHERE verbindlichkeit = ".$id;
|
||||
$positionen = $this->app->DB->SelectArr($sql);
|
||||
|
||||
if (!empty($positionen)) {
|
||||
$betrag_netto = 0;
|
||||
$betrag_brutto = 0;
|
||||
$steuer_normal = 0;
|
||||
$steuer_ermaessigt = 0;
|
||||
|
||||
/*
|
||||
Normal: umsatzsteuer leer, steuersatz = leer
|
||||
Ermäßigt: umsatzsteuer ermaessigt, steuersatz = -1
|
||||
Befreit: umsatzsteuer befreit, steursatz = -1
|
||||
Individuell: umsatzsteuer leer, steuersatz = wert
|
||||
*/
|
||||
|
||||
foreach ($positionen as $position) {
|
||||
|
||||
$tmpsteuersatz = null;
|
||||
$tmpsteuertext = null;
|
||||
$erloes = null;
|
||||
|
||||
// function GetSteuerPosition($typ, $posid,&$tmpsteuersatz = null, &$tmpsteuertext = null, &$erloes = null)
|
||||
|
||||
$this->app->erp->GetSteuerPosition("verbindlichkeit",$position['id'],$tmpsteuersatz,$tmpsteuertext,$erloes);
|
||||
|
||||
$position['steuersatz_berechnet'] = $tmpsteuersatz;
|
||||
$position['steuertext_berechnet'] = $tmpsteuertext;
|
||||
$position['steuererloes_berechnet'] = $erloes;
|
||||
|
||||
$betrag_netto += ($position['menge']*$position['preis']);
|
||||
$betrag_brutto += ($position['menge']*$position['preis'])*(1+($tmpsteuersatz/100));
|
||||
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('BETRAGNETTO', $betrag_netto);
|
||||
$this->app->Tpl->Set('BETRAGBRUTTOPOS', round($betrag_brutto,2));
|
||||
|
||||
$this->app->Tpl->Set('BETRAGDISABLED', 'disabled');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 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");
|
||||
|
||||
*/
|
||||
|
||||
if ($verbindlichkeit_from_db['schreibschutz']) {
|
||||
$this->app->Tpl->Set('SAVEDISABLED','disabled');
|
||||
$this->app->Tpl->Set('MESSAGE',"<div class=\"warning\">Diese Verbindlichkeit ist schreibgeschützt und darf daher nicht mehr bearbeitet werden! <input type=\"button\" value=\"Schreibschutz entfernen\" onclick=\"if(!confirm('Soll der Schreibschutz für diese Verbindlichkeit wirklich entfernt werden?')) return false;else window.location.href='index.php?module=verbindlichkeit&action=schreibschutz&id=$id';\"></div>");
|
||||
}
|
||||
|
||||
if (empty($verbindlichkeit_from_db['adresse'] || $verbindlichkeit_from_db['status'] == 'angelegt')) {
|
||||
$this->app->Tpl->Set('FREIGABEEINKAUFHIDDEN','hidden');
|
||||
$this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden');
|
||||
$this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden');
|
||||
}
|
||||
|
||||
if ($verbindlichkeit_from_db['freigabe']) {
|
||||
$this->app->Tpl->Set('FREIGABEEINKAUFHIDDEN','hidden');
|
||||
} else {
|
||||
$this->app->Tpl->Set('RUECKSETZENEINKAUFHIDDEN','hidden');
|
||||
}
|
||||
if ($verbindlichkeit_from_db['rechnungsfreigabe']) {
|
||||
$this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden');
|
||||
} else {
|
||||
$this->app->Tpl->Set('RUECKSETZENBUCHHALTUNGHIDDEN','hidden');
|
||||
}
|
||||
if ($verbindlichkeit_from_db['bezahlt'] == '1') {
|
||||
$this->app->Tpl->Set('FREIGABEBEZAHLTHIDDEN','hidden');
|
||||
} else {
|
||||
$this->app->Tpl->Set('RUECKSETZENBEZAHLTHIDDEN','hidden');
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('WARENEINGANGCHECKED', $verbindlichkeit_from_db['freigabe']==1?"checked":"");
|
||||
$this->app->Tpl->Set('RECHNUNGSFREIGABECHECKED', $verbindlichkeit_from_db['rechnungsfreigabe']==1?"checked":"");
|
||||
$this->app->Tpl->Set('BEZAHLTCHECKED', $verbindlichkeit_from_db['bezahlt']==1?"checked":"");
|
||||
|
||||
$this->app->Tpl->Set('RECHNUNGSDATUM',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['rechnungsdatum'],false));
|
||||
$this->app->YUI->DatePicker("rechnungsdatum");
|
||||
$this->app->Tpl->Set('EINGANGSDATUM',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['eingangsdatum'],false));
|
||||
$this->app->YUI->DatePicker("eingangsdatum");
|
||||
$this->app->Tpl->Set('SKONTOBIS',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['skontobis'],false));
|
||||
$this->app->YUI->DatePicker("skontobis");
|
||||
$this->app->Tpl->Set('ZAHLBARBIS',$this->app->erp->ReplaceDatum(false,$verbindlichkeit_from_db['zahlbarbis'],false));
|
||||
$this->app->YUI->DatePicker("zahlbarbis");
|
||||
|
||||
$sql = "SELECT " . $this->app->YUI->IconsSQLVerbindlichkeit() . " AS `icons` FROM verbindlichkeit v WHERE id=$id";
|
||||
$icons = $this->app->DB->SelectArr($sql);
|
||||
$this->app->Tpl->Add('STATUSICONS', $icons[0]['icons']);
|
||||
|
||||
$this->app->YUI->AutoComplete("adresse", "lieferant");
|
||||
$this->app->YUI->AutoComplete("projekt", "projektname", 1);
|
||||
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$verbindlichkeit_from_db['projekt'],false));
|
||||
$this->app->YUI->AutoComplete("kostenstelle", "kostenstelle", 1);
|
||||
$this->app->Tpl->Set('KOSTENSTELLE',$this->app->DB->SELECT("SELECT nummer FROM kostenstellen WHERE id = '".$verbindlichkeit_from_db['kostenstelle']."'"));
|
||||
|
||||
$waehrungenselect = $this->app->erp->GetSelect($this->app->erp->GetWaehrung(), $verbindlichkeit_from_db['waehrung']);
|
||||
$this->app->Tpl->Set('WAEHRUNGSELECT', $waehrungenselect);
|
||||
|
||||
$this->app->Tpl->Set('ADRESSE_ID', $verbindlichkeit_from_db['adresse']);
|
||||
|
||||
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceLieferantennummer(false,$verbindlichkeit_from_db['adresse'],false)); // Convert ID to form display
|
||||
|
||||
$this->app->YUI->CkEditor("internebemerkung");
|
||||
|
||||
$anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id);
|
||||
if ($anzahldateien > 0) {
|
||||
$file = urlencode("../../../../index.php?module=verbindlichkeit&action=inlinepdf&id=$id");
|
||||
$iframe = "<iframe width=\"100%\" height=\"100%\" style=\"height:calc(100vh - 110px)\" src=\"./js/production/generic/web/viewer.html?file=$file\"></iframe>";
|
||||
$this->app->Tpl->Set('INLINEPDF', $iframe);
|
||||
} else {
|
||||
$this->app->Tpl->Set('INLINEPDF', 'Keine Dateien vorhanden.');
|
||||
}
|
||||
|
||||
$this->verbindlichkeit_minidetail('MINIDETAIL',false);
|
||||
$this->app->Tpl->Parse('PAGE', "verbindlichkeit_edit.tpl");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all paramters from html form and save into $input
|
||||
*/
|
||||
public function GetInput(): array {
|
||||
$input = array();
|
||||
$input['adresse'] = $this->app->Secure->GetPOST('adresse');
|
||||
$input['rechnung'] = $this->app->Secure->GetPOST('rechnung');
|
||||
$input['zahlbarbis'] = $this->app->Secure->GetPOST('zahlbarbis');
|
||||
$input['betrag'] = $this->app->Secure->GetPOST('betrag');
|
||||
$input['waehrung'] = $this->app->Secure->GetPOST('waehrung');
|
||||
$input['skonto'] = $this->app->Secure->GetPOST('skonto');
|
||||
$input['skontobis'] = $this->app->Secure->GetPOST('skontobis');
|
||||
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
|
||||
$input['bezahlt'] = $this->app->Secure->GetPOST('bezahlt')?'1':'0';;
|
||||
$input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise');
|
||||
$input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum');
|
||||
$input['rechnungsdatum'] = $this->app->Secure->GetPOST('rechnungsdatum');
|
||||
$input['freigabe'] = $this->app->Secure->GetPOST('freigabe')?'1':'0';
|
||||
$input['rechnungsfreigabe'] = $this->app->Secure->GetPOST('rechnungsfreigabe')?'1':'0';
|
||||
$input['kostenstelle'] = $this->app->Secure->GetPOST('kostenstelle');
|
||||
$input['internebemerkung'] = $this->app->Secure->GetPOST('internebemerkung');
|
||||
return $input;
|
||||
}
|
||||
|
||||
function verbindlichkeit_menu($id) {
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=edit&id=$id", "Details");
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=list", "Zurück zur Übersicht");
|
||||
|
||||
$anzahldateien = $this->app->erp->AnzahlDateien("verbindlichkeit",$id);
|
||||
if ($anzahldateien > 0) {
|
||||
$anzahldateien = " (".$anzahldateien.")";
|
||||
} else {
|
||||
$anzahldateien="";
|
||||
}
|
||||
|
||||
if ($id != 'NULL') {
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=dateien&id=$id", "Dateien".$anzahldateien);
|
||||
}
|
||||
|
||||
$invoiceArr = $this->app->DB->SelectRow("SELECT v.belegnr, a.name, v.status, schreibschutz FROM verbindlichkeit v LEFT JOIN adresse a ON v.adresse = a.id WHERE v.id='$id' LIMIT 1");
|
||||
$belegnr = $invoiceArr['belegnr'];
|
||||
$name = $invoiceArr['name'];
|
||||
if($belegnr=='0' || $belegnr=='') {
|
||||
$belegnr ='(Entwurf)';
|
||||
}
|
||||
$this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Verbindlichkeit $belegnr");
|
||||
|
||||
if ($invoiceArr['status'] === 'angelegt' || $invoiceArr['schreibschutz'] != 1) {
|
||||
$this->app->erp->MenuEintrag("index.php?module=verbindlichkeit&action=freigabe&id=$id",'Freigabe');
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_dateien()
|
||||
{
|
||||
$id = $this->app->Secure->GetGET("id");
|
||||
$this->verbindlichkeit_menu($id);
|
||||
$this->app->Tpl->Add('UEBERSCHRIFT'," (Dateien)");
|
||||
$this->app->YUI->DateiUpload('PAGE',"verbindlichkeit",$id);
|
||||
}
|
||||
|
||||
function verbindlichkeit_inlinepdf() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('%','verbindlichkeit',$id);
|
||||
|
||||
if (!empty($file_attachments)) {
|
||||
|
||||
// print_r($file_attachments);
|
||||
|
||||
// Try to merge all PDFs
|
||||
$file_paths = array();
|
||||
foreach ($file_attachments as $file_attachment) {
|
||||
if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') {
|
||||
$file_paths[] = $this->app->erp->GetDateiPfad($file_attachment);
|
||||
}
|
||||
}
|
||||
$pdfMerger = $this->app->Container->get('PdfMerger');
|
||||
$mergeOutputPath = realpath($this->app->erp->GetTMP()) . '/' . uniqid('sammelpdf_', true) . '.pdf';
|
||||
try {
|
||||
$pdfMerger->merge($file_paths, $mergeOutputPath);
|
||||
header('Content-type:application/pdf');
|
||||
header('Content-Disposition: attachment;filename='.md5(microtime(true)).'.pdf');
|
||||
readfile($mergeOutputPath);
|
||||
$this->app->ExitXentral();
|
||||
} catch (\Xentral\Components\Pdf\Exception\PdfComponentExceptionInterface $exception) {
|
||||
// Just the first PDF
|
||||
foreach ($file_attachments as $file_attachment) {
|
||||
if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') {
|
||||
$file_contents = $this->app->erp->GetDatei($file_attachment);
|
||||
header('Content-type:application/pdf');
|
||||
header('Content-Disposition: attachment;filename=verbindlichkeit_'.$id.'.pdf');
|
||||
echo($file_contents);
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
|
||||
function verbindlichkeit_positionen() {
|
||||
$this->app->YUI->AARLGPositionen(false); // Render positionen editable into iframe
|
||||
}
|
||||
|
||||
function verbindlichkeit_positioneneditpopup() {
|
||||
$cmd = $this->app->Secure->GetGET('cmd');
|
||||
if($cmd === 'getopenaccordions')
|
||||
{
|
||||
$accordions = $this->app->Secure->GetPOST('accordions');
|
||||
$accordions = explode('*|*',$accordions);
|
||||
foreach($accordions as $k => $v)
|
||||
{
|
||||
if(empty($v))
|
||||
{
|
||||
unset($accordions[$k]);
|
||||
}else{
|
||||
$accordions[$k] = 'verbindlichkeit_accordion'.$v;
|
||||
}
|
||||
}
|
||||
$ret = [];
|
||||
if(!empty($accordions))
|
||||
{
|
||||
$accordions = $this->app->User->GetParameter($accordions);
|
||||
if(!empty($accordions))
|
||||
{
|
||||
foreach($accordions as $v)
|
||||
{
|
||||
if(!empty($v['value']))
|
||||
{
|
||||
$ret['accordions'][] = str_replace('verbindlichkeit_accordion','',$v['name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode($ret);
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
if($cmd === 'setaccordion')
|
||||
{
|
||||
$name = $this->app->Secure->GetPOST('name');
|
||||
$active = $this->app->Secure->GetPOST('active');
|
||||
$this->app->User->SetParameter('verbindlichkeit_accordion'.$name, $active);
|
||||
echo json_encode(array('success'=>1));
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$fmodul = $this->app->Secure->GetGET('fmodul');
|
||||
$artikel= $this->app->DB->Select("SELECT artikel FROM verbindlichkeit_position WHERE id='$id' LIMIT 1");
|
||||
|
||||
// nach page inhalt des dialogs ausgeben
|
||||
$filename = 'widgets/widget.auftag_position_custom.php';
|
||||
if(is_file($filename))
|
||||
{
|
||||
include_once $filename;
|
||||
$widget = new WidgetVerbindlichkeit_positionCustom($this->app,'PAGE');
|
||||
} else {
|
||||
$widget = new WidgetVerbindlichkeit_position($this->app,'PAGE');
|
||||
}
|
||||
|
||||
$sid= $this->app->DB->Select("SELECT verbindlichkeit FROM verbindlichkeit_position WHERE id='$id' LIMIT 1");
|
||||
$widget->form->SpecialActionAfterExecute('close_refresh',
|
||||
"index.php?module=verbindlichkeit&action=positionen&id=$sid&fmodul=$fmodul");
|
||||
$widget->Edit();
|
||||
$this->app->BuildNavigation=false;
|
||||
}
|
||||
|
||||
function verbindlichkeit_freigabe()
|
||||
{
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$this->app->erp->BelegFreigabe('verbindlichkeit',$id);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben");
|
||||
$this->app->DB->Update("UPDATE verbindlichkeit SET schreibschutz = 1 WHERE id = ".$id);
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
|
||||
function verbindlichkeit_freigabeeinkauf($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET freigabe = 1 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Einkauf)");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_freigabebuchhaltung($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 1 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Buchhaltung)");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_freigabebezahlt($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET bezahlt = 1 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit als bezahlt markiert");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_ruecksetzeneinkauf($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET freigabe = 0 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit rückgesetzt (Einkauf)");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_ruecksetzenbuchhaltung($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 0 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit rückgesetzt (Buchhaltung)");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_ruecksetzenbezahlt($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET bezahlt = 0 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit bezahlt rückgesetzt");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
function verbindlichkeit_schreibschutz($id = null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$gotoedit = true;
|
||||
}
|
||||
$sql = "UPDATE verbindlichkeit SET schreibschutz = 0 WHERE id=".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit Schreibschutz entfernt");
|
||||
if ($gotoedit) {
|
||||
$this->verbindlichkeit_edit();
|
||||
}
|
||||
}
|
||||
|
||||
public function verbindlichkeit_minidetail($parsetarget='',$menu=true) {
|
||||
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS
|
||||
v.id,
|
||||
v.belegnr,
|
||||
v.status_beleg,
|
||||
v.schreibschutz,
|
||||
v.rechnung,
|
||||
".$this->app->erp->FormatDate('v.zahlbarbis', 'zahlbarbis').",
|
||||
v.betrag,
|
||||
v.umsatzsteuer,
|
||||
v.ustid,
|
||||
v.summenormal,
|
||||
v.summeermaessigt,
|
||||
v.summesatz3,
|
||||
v.summesatz4,
|
||||
v.steuersatzname3,
|
||||
v.steuersatzname4,
|
||||
v.skonto,
|
||||
".$this->app->erp->FormatDate('v.skontobis', 'skontobis').",
|
||||
v.skontofestsetzen,
|
||||
v.freigabe,
|
||||
v.freigabemitarbeiter,
|
||||
v.bestellung,
|
||||
p.abkuerzung AS projekt,
|
||||
v.teilprojekt,
|
||||
v.auftrag,
|
||||
v.status,
|
||||
v.bezahlt,
|
||||
v.kontoauszuege,
|
||||
v.firma,
|
||||
v.logdatei,
|
||||
v.waehrung,
|
||||
v.zahlungsweise,
|
||||
".$this->app->erp->FormatDate('v.eingangsdatum', 'eingangsdatum').",
|
||||
".$this->app->erp->FormatDate('v.rechnungsdatum', 'rechnungsdatum').",
|
||||
v.rechnungsfreigabe,
|
||||
k.nummer as kostenstelle,
|
||||
v.beschreibung,
|
||||
v.sachkonto,
|
||||
v.art,
|
||||
v.verwendungszweck,
|
||||
v.dta_datei,
|
||||
v.frachtkosten,
|
||||
v.internebemerkung,
|
||||
v.ustnormal,
|
||||
v.ustermaessigt,
|
||||
v.uststuer3,
|
||||
v.uststuer4,
|
||||
v.betragbezahlt,
|
||||
v.bezahltam,
|
||||
v.klaerfall,
|
||||
v.klaergrund,
|
||||
v.skonto_erhalten,
|
||||
v.kurs,
|
||||
v.sprache,
|
||||
v.id,
|
||||
CONCAT(a.lieferantennummer,' ',a.name) AS adresse
|
||||
FROM verbindlichkeit v
|
||||
LEFT JOIN adresse a ON a.id = v.adresse
|
||||
LEFT JOIN projekt p ON a.projekt = p.id
|
||||
LEFT JOIN kostenstellen k ON v.kostenstelle = k.id
|
||||
WHERE v.id='$id'");
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
if (!empty($result[0])) {
|
||||
$verbindlichkeit_from_db = $result[0];
|
||||
}
|
||||
|
||||
$tmp = new EasyTable($this->app);
|
||||
$tmp->Query("SELECT zeit,bearbeiter,grund FROM verbindlichkeit_protokoll WHERE verbindlichkeit='$id' ORDER by zeit DESC",0,"");
|
||||
$tmp->DisplayNew('PROTOKOLL',"Protokoll","noAction");
|
||||
|
||||
if($parsetarget=='')
|
||||
{
|
||||
$this->app->Tpl->Output('verbindlichkeit_minidetail.tpl');
|
||||
$this->app->ExitXentral();
|
||||
}
|
||||
$this->app->Tpl->Parse($parsetarget,'verbindlichkeit_minidetail.tpl');
|
||||
}
|
||||
|
||||
}
|
@ -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äß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äß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ährung|}:</td><td>[WAEHRUNG][MSGWAEHRUNG] [WAEHRUNGSBUTTON]</td></tr>
|
||||
<tr><td>{|Steuersatz|}:</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]
|
||||
|
||||
[ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ] individuellen Steuersatz verwenden
|
||||
</td></tr>
|
||||
<tr style="display:none" class="steuersatz"><td>{|Individueller Steuersatz|}:</td><td>[STEUERSATZ][MSGSTEUERSATZ] 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ährung|}:</td><td>[WAEHRUNG][MSGWAEHRUNG] [WAEHRUNGSBUTTON]</td></tr>-->
|
||||
<tr><td>{|Steuersatz|}:</td><td>[UMSATZSTEUER][MSGUMSATZSTEUER]
|
||||
[ANDERERSTEUERSATZ][MSGANDERERSTEUERSATZ] individuellen Steuersatz verwenden
|
||||
</td></tr>
|
||||
<tr style="display:none" class="steuersatz"><td>{|Individueller Steuersatz|}:</td><td>[STEUERSATZ][MSGSTEUERSATZ] 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)
|
||||
|
Loading…
Reference in New Issue
Block a user