
<link href='https://fonts.googleapis.com/css2?family=Times New Roman:ital,wght@0,400;0,700;1,400;1,700&display=swap' rel='stylesheet'>
<style id="print-style">
    .p-5{
        padding: 5mm;
    }
    .primary-table table,.secondary-table table{
        border-collapse: collapse !important;
        page-break-inside: auto;
    }
    .primary-table th{
        text-align:center;
        background: none !important;
        height: 5mm  !important;
        border:1px solid #000 !important;
        padding: 0 2mm !important;
    }
    .primary-table td{
        padding: 2mm;
        line-height:15px !important;
        height:6mm !important;
        border:1px solid #000;
        text-align:center;
        vertical-align:middle !important;
    }
    @media screen{
        .page-a4{
            width: 21cm !important;
            padding-left:1cm !important;
            margin: auto;
        }
    }
    .page-a4{
        width: 100%; 
        border: none; 
        page-break-before: always;
        position: relative;
        min-height:27.5cm;
    }
    .border-0{
        border:none !important;
    }
    .bold {
        font-weight: 700 !important;
    }
    .text-center{
        text-align:center;
    }
    .text-left{
        text-align:left !important;
    }
    .text-right{
        text-align:right !important;
    }
    .college-head{
        text-align: left !important;
        font-weight: bold !important;
        font-size: 17pt !important;
        line-height: 25px !important;
        font-family: 'Museo Sans 300' !important;
    }
    .college-name{
        text-align: left !important;
        font-size: 13pt !important;
        line-height: 19px !important;
        font-family: 'Trebuchet MS' !important;
    }
    .college-name-container{
        height: 100%;
        padding: 2mm 0mm;
        margin-left: 2mm;
        float: right;
    }
    .secondary-table td{
        padding: 2mm;
        line-height:15px !important;
        height:6mm !important;
        border:none;
        text-align:center;
        vertical-align:middle !important;
    }
    @font-face {
        font-family: 'Trebuchet MS';
        src: url('Trebuchet MS.otf');
    }

    .student-details td{
        font-size:17px!important; 
        line-height:20px !important;
    }
    .student-details th{
        font-size:17px!important; 
    }
    .b-0 {
        border: 0px none;
    }
    .removeTdBorder 
    {
        border-top: 0px none;
        border-bottom: 0px none;
    }
    .subject-details td{
        vertical-align:top !important;
        padding: 2px 2px !important;
        font-size:15px !important;
        line-height: normal;
    }
    * {
        font-family: "Times New Roman", Times, serif;
    }
    .subject-details th{
        text-align:center;
        font-size:14px !important;
    }
    .pageFooter {
        position: absolute;
        bottom: 0;
        width: 100%;
        text-align:center !important;
    }
