mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
generieren einer Zahlungsreferenz beim anlegen einer neuen Buchung
This commit is contained in:
@@ -77,7 +77,8 @@
|
||||
<td>'.$p->t('global/studiensemester').'</td>
|
||||
<td>'.$p->t('tools/buchungstext').'</td>
|
||||
<td>'.$p->t('tools/betrag').'</td>
|
||||
<td>'.$p->t('tools/zahlungsbestaetigung').'</td>';
|
||||
<td>'.$p->t('tools/zahlungsbestaetigung').'</td>
|
||||
<td>'.'Überweisung'.'</td>'; //TODO Phrase einfügen
|
||||
echo '</tr>';
|
||||
$i=0;
|
||||
foreach ($konto->result as $row)
|
||||
@@ -117,13 +118,21 @@
|
||||
{
|
||||
//Auszahlung
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
{
|
||||
echo '<a onclick="window.open(';
|
||||
echo "'zahlungen_details.php?buchungsnr=".$row['parent']->buchungsnr."','Zahlungsdetails','height=320,width=550,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=no,toolbar=no,location=no,menubar=no,dependent=yes');return false;";
|
||||
echo '" href="#">'.$p->t('tools/offen').'</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
echo '</td>';
|
||||
echo '<td align="center">';
|
||||
echo '<a href="https://routing.eps.or.at/appl/epsSO/transinit/bankauswahl_prepare.html?lang=de
|
||||
&caiSO=%2BaDRiYhLjZXKuB19*CkCTIMQBN6sYSHmjNPQkIglglcYeFS98ZCVrvzVdGw5tF1Fzi
|
||||
0JrGhL*WWFcSHu6PWY2FCY2BTH0umA-" target="_blank">
|
||||
<img src="../../../skin/images/eps-logo_full.gif" width="30" height="30" alt="EPS Überweisung"></a>';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
||||
+35
-2
@@ -24,6 +24,7 @@
|
||||
* @create 2007-05-14
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/'.EXT_FKT_PATH.'/generateZahlungsreferenz.inc.php');
|
||||
|
||||
class konto extends basis_db
|
||||
{
|
||||
@@ -185,11 +186,15 @@ class konto extends basis_db
|
||||
|
||||
if($new==null)
|
||||
$new = $this->new;
|
||||
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Zahlungsreferenz generieren
|
||||
//TODO Buchungscode
|
||||
//$this->zahlungsreferenz = generateZahlungsreferenz($this->person_id, $this->studiengang_kz, "CODE");
|
||||
//$this->zahlungsreferenz = "WTF";
|
||||
|
||||
//Neuen Datensatz einfuegen
|
||||
|
||||
$qry='BEGIN;INSERT INTO public.tbl_konto (person_id, studiengang_kz, studiensemester_kurzbz, buchungsnr_verweis, betrag, buchungsdatum, buchungstext, mahnspanne, buchungstyp_kurzbz, updateamum, updatevon, insertamum, insertvon, ext_id, credit_points) VALUES('.
|
||||
$this->addslashes($this->person_id).', '.
|
||||
$this->addslashes($this->studiengang_kz).', '.
|
||||
@@ -240,6 +245,14 @@ class konto extends basis_db
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->buchungsnr = $row->id;
|
||||
if(strlen($this->buchungsnr_verweis) == 0)
|
||||
{
|
||||
if(!$this->addZahlungsreferenz($this->buchungsnr))
|
||||
{
|
||||
$this->db_query("ROLLBACK;");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->db_query('COMMIT;');
|
||||
}
|
||||
else
|
||||
@@ -609,5 +622,25 @@ class konto extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function addZahlungsreferenz($buchungsnr)
|
||||
{
|
||||
$this->zahlungsreferenz = generateZahlungsreferenz($this->studiengang_kz, $buchungsnr);
|
||||
|
||||
$qry = "UPDATE public.tbl_konto "
|
||||
. "SET zahlungsreferenz='".$this->zahlungsreferenz."' "
|
||||
. "WHERE buchungsnr='".$buchungsnr."';";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim speichern der Zahlungsreferenz aufgetreten';
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2014 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Stefan Puraner <puraner@technikum-wien.at>,
|
||||
*
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../../config/cis.config.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/studiengang.class.php');
|
||||
|
||||
|
||||
function generateZahlungsreferenz($studiengang_kz, $buchungsNr)
|
||||
{
|
||||
//TODO Aufbau Zahlungsreferenz
|
||||
$studiengang = new studiengang($studiengang_kz);
|
||||
$zahlRefPrefix = strtoupper($studiengang->oe_kurzbz);
|
||||
$zahlungsreferenz = $zahlRefPrefix.$buchungsNr;
|
||||
//echo $zahlungsreferenz;
|
||||
return $zahlungsreferenz;
|
||||
|
||||
}
|
||||
//generateZahlungsreferenz(33403, 257);
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Reference in New Issue
Block a user