mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-31 02:20:22 +02:00
Usability improvement kontoauszuege and buchungen
This commit is contained in:
parent
92f016d06b
commit
c6a4cf0d23
@ -33,7 +33,7 @@
|
|||||||
[TAB1NEXT]
|
[TAB1NEXT]
|
||||||
</div>
|
</div>
|
||||||
<div id="tabs-2">
|
<div id="tabs-2">
|
||||||
<form action="" enctype="multipart/form-data" method="POST">
|
<form action="#tabs-2" enctype="multipart/form-data" method="POST">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
|
@ -4,32 +4,34 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
<form action="" method="post">
|
[FORMHANDLEREVENT]
|
||||||
[FORMHANDLEREVENT]
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row-height">
|
||||||
<div class="row-height">
|
<div class="col-xs-12 col-md-10 col-md-height">
|
||||||
<div class="col-xs-12 col-md-10 col-md-height">
|
<div class="inside inside-full-height">
|
||||||
<div class="inside inside-full-height">
|
<fieldset>
|
||||||
<fieldset>
|
<legend>{|Offene Einzelsalden|}</legend>
|
||||||
<legend>{|Offene Einzelsalden|}</legend>
|
<form action="" method="post" id="buchungenform">
|
||||||
[TAB1]
|
[TAB1]
|
||||||
</fieldset>
|
</form>
|
||||||
</div>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
</div>
|
||||||
<div class="inside inside-full-height">
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
<fieldset>
|
<div class="inside inside-full-height">
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<fieldset>
|
||||||
<legend>{|Aktionen|}</legend>
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">{|Buchungen neu berechnen|}</button></td></tr>
|
<legend>{|Aktionen|}</legend>
|
||||||
<td><button name="submit" value="BUCHEN" class="ui-button-icon" style="width:100%;">{|BUCHEN|}</button></td></tr>
|
<form action="index.php?module=fibu_buchungen&action=list" method="post">
|
||||||
</table>
|
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">{|Buchungen neu berechnen|}</button></td></tr>
|
||||||
</fieldset>
|
</form>
|
||||||
</div>
|
<td><button name="submit" form = "buchungenform" value="BUCHEN" class="ui-button-icon" style="width:100%;">{|BUCHEN|}</button></td></tr>
|
||||||
</div>
|
</table>
|
||||||
</div>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -214,6 +214,9 @@ class Fibu_buchungen {
|
|||||||
$submit = $this->app->Secure->GetPOST('submit');
|
$submit = $this->app->Secure->GetPOST('submit');
|
||||||
if ($submit == 'neuberechnen') {
|
if ($submit == 'neuberechnen') {
|
||||||
$this->fibu_rebuild_tables();
|
$this->fibu_rebuild_tables();
|
||||||
|
|
||||||
|
$msg = "<div class=\"info\">Buchungen wurden neu berechnet.</div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For transfer to tablesearch
|
// For transfer to tablesearch
|
||||||
@ -226,6 +229,10 @@ class Fibu_buchungen {
|
|||||||
$this->app->YUI->TableSearch('TAB1', 'fibu_buchungen_salden', "show", "", "", basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB1', 'fibu_buchungen_salden', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
$this->app->YUI->TableSearch('TAB2', 'fibu_buchungen_list', "show", "", "", basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB2', 'fibu_buchungen_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
|
|
||||||
|
if (!empty($msg)) {
|
||||||
|
$this->app->Tpl->Set('MESSAGE', $msg);
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Parse('PAGE', "fibu_buchungen_list.tpl");
|
$this->app->Tpl->Parse('PAGE', "fibu_buchungen_list.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,7 +240,7 @@ class Fibu_buchungen {
|
|||||||
$id = (int) $this->app->Secure->GetGET('id');
|
$id = (int) $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
// $this->app->DB->Delete("DELETE FROM `fibu_buchungen` WHERE `id` = '{$id}'");
|
// $this->app->DB->Delete("DELETE FROM `fibu_buchungen` WHERE `id` = '{$id}'");
|
||||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
// $this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||||
|
|
||||||
$this->fibu_buchungen_list();
|
$this->fibu_buchungen_list();
|
||||||
}
|
}
|
||||||
|
@ -265,6 +265,20 @@ class Kontoauszuege {
|
|||||||
$this->app->Tpl->Parse('PAGE', "kontoauszuege_konto_list.tpl");
|
$this->app->Tpl->Parse('PAGE', "kontoauszuege_konto_list.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function kontoauszuege_mark_as_error(int $id) : ?string {
|
||||||
|
$sql = "SELECT id FROM fibu_buchungen_alle WHERE CONCAT(doc_typ,doc_id) <> CONCAT('kontoauszuege','".$id."') AND typ = 'kontoauszuege' AND id = ".$id;
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
return("Es existieren Buchungen, Eintrag wurde nicht als Importfehler markiert!");
|
||||||
|
} else {
|
||||||
|
$this->app->DB->Delete("UPDATE `kontoauszuege` SET importfehler = 1 WHERE `id` = '{$id}'");
|
||||||
|
return("Der Eintrag wurde als Importfehler markiert.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function kontoauszuege_list() {
|
function kontoauszuege_list() {
|
||||||
|
|
||||||
@ -275,15 +289,28 @@ class Kontoauszuege {
|
|||||||
foreach($auswahl as $selectedId) {
|
foreach($auswahl as $selectedId) {
|
||||||
$selectedId = (int)$selectedId;
|
$selectedId = (int)$selectedId;
|
||||||
if($selectedId > 0) {
|
if($selectedId > 0) {
|
||||||
$selectedIds[] = $selectedId;
|
$selectedIds[] = $selectedId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$submit = $this->app->Secure->GetPOST('ausfuehren');
|
$submit = $this->app->Secure->GetPOST('ausfuehren');
|
||||||
|
|
||||||
if ($submit == 'Importfehler') {
|
if ($submit == 'Importfehler') {
|
||||||
$sql = "UPDATE kontoauszuege SET importfehler = 1 WHERE id IN (".implode(",",$selectedIds).")";
|
|
||||||
$this->app->DB->Update($sql);
|
$message = "";
|
||||||
|
|
||||||
|
foreach ($selectedIds as $selectedId) {
|
||||||
|
$result = $this->kontoauszuege_mark_as_error($selectedId);
|
||||||
|
if ($result) {
|
||||||
|
$message = $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($message) {
|
||||||
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">".$message."</div>");
|
||||||
|
} else {
|
||||||
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"warning\">Einträge wurden als Importfehler markiert.</div>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,15 +336,14 @@ class Kontoauszuege {
|
|||||||
public function kontoauszuege_delete() {
|
public function kontoauszuege_delete() {
|
||||||
$id = (int) $this->app->Secure->GetGET('id');
|
$id = (int) $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
$sql = "SELECT id FROM fibu_buchungen_alle WHERE CONCAT(doc_typ,doc_id) <> CONCAT('kontoauszuege','".$id."') AND typ = 'kontoauszuege' AND id = ".$id;
|
$result = $this->kontoauszuege_mark_as_error($id);
|
||||||
$result = $this->app->DB->SelectArr($sql);
|
|
||||||
|
if ($result) {
|
||||||
if (!empty($result)) {
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">".$result."</div>");
|
||||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Es existieren Buchungen, Eintrag wurde nicht als Importfehler markiert!</div>");
|
|
||||||
} else {
|
} else {
|
||||||
$this->app->DB->Delete("UPDATE `kontoauszuege` SET importfehler = 1 WHERE `id` = '{$id}'");
|
|
||||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"warning\">Der Eintrag wurde als Importfehler markiert.</div>");
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"warning\">Der Eintrag wurde als Importfehler markiert.</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->kontoauszuege_list();
|
$this->kontoauszuege_list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user