</style>
{% for student in data.studentData %}
    <div class="page" style="border:none;">
        {% for index,semMark in student.academicTerms %}
            {% if semMark.termId == student.finalSem %}
                <div class="page-a4">
                    <div style='width: 100%; height:15mm; float:left; margin: 0;'>
                        {% if student.courseCompleteWithinYear != 1 and student.failedStatus != 'FAILED' %}
                            <div style='font-size:17px;margin-top:20px;float:left; width:50%; font-weight:bold'><span style='border: 1px solid #000;padding: 0 10px;'>CONSOLIDATED MARK LIST</span>
                            </div>
                            <span style='font-size:17px;margin-top:20px; float:right;  font-weight:bold;padding: 0 10px;
                            border: 1px solid #000;'>Period of Study: {{student.yearOfStudy}}</span>
                        {% endif %}
                    </div>
                    <div style='text-align:center; font-size:32px !important; font-weight:bold; width: 100%; float:left;margin-bottom: 10px;margin-top:150px'>
                           MEMORANDUM
                    </div>
                    <div style='text-align:left; font-size:20px !important; padding-top: 20px; width: 80%; float:left;     margin-bottom: 10px; '>
                        The following marks were awarded to Shri/Smt <b style='text-transform:uppercase;'> {{student.name}} </b></br>
                        candidate with Register No. <b>{{student.regNo}}</b> at the <b>{{student.marksCardExamRegName}} </b>
                    </div>
                    <div style='text-align:right; font-size:18px !important; width: 20%; float:right;     margin-bottom: 10px; '>
                        <div style='width:110px; text-align: center; float:right; font-size:17px; margin:-10mm 0 0 0;'>{{data.additionalInfo.currentDate}}</div>
                        <img src='{{student.myImage}}' alt='Student Image' style='float:right; margin:0 4mm 0 0;width:3.3cm; height:3.8cm'>
                    </div>
                    <table class='subject-details' border='1' cellspacing='0' style='margin-bottom:5px; margin-top:15px; border-collapse: collapse !important;width:100%'>
                        <tr style='height: 4mm !important;'>
                            <th rowspan='3' width='12%' style='text-align:center;padding: 10px;line-height:18px;' class='syllabusCode1'>Course Code</th>
                            <th rowspan='3' width='40%' style='text-align:center;'>Course Title</th>
                            <th width='18%' colspan='9' style='text-align:center;line-height:18px;'>Marks</th>
                        </tr>
                        <tr style='height: 4mm !important;'>
                            <th width='6%' colspan='3' class="text-center">
                                External
                            </th>
                            <th width='6%' colspan='3' class="text-center">
                                Internal
                            </th>
                            <th width='6%' colspan='3' class="text-center">
                                Total
                            </th>
                        </tr>
                        <tr style='height: 21mm !important;'>
                            <th width='3%'>
                                Awarded
                            </th>
                            <th width='3%'>
                               Minimum for Pass
                            </th>
                            <th width='3%'>
                                Maximum
                            </th>
                            <th width='3%'>
                                Awarded
                            </th>
                            <th width='3%'>
                               Minimum for Pass
                            </th>
                            <th width='3%'>
                                Maximum
                            </th>
                            <th width='3%'>
                                Awarded
                            </th>
                            <th width='3%'>
                               Minimum for Pass
                            </th>
                            <th width='3%'>
                                Maximum
                            </th>
                        </tr>
                        {% for subjectCategoryWiseMarkDataObj in semMark.subjectCategoryWiseMarkData %}
                            {% if subjectCategoryWiseMarkDataObj.isSubjectCategory %}
                                {% if subjectCategoryWiseMarkDataObj.canShowCategoryHead or data.additionalInfo.courseType == 'UG' %}
                                    <tr style='height: 6mm;line-height: 15px;'>
                                        <td class = 'removeTdBorder'>&nbsp;</td>
                                        <td class = 'removeTdBorder' style='text-align:left; font-weight:bold'>{{subjectCategoryWiseMarkDataObj.name}}</td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td> 
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        <td class = 'removeTdBorder'></td>
                                        {# <td class = 'removeTdBorder'></td> #}
                                        <td class = 'removeTdBorder'></td>	
                                    </tr>
                                {% endif%}
                            {% endif%}
                            {% for subjectId in subjectCategoryWiseMarkDataObj.subjectIds %}
                                {% for subject in semMark.subjects %}
                                    {% if subject.paperSubjetId ==  subjectId %}
                                        <tr class = "subject-details">
                                            <td class = 'removeTdBorder'> {{subject.code|raw}}</td>
                                            <td class = 'removeTdBorder' class="text-left"> {{subject.name|raw}}</td>
                                            <td class = 'removeTdBorder text-center'> 
                                                {% if subject.markDetails.attendanceStatus == 'PRESENT' %}
                                                {{subject.markDetails.isExternal ? subject.markDetails.externalMark : '--'}}
                                                {% else %}
                                                    {% if subject.markDetails.attendanceStatus == 'ABSENT' %}
                                                    AB
                                                    {% elseif subject.markDetails.attendanceStatus == 'MAL' %}
                                                    MAL
                                                    {% else %}
                                                    --
                                                    {% endif %}
                                                {% endif %}
                                            </td>
                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.isExternal ? subject.externalMinimum : '--'}}</td>
                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.isExternal ? subject.markDetails.externalMaxMark : '--'}}</td>

                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.isInternal ? subject.markDetails.internalMark : '--'}}</td>
                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.isInternal ? subject.internalMinimum : '--'}}</td>
                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.isInternal ? subject.markDetails.internalMaxMark : '--'}}</td>


                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.markObtained}}</td>
                                            <td class = 'removeTdBorder text-center'> {{subject.totalMinimum}}</td>
                                            <td class = 'removeTdBorder text-center'> {{subject.markDetails.totalMarks}}</td>

                                        </tr>
                                    {% endif%}
                                {% endfor %}
                            {% endfor %}
                        {% endfor %}
                        <tr style='height: 7mm;line-height: 15px;'>
                            <th class = 'removeTdBorder'>&nbsp;</th>
                            <th class = 'removeTdBorder' style='text-align:left; font-weight:bold; padding:0 2mm; text-transform:uppercase;'>TOTAL:</th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th> 
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th> 
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                        </tr>
                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder' style='text-align:left; font-weight:bold; text-transform:uppercase;'>
                                {{semMark.failedStatus != 'FAILED' ? semMark.totalMarkInWords : '-'}}: 
                            </td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder bold text-center'>{{semMark.markDetails.markObtained}}</td>
                            <td class = 'removeTdBorder bold text-center'> {{semMark.totalMarkMinimum}} </td>
                            <td class = 'removeTdBorder bold text-center'> {{semMark.markDetails.totalMarks}} </td>
                        </tr>
                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                        </tr>
                        {% for index,semDetails in  student.academicTerms %}
                            <tr style='height: 7mm;line-height: 15px;'>
                                <td class = 'removeTdBorder'>&nbsp;</td>
                                <td class = 'removeTdBorder'>	Total for Semester {{semDetails.semInRoman}} ({{semDetails.lastExamYearMonth}})</td>
                                <td class = 'removeTdBorder'></td>
                                <td class = 'removeTdBorder'></td>
                                <td class = 'removeTdBorder'></td> 
                                <td class = 'removeTdBorder'></td>
                                <td class = 'removeTdBorder'></td>
                                <td class = 'removeTdBorder'></td>
                                 <td class = 'removeTdBorder bold text-center'>{{semDetails.markDetails.markObtained}}</td>
                                <td class = 'removeTdBorder bold text-center'> {{semDetails.totalMarkMinimum}} </td>
                                <td class = 'removeTdBorder bold text-center'> {{semDetails.markDetails.totalMarks}} </td>
                            </tr>
                        {% endfor %}

                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                        </tr>

                        <tr style='height: 7mm;line-height: 15px;'>
                            <th class = 'removeTdBorder'>&nbsp;</th>
                            <th class = 'removeTdBorder' style='text-align:left; font-weight:bold; padding:0 2mm; text-transform:uppercase;'>GRAND TOTAL :</th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th> 
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th> 
                            <th class = 'removeTdBorder text-center'></th>
                            <th class = 'removeTdBorder text-center'></th>
                        </tr>
                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder' style='text-align:left; font-weight:bold; text-transform:uppercase;'>
                                {{student.failedStatus != 'FAILED' ? student.totalMarkInWords : '-'}}: 
                            </td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder bold text-center'>{{student.markDetails.markObtained}}</td>
                            <td class = 'removeTdBorder bold text-center'> {{student.marksNeededToPassOverall}} </td>
                            <td class = 'removeTdBorder bold text-center'> {{student.markDetails.totalMarks}} </td>
                        </tr>
                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                        </tr>
                        <tr style='height: 7mm;line-height: 15px;'>
                            <td class = 'removeTdBorder'>&nbsp;</td>
                            <td class = 'removeTdBorder text-center'> -------End of Statement------- </td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td> 
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                            <td class = 'removeTdBorder'></td>
                        </tr>
                        <tr style='height: 10mm;line-height: 15px;'>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'>&nbsp;</td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td> 
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                            <td class = 'removeTdBorder' style='border-bottom:1px solid #000;'></td>
                        </tr>
                    </table>
                </div>
            {% endif %}
        {% endfor %}
    </div> 
{% endfor %}