mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
refactor: Update project settings, URL configurations, client views, and remove requirements.txt.
This commit is contained in:
@@ -89,14 +89,12 @@ def payDebt(request):
|
||||
typePayment = TypePay.objects.get(id=1)
|
||||
consumo = ProductComanda.objects.filter(comanda=comanda_id)
|
||||
value = somar(consumo,comanda)
|
||||
print(value["totalSemTaxa"])
|
||||
description = 'PAGAMENTO DE FIADO'
|
||||
pagamento = Payments(value=value["totalSemTaxa"], comanda=comanda, type_pay=typePayment,description=description,client=comanda.client)
|
||||
pagamento.save()
|
||||
except Comanda.DoesNotExist:
|
||||
return JsonResponse({'error': f'Comanda com ID {comanda_id} não encontrada'}, status=404)
|
||||
|
||||
# return redirect(f'/clients/viewClient/{comanda.client.id}')
|
||||
|
||||
return JsonResponse({
|
||||
'success': True,
|
||||
|
||||
Reference in New Issue
Block a user