def sho_est(request):
if not request.user.is_superuser and not request.user.is_staff and not request.user.is_university:
raise Http404
data = ''
if request.content_type == 'application/x-www-form-urlencoded' and request.method == 'POST':
user_detail = request.POST.get('user_detail', None)
if user_detail:
if request.user.is_superuser or request.user.is_staff:
credito = Credit.objects.get(pk=user_detail)
fecha_apronacion = 'Pendiente'
estado_firma = 'Pendiente'
estado_cuota = 'Pendiente'
if credito.created_at:
fecha_apronacion = credito.created_at.strftime('%Y-%m-%d')
if credito.is_iou_signed:
estado_firma = 'Firmado'
if credito.is_retainer_paid:
estado_cuota = 'Paga'
reg_amr_due = """
<tr style="border: 1px solid black; padding: 5px;">
<td style="border: 1px solid black; padding: 5px; text-align: right;">{period}</td>
<td style="border: 1px solid black; padding: 5px; text-align: right;">{due_amount}</td>
<td style="border: 1px solid black; padding: 5px; text-align: right;">{due_loan_amount}</td>
<td style="border: 1px solid black; padding: 5px; text-align: right;">
{due_tech_amount_due_surety_amount_due}</td>
<td style="border: 1px solid black; padding: 5px; text-align: right;">{due_interest_amount}</td>
<td style="border: 1px solid black; padding: 5px; text-align: right;">
{due_fines_arrears_amount_due_interest_arrears_amount}</td>
<td style="border: 1px solid black; padding: 5px; text-align: left;">{days_in_arrears}</td>
<td style="border: 1px solid black; padding: 5px; text-align: left;">{fullfilment_date}</td>
<td style="border: 1px solid black; padding: 5px; text-align: left;">{status}</td>
</tr>
"""
str_amr_due = ""
dic_ver = {}
Fuck Yeah