mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-12 06:41:14 +01:00
bugfix kostenstellen
This commit is contained in:
parent
5d6d5a5de1
commit
973aa45311
@ -17,14 +17,14 @@
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|<!--Legend for this form area goes here>-->kostenstellen|}
|
||||
<legend>{|<!--Legend for this form area goes here>-->Kostenstellen|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Nummer|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="nummer" id="nummer" value="[NUMMER]" size="20">
|
||||
<input type="text" name="nummer" id="nummer" value="[NUMMER]" required size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -32,7 +32,7 @@
|
||||
{|Beschreibung|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" size="20">
|
||||
<input type="text" name="beschreibung" id="beschreibung" value="[BESCHREIBUNG]" required size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -36,7 +36,7 @@ class Kostenstellen {
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array('k.id','k.id','k.nummer', 'k.beschreibung', 'k.internebemerkung');
|
||||
$findcols = array('k.id','k.id','k.nummer', 'k.beschreibung', 'k.internebemerkung'); // use 'null' for non-searchable columns
|
||||
$searchsql = array('k.nummer', 'k.beschreibung', 'k.internebemerkung');
|
||||
|
||||
$defaultorder = 1;
|
||||
@ -60,6 +60,8 @@ class Kostenstellen {
|
||||
$count = "SELECT count(DISTINCT id) FROM kostenstellen WHERE $where";
|
||||
// $groupby = "";
|
||||
|
||||
// echo($sql." WHERE ".$where." ".$groupby);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -85,10 +87,8 @@ class Kostenstellen {
|
||||
|
||||
public function kostenstellen_delete() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
|
||||
$this->app->DB->Delete("DELETE FROM `kostenstellen` WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||
|
||||
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gelöscht');
|
||||
$this->kostenstellen_list();
|
||||
}
|
||||
|
||||
@ -100,11 +100,11 @@ class Kostenstellen {
|
||||
function kostenstellen_edit() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
// Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('artikel',$id))
|
||||
/* // Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('kostenstellen',$id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
} */
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
@ -112,6 +112,10 @@ class Kostenstellen {
|
||||
$this->app->erp->MenuEintrag("index.php?module=kostenstellen&action=list", "Zurück zur Übersicht");
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$input = $this->GetInput();
|
||||
|
||||
// Convert here
|
||||
// $input['prio'] = !empty($this->app->Secure->GetPOST('prio'))?"1":"0";
|
||||
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
|
||||
if (empty($id)) {
|
||||
@ -156,12 +160,14 @@ class Kostenstellen {
|
||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||
header("Location: index.php?module=kostenstellen&action=list&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich übernommen.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load values again from database
|
||||
if ($id != 'NULL') {
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',k.id,'\" />') AS `auswahl`";
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS k.id, $dropnbox, k.nummer, k.beschreibung, k.internebemerkung, k.id FROM kostenstellen k"." WHERE id=$id");
|
||||
|
||||
@ -174,6 +180,7 @@ class Kostenstellen {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add displayed items later
|
||||
@ -184,6 +191,8 @@ class Kostenstellen {
|
||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||
|
||||
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
|
||||
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$kostenstellen_from_db['projekt'],false));
|
||||
$this->app->Tpl->Set('PRIO', $kostenstellen_from_db['prio']==1?"checked":"");
|
||||
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user