mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-30 16:40:28 +01:00
74 lines
1.7 KiB
PHP
74 lines
1.7 KiB
PHP
|
<?php
|
||
|
include ("_gen/widget.gen.anfrage_position.php");
|
||
|
|
||
|
class WidgetAnfrage_position extends WidgetGenAnfrage_position
|
||
|
{
|
||
|
private $app;
|
||
|
function __construct($app,$parsetarget)
|
||
|
{
|
||
|
$this->app = $app;
|
||
|
$this->parsetarget = $parsetarget;
|
||
|
parent::__construct($app,$parsetarget);
|
||
|
$this->ExtendsForm();
|
||
|
}
|
||
|
|
||
|
function ExtendsForm()
|
||
|
{
|
||
|
|
||
|
$this->app->YUI->AutoComplete("einheit","artikeleinheit");
|
||
|
|
||
|
//$this->app->YUI->AutoComplete(AUTO,"artikel",array('nummer','name_de','warengruppe'),"nummer");
|
||
|
$this->app->YUI->DatePicker("lieferdatum");
|
||
|
|
||
|
if($this->app->erp->Firmendaten("briefhtml")=="1")
|
||
|
{
|
||
|
$this->app->YUI->CkEditor("beschreibung","belege");
|
||
|
$this->app->YUI->CkEditor("bemerkung","basic");
|
||
|
}
|
||
|
|
||
|
$this->form->ReplaceFunction("lieferdatum",$this,"ReplaceDatum");
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
function ReplaceDatum($db,$value,$fromform)
|
||
|
{
|
||
|
//value muss hier vom format ueberprueft werden
|
||
|
$dbformat = 0;
|
||
|
if(strpos($value,'-') > 0) $dbformat = 1;
|
||
|
|
||
|
// wenn ziel datenbank
|
||
|
if($db)
|
||
|
{
|
||
|
if($dbformat) return $value;
|
||
|
else return $this->app->String->Convert($value,"%1.%2.%3","%3-%2-%1");
|
||
|
}
|
||
|
// wenn ziel formular
|
||
|
else
|
||
|
{
|
||
|
if($dbformat) return $this->app->String->Convert($value,"%1-%2-%3","%3.%2.%1");
|
||
|
else return $value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public function Table()
|
||
|
{
|
||
|
$table = new EasyTable($this->app);
|
||
|
$table->Query("SELECT anfrage, id FROM lieferschein_position");
|
||
|
$table->Display($this->parsetarget);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
public function Search()
|
||
|
{
|
||
|
$this->app->Tpl->Set($this->parsetarget,"suchmaske");
|
||
|
//$this->app->Table(
|
||
|
//$table = new OrderTable("veranstalter");
|
||
|
//$table->Heading(array('Name','Homepage','Telefon'));
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
?>
|