mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
fibu_buchungen improved cache refresh
This commit is contained in:
parent
ad4599e381
commit
06bc38e66a
@ -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,
|
||||
r.belegnr,
|
||||
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,
|
||||
".$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
|
||||
$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,
|
||||
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,
|
||||
".$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
|
||||
FROM gutschrift r
|
||||
LEFT JOIN rechnung re ON re.id=r.rechnungid
|
||||
LEFT JOIN projekt p ON p.id=r.projekt
|
||||
|
@ -33,8 +33,31 @@
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
<div id="tabs-2">
|
||||
[MESSAGE]
|
||||
[TAB2]
|
||||
<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>
|
||||
|
@ -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>
|
||||
|
@ -191,25 +191,29 @@ class Fibu_buchungen {
|
||||
return $erg;
|
||||
}
|
||||
|
||||
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`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "CREATE TABLE `fibu_buchungen_alle` AS SELECT * FROM `fibu_buchungen_alle_view`";
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
$sql = "DROP TABLE IF EXISTS `fibu_objekte`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "DROP VIEW IF EXISTS `fibu_objekte`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "CREATE TABLE `fibu_objekte` AS SELECT * FROM `fibu_objekte_view`";
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
|
||||
function fibu_buchungen_list() {
|
||||
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "Übersicht");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=create", "Neu anlegen");
|
||||
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
if ($submit == 'neuberechnen') {
|
||||
$sql = "DROP TABLE IF EXISTS `fibu_buchungen_alle`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "DROP VIEW IF EXISTS `fibu_buchungen_alle`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "CREATE TABLE `fibu_buchungen_alle` AS SELECT * FROM `fibu_buchungen_alle_view`";
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
$sql = "DROP TABLE IF EXISTS `fibu_objekte`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "DROP VIEW IF EXISTS `fibu_objekte`";
|
||||
$this->app->DB->Update($sql);
|
||||
$sql = "CREATE TABLE `fibu_objekte` AS SELECT * FROM `fibu_objekte_view`";
|
||||
$this->app->DB->Update($sql);
|
||||
$this->fibu_rebuild_tables();
|
||||
}
|
||||
|
||||
// For transfer to tablesearch
|
||||
@ -429,7 +433,7 @@ class Fibu_buchungen {
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "Übersicht");
|
||||
|
||||
$submit = $this->app->Secure->GetPOST('ausfuehren');
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
$count_success = 0;
|
||||
if ($submit == 'BUCHEN') {
|
||||
|
||||
@ -462,7 +466,8 @@ class Fibu_buchungen {
|
||||
|
||||
$count_success++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->fibu_rebuild_tables();
|
||||
}
|
||||
$msg .= "<div class=\"info\">".$count_success." Buchung".(($count_success===1)?'':'en')." durchgeführt.</div>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user