feedback pagamento de multiplas comandas

This commit is contained in:
2025-06-25 11:18:39 -03:00
parent 179342ff80
commit b73e134d9e
8 changed files with 37 additions and 26 deletions

View File

@@ -17,10 +17,10 @@ Comandas
<div style="justify-self: center;">
<h4>{{client.name}}</h4>
<h4>R$ {{client.id | totalFiado}}</h4><br>
<h4 id="total-selecionado">R$</h4>
<!-- <h4 id="total-selecionado">R$</h4> -->
<button id="btn-fechar-comandas" class="btn-fechar" onclick="enviarComandasSelecionadas()">
<span class="icon"></span>
Fechar Comandas Selecionadas
Receber
</button>
</div>

View File

@@ -96,13 +96,13 @@ def payDebt(request):
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 redirect(f'/clients/viewClient/{comanda.client.id}')
# return JsonResponse({
# 'success': True,
# 'message': f'{len(comanda_ids)} comandas processadas',
# 'ids': comanda_ids
# }, status=200)
return JsonResponse({
'success': True,
'message': f'{len(comanda_ids)} comandas processadas',
'ids': comanda_ids
}, status=200)
except Exception as e:
return JsonResponse({