mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Merge branch 'feature-12166/check_im_fas_ob_anzahlung_schon_gebucht_wurde'
This commit is contained in:
@@ -2272,6 +2272,21 @@ if(!$error)
|
||||
$errormsg = 'Fehlerhafte Parameteruebergabe';
|
||||
}
|
||||
}
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='checkbuchung')
|
||||
{
|
||||
$person_ids = explode(';',$_POST['person_ids']);
|
||||
$exists = false;
|
||||
if (defined('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK') && (in_array($_POST['buchungstyp_kurzbz'], unserialize(FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK))))
|
||||
{
|
||||
$konto = new konto();
|
||||
$exists = $konto->checkDoppelteBuchung($person_ids, $_POST['studiensemester_kurzbz'], $_POST['buchungstyp_kurzbz']);
|
||||
}
|
||||
|
||||
if($exists)
|
||||
$return = true;
|
||||
else
|
||||
$return = false;
|
||||
}
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='neuebuchung')
|
||||
{
|
||||
//Speichert eine neue Buchung
|
||||
|
||||
@@ -3085,6 +3085,20 @@ function StudentKontoNeuSpeichern(dialog, person_ids, studiengang_kz)
|
||||
return false;
|
||||
}
|
||||
|
||||
var tocheck = <?php echo (defined('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK') && FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK) ? 'true' : 'false' ?>;
|
||||
|
||||
var exists = false;
|
||||
|
||||
if (tocheck)
|
||||
{
|
||||
exists = StudentCheckBuchung(person_ids, studiensemester_kurzbz, buchungstyp_kurzbz, studiengang_kz);
|
||||
}
|
||||
if (exists)
|
||||
{
|
||||
if(!confirm('Die Buchung ist bereits vorhanden. Trotzdem fortfahren?'))
|
||||
return false;
|
||||
}
|
||||
|
||||
req.add('type', 'neuebuchung');
|
||||
|
||||
req.add('person_ids', person_ids);
|
||||
@@ -3116,6 +3130,28 @@ function StudentKontoNeuSpeichern(dialog, person_ids, studiengang_kz)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// ****
|
||||
// * Prüft ob die Buchung bereits vorhanden ist
|
||||
// ****
|
||||
function StudentCheckBuchung(person_ids, studiensemester_kurzbz, buchungstyp_kurzbz, studiengang_kz)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
req.add('type', 'checkbuchung');
|
||||
|
||||
req.add('person_ids', person_ids);
|
||||
req.add('studiensemester_kurzbz', studiensemester_kurzbz);
|
||||
req.add('buchungstyp_kurzbz', buchungstyp_kurzbz);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response);
|
||||
|
||||
return(val.dbdml_return);
|
||||
}
|
||||
|
||||
// *****
|
||||
// * Druckt eine Zahlungsbestaetigung aus
|
||||
|
||||
Reference in New Issue
Block a user