Merge branch 'verbindlichkeit'
This commit is contained in:
+358
-358
@@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+61
-19
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user