mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-27 07:00:29 +01:00
98 lines
2.9 KiB
PHP
98 lines
2.9 KiB
PHP
|
<?php
|
||
|
include ("_gen/widget.gen.reisekosten.php");
|
||
|
|
||
|
class WidgetReisekosten extends WidgetGenreisekosten
|
||
|
{
|
||
|
private $app;
|
||
|
function __construct(&$app,$parsetarget)
|
||
|
{
|
||
|
$this->app = &$app;
|
||
|
$this->parsetarget = $parsetarget;
|
||
|
parent::__construct($app,$parsetarget);
|
||
|
$this->ExtendsForm();
|
||
|
}
|
||
|
|
||
|
function ExtendsForm()
|
||
|
{
|
||
|
$this->app->YUI->AutoComplete("adresse","kunde",1);
|
||
|
$this->app->YUI->AutoComplete("mitarbeiter","mitarbeiter");
|
||
|
$this->app->YUI->AutoComplete("projekt","projektname",1);
|
||
|
$this->app->YUI->AutoComplete("auftragid","auftrag",1);
|
||
|
|
||
|
|
||
|
$this->app->YUI->AutoSaveUserParameter('projekt','teilprojekt_filter');
|
||
|
$this->app->YUI->AutoComplete('teilprojekt','arbeitspaket');
|
||
|
|
||
|
$this->form->ReplaceFunction("teilprojekt",$this,"ReplaceArbeitspaket");
|
||
|
|
||
|
|
||
|
$this->app->YUI->DatePicker("datum");
|
||
|
$this->app->YUI->DatePicker("von");
|
||
|
$this->app->YUI->DatePicker("bis");
|
||
|
|
||
|
$this->app->YUI->TimePicker("von_zeit");
|
||
|
$this->app->YUI->TimePicker("bis_zeit");
|
||
|
|
||
|
$id = $this->app->Secure->GetGET("id");
|
||
|
$this->app->erp->RunHook('travel_cost_widget',1, $id);
|
||
|
|
||
|
$this->form->ReplaceFunction("datum",$this,"ReplaceDatum");
|
||
|
$this->form->ReplaceFunction("von",$this,"ReplaceDatum");
|
||
|
$this->form->ReplaceFunction("bis",$this,"ReplaceDatum");
|
||
|
$this->form->ReplaceFunction("projekt",$this,"ReplaceProjekt");
|
||
|
$this->form->ReplaceFunction("adresse",$this,"ReplaceKunde");
|
||
|
$this->form->ReplaceFunction("auftragid",$this,"ReplaceAuftrag");
|
||
|
$this->form->ReplaceFunction("mitarbeiter",$this,"ReplaceMitarbeiter");
|
||
|
|
||
|
|
||
|
$versandart = $this->app->erp->GetVersandartAuftrag((int)$this->app->DB->Select("SELECT projekt FROM reisekosten WHERE id = '$id' LIMIT 1"));
|
||
|
$field = new HTMLSelect("versandart",0);
|
||
|
$field->onchange="versand(this.form.versandart.options[this.form.versandart.selectedIndex].value);";
|
||
|
$field->AddOptionsSimpleArray($versandart);
|
||
|
$this->form->NewField($field);
|
||
|
|
||
|
$status = $this->app->erp->GetStatusReisekosten();
|
||
|
|
||
|
$this->app->YUI->CkEditor("internebemerkung","internal");
|
||
|
$this->app->YUI->CkEditor("freitext","belege");
|
||
|
|
||
|
$field = new HTMLInput("land","hidden","");
|
||
|
$this->form->NewField($field);
|
||
|
}
|
||
|
|
||
|
function ReplaceProjekt($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceProjekt($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
function ReplaceArbeitspaket($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceArbeitspaket($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
|
||
|
function ReplaceAuftrag($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceAuftrag($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
function ReplaceMitarbeiter($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceMitarbeiter($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function ReplaceKunde($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceKundennummer($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
function ReplaceDatum($db,$value,$fromform)
|
||
|
{
|
||
|
return $this->app->erp->ReplaceDatum($db,$value,$fromform);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
?>
|