Corrected ECTS Summen Display in Detail View when Withdrawing

If STGL withdraws a former rejection, there is no need to substract the ECTS in "Bisher angerechnete ECTS".
This is needed only if STGL withdraws a former approvement.
This commit is contained in:
Cris
2022-07-27 16:04:53 +02:00
parent 952d5e51b2
commit bf3ed6e48e
2 changed files with 7 additions and 3 deletions
@@ -239,6 +239,7 @@ $(function(){
// Get form data
let form_data = $('form').serializeArray();
var init_status_kurzbz = $('#approveAnrechnungDetail-status_kurzbz').data('status_kurzbz');
// Prepare data object for ajax call
let data = {
@@ -264,8 +265,11 @@ $(function(){
data.retval.status_bezeichnung
);
approveAnrechnungDetail.substractEcts(ects, sumEctsSchulisch, sumEctsBeruflich);
approveAnrechnungDetail.alertIfMaxEctsExceeded();
if (init_status_kurzbz == 'approved')
{
approveAnrechnungDetail.substractEcts(ects, sumEctsSchulisch, sumEctsBeruflich);
approveAnrechnungDetail.alertIfMaxEctsExceeded();
}
FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("anrechnung", "erfolgreichZurueckgenommen"));
@@ -105,7 +105,7 @@ var format_ectsSumBisherUndNeu = function(cell, formatterParams, onRendered){
if (selectedPrestudent != undefined)
{
ectsSumBisherUndNeuTotal = (rowData.ectsSumSchulisch + rowData.ectsSumBeruflich) + selectedPrestudent.ectsSumAnzurechnendeLvsSchulisch;
ectsSumBisherUndNeuTotal = (rowData.ectsSumSchulisch + rowData.ectsSumBeruflich) + selectedPrestudent.ectsSumAnzurechnendeLvsSchulisch + selectedPrestudent.ectsSumAnzurechnendeLvsBeruflich;
ectsSumBisherUndNeuSchulisch = rowData.ectsSumSchulisch + selectedPrestudent.ectsSumAnzurechnendeLvsSchulisch;
ectsSumBisherUndNeuBeruflich = rowData.ectsSumBeruflich + selectedPrestudent.ectsSumAnzurechnendeLvsBeruflich;
}