hold issue solve

This commit is contained in:
2026-04-04 14:48:19 +05:30
parent 7981ad0206
commit 0ca1749757
3 changed files with 17 additions and 6 deletions

View File

@@ -9581,3 +9581,13 @@ Timestamp: 2026-04-04 14:09:44 | User: Unknown | Action: Search Contractor | Det
Timestamp: 2026-04-04 14:14:02 | User: Unknown | Action: Search Contractor | Details: Timestamp: 2026-04-04 14:14:02 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:14:02 | User: Unknown | Action: Search Contractor | Details: Timestamp: 2026-04-04 14:14:02 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:14:04 | User: Unknown | Action: Search Contractor | Details: Timestamp: 2026-04-04 14:14:04 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:20:27 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:20:27 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:20:29 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:27:50 | User: Unknown | Action: Edit Payment | Details:
Timestamp: 2026-04-04 14:29:42 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:29:42 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:29:44 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:35:59 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:35:59 | User: Unknown | Action: Search Contractor | Details:
Timestamp: 2026-04-04 14:36:00 | User: Unknown | Action: Search Contractor | Details:

View File

@@ -58,6 +58,8 @@ class UnifiedReportService:
payments = ReportHelper.execute_sp(cursor,'GetPayments',[contractor_id]) or [] payments = ReportHelper.execute_sp(cursor,'GetPayments',[contractor_id]) or []
print(payments)
# ================= HOLD AMOUNTS ================= # ================= HOLD AMOUNTS =================
hold_amounts = ReportHelper.execute_sp(cursor,'GetHoldAmountsByContractor',[contractor_id]) or [] hold_amounts = ReportHelper.execute_sp(cursor,'GetHoldAmountsByContractor',[contractor_id]) or []
@@ -97,7 +99,7 @@ class UnifiedReportService:
"sum_gst_final_amt": sum(r.get("Final_Amount", 0) or 0 for r in gst_rel), "sum_gst_final_amt": sum(r.get("Final_Amount", 0) or 0 for r in gst_rel),
"sum_gst_total_amt": sum(r.get("Total_Amount", 0) or 0 for r in gst_rel), "sum_gst_total_amt": sum(r.get("Total_Amount", 0) or 0 for r in gst_rel),
"sum_pay_total_amt": sum(Decimal(r.get("Total_amount") or 0) for r in payments), "sum_pay_total_amt": sum(Decimal(r.get("Total_amount") or 0) for r in payments),
"sum_pay_payment_amt": sum(Decimal(r.get("Total_amount") or 0) for r in payments), # same as above if you want "sum_pay_payment_amt": sum(Decimal(r.get("Payment_Amount") or 0) for r in payments), # same as above if you want
"sum_pay_tds_payment_amt": sum(Decimal(r.get("TDS_Payment_Amount") or 0) for r in payments), "sum_pay_tds_payment_amt": sum(Decimal(r.get("TDS_Payment_Amount") or 0) for r in payments),
} }

View File

@@ -178,9 +178,9 @@
<th>{{ total.get('sum_invo_on_commission', 0) }}</th> <th>{{ total.get('sum_invo_on_commission', 0) }}</th>
<th>{{ total.get('sum_invo_hydro_test', 0) }}</th> <th>{{ total.get('sum_invo_hydro_test', 0) }}</th>
{% for ht in hold_types %} {% if hold_types %}
<th>{{ total.sum_invo_hold_amt}}</th> <th colspan="{{hold_types|length }}">{{ total.sum_invo_hold_amt}}</th>
{% endfor %} {% endif %}
<th>{{ total.get('sum_invo_gst_sd_amt', 0) }}</th> <th>{{ total.get('sum_invo_gst_sd_amt', 0) }}</th>
<th>{{ total.sum_invo_final_amt }}</th> <th>{{ total.sum_invo_final_amt }}</th>
@@ -326,8 +326,7 @@
<tr> <tr>
<th colspan="2">Total</th> <th colspan="2">Total</th>
<!-- <th>{{total["sum_pay_payment_amt "]}}</th> --> <th>{{total["sum_pay_payment_amt"]}}</th>
<th>0.00</th>
<th>{{total["sum_pay_tds_payment_amt"]}}</th> <th>{{total["sum_pay_tds_payment_amt"]}}</th>
<th>{{total["sum_pay_total_amt"]}}</th> <th>{{total["sum_pay_total_amt"]}}</th>
<th></th> <th></th>