Author SHA1 Message Date
OpenXE 62f6df1aeb fibu_buchungen added error when startdate is not set 2023-04-23 17:18:51 +02:00
OpenXE 828c1b1a75 Kontoauszuege removed "new" button. 2023-04-23 16:54:52 +02:00
OpenXE 7de88ca3b5 gutschrift freigabe with our without offsettung against rechnung, with offsetting creates fibu_buchung 2023-04-21 14:59:02 +02:00
OpenXE 5794301826 fibu_buchungen db_schema changed views, removed gutschrift vs. rechnung, fibu_objekte independent from zahlungsstatus 2023-04-21 14:52:48 +02:00
OpenXE 1a28b5d75b Prerelease 1.9, added EGPL 2023-04-18 19:14:59 +02:00
OpenXE df292c9c02 db_schema.json revert changes from 95d26d5c6e database upgrade to utf8mb4
reverted change from varchar(255) to text for many columns, due to utf8mb4 problems
2023-04-18 11:54:12 +02:00
10 changed files with 4313 additions and 4275 deletions
+4256 -4253
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
$version="OSS"; $version="OSS";
$version_revision="D.1.8.1"; $version_revision="P.1.9";
$githash = file_get_contents("../githash.txt"); $githash = file_get_contents("../githash.txt");
if (!empty($githash)) { if (!empty($githash)) {
$version_revision .= " (".substr($githash,0,8).")"; $version_revision .= " (".substr($githash,0,8).")";
+12
View File
@@ -36046,6 +36046,18 @@ function Firmendaten($field,$projekt="")
return(array()); return(array());
} }
/*
* Create a fibu buchung
* using module fibu_buchungen
*/
public function fibu_buchungen_buchen(string $von_typ, int $von_id, string $nach_typ, int $nach_id, $betrag, string $waehrung, $datum, string $internebemerkung) {
$fibu_buchungen = $this->app->loadModule('fibu_buchungen', false);
if($fibu_buchungen !== null && method_exists($fibu_buchungen, 'fibu_buchungen_buchen')) {
return $fibu_buchungen->fibu_buchungen_buchen($von_typ, $von_id, $nach_typ, $nach_id, $betrag, $waehrung, $datum, $internebemerkung);
}
}
public function ANABREGSNeuberechnen($id,$art,$force=false) public function ANABREGSNeuberechnen($id,$art,$force=false)
{ {
if($id <= 0 || empty($art)) if($id <= 0 || empty($art))
@@ -5,7 +5,7 @@
<div id="tabs-1"> <div id="tabs-1">
<form action="#tabs-1" id="frmauto" name="frmauto" method="post"> <form action="#tabs-1" id="frmauto" name="frmauto" method="post">
[MESSAGE] [MESSAGE]
<legend>Salden m&uuml;ssen &uuml;ber Gegenbuchungen ausgeglichen werden.</legend> <legend>Kontoausz&uuml;ge bitte &uuml;ber Importzentrale importieren.</legend>
[TAB1] [TAB1]
</form> </form>
</div> </div>
+7 -1
View File
@@ -557,10 +557,16 @@ class Fibu_buchungen {
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "&Uuml;bersicht"); $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"); // $this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=create", "Neu anlegen");
$startdatum = $this->app->erp->Firmendaten('fibu_buchungen_startdatum');
if (empty($startdatum)) {
$msg .= '<div class="error">Startdatum <a href="index.php?module=firmendaten&action=edit#tabs-8">("Buchungen erzeugen ab Datum")</a> in den Firmendaten nicht gesetzt.</div>';
}
$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>"; $msg .= "<div class=\"info\">Buchungen wurden neu berechnet.</div>";
} }
// For transfer to tablesearch // For transfer to tablesearch
+28 -11
View File
@@ -712,17 +712,32 @@ class Gutschrift extends GenGutschrift
$showDefault = true; $showDefault = true;
$this->app->Tpl->Set('TABTEXT','Freigabe'); $this->app->Tpl->Set('TABTEXT','Freigabe');
$this->app->erp->GutschriftNeuberechnen($id); $this->app->erp->GutschriftNeuberechnen($id);
$this->app->erp->CheckVertrieb($id,'gutschrift'); $this->app->erp->CheckVertrieb($id,'gutschrift');
$this->app->erp->CheckBearbeiter($id,'gutschrift'); $this->app->erp->CheckBearbeiter($id,'gutschrift');
$doctype = 'gutschrift'; $doctype = 'gutschrift';
$sql = "SELECT belegnr, rechnungid FROM gutschrift WHERE id='$id' LIMIT 1";
$result = $this->app->DB->SelectArr($sql);
$belegnr = $result[0]['belegnr'];
$rechnungid = $result[0]['rechnungid'];
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1");
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1");
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position WHERE gutschrift='$id' LIMIT 1");
if(empty($intern)){ if(empty($intern)){
$this->app->erp->RunHook('beleg_freigabe', 4, $doctype, $id, $allowedFrm, $showDefault); $this->app->erp->RunHook('beleg_freigabe', 4, $doctype, $id, $allowedFrm, $showDefault);
} }
if($allowedFrm && $freigabe==$id) { if($allowedFrm && $freigabe==$id) {
$belegnr = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
if($belegnr=='') { if($belegnr=='') {
$this->app->erp->BelegFreigabe('gutschrift',$id); $this->app->erp->BelegFreigabe('gutschrift',$id);
// Create fibu_buchung
$gegen_rechnung = $this->app->Secure->GetGET('gegen_rechnung');
if ($gegen_rechnung && $rechnungid > 0) {
$this->app->erp->fibu_buchungen_buchen('gutschrift', $id, 'rechnung', $rechnungid, -$summe, $waehrung, date("Y-m-d"), 'Verrechnung');
}
if($intern) { if($intern) {
return 1; return 1;
} }
@@ -735,15 +750,17 @@ class Gutschrift extends GenGutschrift
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Die Gutschrift war bereits freigegeben!</div>"); $msg = $this->app->erp->base64_url_encode("<div class=\"error\">Die Gutschrift war bereits freigegeben!</div>");
$this->app->Location->execute("index.php?module=gutschrift&action=edit&id=$id&msg=$msg"); $this->app->Location->execute("index.php?module=gutschrift&action=edit&id=$id&msg=$msg");
} }
if($showDefault){ if($showDefault){
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1"); if ($rechnungid > 0) {
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1"); $input_html = "<input type=\"button\" value=\"Freigabe ohne Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=0'\">"
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position ."<input type=\"button\" value=\"Freigabe gegen Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=1'\">";
WHERE gutschrift='$id' LIMIT 1"); } else {
$input_html = "<input type=\"button\" value=\"Freigabe Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\">";
}
$this->app->Tpl->Set('TAB1', "<div class=\"info\">Soll die Gutschrift an <b>$name</b> im Wert von <b>$summe $waehrung</b> $this->app->Tpl->Set('TAB1', "<div class=\"info\">Soll die Gutschrift an <b>$name</b> im Wert von <b>$summe $waehrung</b>
jetzt freigegeben werden? <input type=\"button\" value=\"Freigabe\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\"> jetzt freigegeben werden? ".
</div>"); $input_html.
"</div>");
} }
$this->GutschriftMenu(); $this->GutschriftMenu();
$this->app->Tpl->Parse('PAGE','tabview.tpl'); $this->app->Tpl->Parse('PAGE','tabview.tpl');
+5 -5
View File
@@ -16,7 +16,7 @@ class Kontoauszuege {
$this->app->ActionHandlerInit($this); $this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list", "kontoauszuege_konto_list"); $this->app->ActionHandler("list", "kontoauszuege_konto_list");
$this->app->ActionHandler("listentries", "kontoauszuege_list"); $this->app->ActionHandler("listentries", "kontoauszuege_list");
$this->app->ActionHandler("create", "kontoauszuege_edit"); // This automatically adds a "New" button // $this->app->ActionHandler("create", "kontoauszuege_edit"); // This automatically adds a "New" button
$this->app->ActionHandler("edit", "kontoauszuege_edit"); $this->app->ActionHandler("edit", "kontoauszuege_edit");
$this->app->ActionHandler("delete", "kontoauszuege_delete"); $this->app->ActionHandler("delete", "kontoauszuege_delete");
$this->app->DefaultActionHandler("list"); $this->app->DefaultActionHandler("list");
@@ -255,7 +255,7 @@ class Kontoauszuege {
function kontoauszuege_konto_list() { function kontoauszuege_konto_list() {
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "&Uuml;bersicht"); $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen"); // $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
$this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck"); $this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck");
@@ -313,7 +313,7 @@ class Kontoauszuege {
} }
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "&Uuml;bersicht"); $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen"); // $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
$this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck"); $this->app->erp->MenuEintrag("index.php", "Zur&uuml;ck");
@@ -367,10 +367,10 @@ class Kontoauszuege {
$input = $this->GetInput(); $input = $this->GetInput();
$submit = $this->app->Secure->GetPOST('submit'); $submit = $this->app->Secure->GetPOST('submit');
if (empty($id)) { /* if (empty($id)) {
// New item // New item
$id = 'NULL'; $id = 'NULL';
} } */
if ($submit != '') if ($submit != '')
{ {
+1 -1
View File
@@ -2241,7 +2241,7 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
$this->app->Tpl->Add('TAB1',"Sie benutzen die kommerzielle Version von Xentral. Alle Rechte vorbehalten. Beachten Sie die Nutzungsbedinungen.<br><br>&copy; Copyright by Xentral ERP Software GmbH Augsburg"); $this->app->Tpl->Add('TAB1',"Sie benutzen die kommerzielle Version von Xentral. Alle Rechte vorbehalten. Beachten Sie die Nutzungsbedinungen.<br><br>&copy; Copyright by Xentral ERP Software GmbH Augsburg");
} }
else { else {
$this->app->Tpl->Add('TAB1','OpenXE is free open source software under AGPL-3.0 license, based on <a href="https://xentral.com" target="_blank">Xentral®</a> by Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.<br><br><div class="info"><img src="themes/new/images/Xentral_ERP_Logo-200.png"><br>Das Logo und der Link zur Homepage <a href="https://xentral.biz" target=\_blank\>https://xentral.biz</a> d&uuml;rfen nicht entfernt werden.</div><br>&copy; Copyright by OpenXE project & Xentral ERP Software GmbH Augsburg'); $this->app->Tpl->Add('TAB1','OpenXE is free open source software under AGPL/EGPL license, based on <a href="https://xentral.com" target="_blank">Xentral®</a> by Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.<br><br><div class="info"><img src="themes/new/images/Xentral_ERP_Logo-200.png"><br>Das Logo und der Link zur Homepage <a href="https://xentral.biz" target=\_blank\>https://xentral.biz</a> d&uuml;rfen nicht entfernt werden.</div><br>&copy; Copyright by OpenXE project & Xentral ERP Software GmbH Augsburg');
} }
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty')) if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty'))
+1 -1
View File
@@ -371,7 +371,7 @@
<div class=\"footer\"><p>Nutzen Sie unseren <a href=\"https://shop.xentral.biz/sonstige/1-jahr-zugang-updateserver-open-source-version.html?c=164?c=164\" target=\"_blank\">Update-Server</a> um auch mit der Open-Source Version mit Updates versorgt zu sein.</p></div> <div class=\"footer\"><p>Nutzen Sie unseren <a href=\"https://shop.xentral.biz/sonstige/1-jahr-zugang-updateserver-open-source-version.html?c=164?c=164\" target=\"_blank\">Update-Server</a> um auch mit der Open-Source Version mit Updates versorgt zu sein.</p></div>
--!> --!>
<div class=\"footer\"><p> <div class=\"footer\"><p>
OpenXE is free open source software under AGPL-3.0 license, based on <a href=\"https://xentral.com\" target=\"_blank\">Xentral®</a> by Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.</p></div> OpenXE is free open source software under AGPL/EGPL license, based on <a href=\"https://xentral.com\" target=\"_blank\">Xentral®</a> by Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.</p></div>
</div></body></html>"; </div></body></html>";
} }
+1 -1
View File
@@ -39,7 +39,7 @@
<div id="login-footer"> <div id="login-footer">
<div class="copyright"> <div class="copyright">
&copy; [YEAR] by OpenXE-org & Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.<br> &copy; [YEAR] by OpenXE-org & Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.<br>
OpenXE is free open source software under AGPL-3.0 license, based on <a href="https://xentral.com" target="_blank">Xentral®</a>.<br> OpenXE is free open source software under AGPL/EGPL license, based on <a href="https://xentral.com" target="_blank">Xentral®</a>.<br>
[XENTRALVERSION] [XENTRALVERSION]
</div> </div>
</div> </div>