fibu_buchungen improved cache refresh

This commit is contained in:
OpenXE 2023-04-03 21:17:59 +02:00
parent ad4599e381
commit 06bc38e66a
4 changed files with 66 additions and 29 deletions

View File

@ -6085,7 +6085,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
);
$width = array('1%', '1%', '10%', '10%', '10%', '25%', '5%', '1%', '1%', '1%', '1%', '1%', '1%','5%', '1%','1%', '1%');
$findcols = array('open', 'r.belegnr', 'r.belegnr', 'r.datum', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung', 'r.zahlungsweise', 'r.soll','re.belegnr', 'r.zahlungsstatus','differenz', 'r.status', 'pt.payement_status' ,'id');
$findcols = array('open', 'r.belegnr', 'r.belegnr', 'r.datum', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung', 'r.zahlungsweise', 'r.soll', 'r.zahlungsstatus','r.soll-r.ist', 're.belegnr', 'r.status', 'id');
$searchsql = array('DATE_FORMAT(r.datum,\'%d.%m.%Y\')', 'r.belegnr', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung','re.belegnr', 'r.status', "FORMAT(r.soll,2{$extended_mysql55})", 'adr.freifeld1', 'r.ihrebestellnummer','r.internebezeichnung','au.internet');
$defaultorder = 13; //Optional wenn andere Reihenfolge gewuenscht
@ -6134,16 +6134,24 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
$parameter = json_decode($parameter, true);
// SQL statement
$sql = "SELECT SQL_CALC_FOUND_ROWS r.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open, concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />')as auswahl,
$sql = "SELECT SQL_CALC_FOUND_ROWS
r.id,
'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open,
concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />')as auswahl,
r.belegnr,
DATE_FORMAT(r.datum,'%d.%m.%Y') as vom, adr.kundennummer as kundennummer,
DATE_FORMAT(r.datum,'%d.%m.%Y') as vom,
adr.kundennummer as kundennummer,
CONCAT(" . $this->app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
r.land as land,
p.abkuerzung as projekt,
r.zahlungsweise as zahlungsweise,
".$this->app->erp->FormatMenge('r.soll',2)." as soll,
r.zahlungsstatus as zahlung,
".$this->app->erp->FormatMenge('r.soll-r.ist',2)." as differenz,
re.belegnr as rechnung, UPPER(r.status) as status,
".$this->IconsSQLReturnOrder()." ,r.id
re.belegnr as rechnung,
UPPER(r.status) as status,
".$this->IconsSQLReturnOrder().",
r.id
FROM gutschrift r
LEFT JOIN rechnung re ON re.id=r.rechnungid
LEFT JOIN projekt p ON p.id=r.projekt

View File

@ -33,8 +33,31 @@
[TAB1NEXT]
</div>
<div id="tabs-2">
<form action="" enctype="multipart/form-data" method="POST">
[MESSAGE]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Einzelbuchungen|}</legend>
[TAB2]
</fieldset>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">Buchungen neu berechnen</button></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
[TAB2NEXT]
</div>
</div>

View File

@ -21,7 +21,8 @@
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr><td><input type="submit" class="btnBlue" name="ausfuehren" value="{|BUCHEN|}" /></td></tr>
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">{|Buchungen neu berechnen|}</button></td></tr>
<td><button name="submit" value="BUCHEN" class="ui-button-icon" style="width:100%;">{|BUCHEN|}</button></td></tr>
</table>
</fieldset>
</div>

View File

@ -191,12 +191,7 @@ class Fibu_buchungen {
return $erg;
}
function fibu_buchungen_list() {
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "&Uuml;bersicht");
// $this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=create", "Neu anlegen");
$submit = $this->app->Secure->GetPOST('submit');
if ($submit == 'neuberechnen') {
function fibu_rebuild_tables() {
$sql = "DROP TABLE IF EXISTS `fibu_buchungen_alle`";
$this->app->DB->Update($sql);
$sql = "DROP VIEW IF EXISTS `fibu_buchungen_alle`";
@ -212,6 +207,15 @@ class Fibu_buchungen {
$this->app->DB->Update($sql);
}
function fibu_buchungen_list() {
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "&Uuml;bersicht");
// $this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=create", "Neu anlegen");
$submit = $this->app->Secure->GetPOST('submit');
if ($submit == 'neuberechnen') {
$this->fibu_rebuild_tables();
}
// For transfer to tablesearch
$doc_typ = $this->app->Secure->GetGET('doc_typ');
$doc_id = $this->app->Secure->GetGET('doc_id');
@ -429,7 +433,7 @@ class Fibu_buchungen {
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "&Uuml;bersicht");
$submit = $this->app->Secure->GetPOST('ausfuehren');
$submit = $this->app->Secure->GetPOST('submit');
$count_success = 0;
if ($submit == 'BUCHEN') {
@ -463,6 +467,7 @@ class Fibu_buchungen {
$count_success++;
}
}
$this->fibu_rebuild_tables();
}
$msg .= "<div class=\"info\">".$count_success." Buchung".(($count_success===1)?'':'en')." durchgef&uuml;hrt.</div>";
}