update KillRequestViewSet

This commit is contained in:
2026-01-19 15:45:51 +03:30
parent e3f2fc5891
commit 883da2af7e

View File

@@ -3177,7 +3177,8 @@ class KillRequestViewSet(viewsets.ModelViewSet):
recive_date = datetime.strptime(str(request.data['recive_date']), '%Y-%m-%d %H:%M:%S').date() recive_date = datetime.strptime(str(request.data['recive_date']), '%Y-%m-%d %H:%M:%S').date()
total_unpaid_wage = get_finance_info(kill_house)['total_price'] total_unpaid_wage = get_finance_info(kill_house)['total_price']
slaughter_transactions = InternalTransaction.objects.filter( slaughter_transactions = InternalTransaction.objects.filter(
kill_house=kill_house, status='completed', Q(kill_house=kill_house) | Q(parent_kill_house=kill_house),
status='completed',
trash=False) trash=False)
total_paid_wage += slaughter_transactions.aggregate(total=Sum('amount'))[ total_paid_wage += slaughter_transactions.aggregate(total=Sum('amount'))[