mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: acossiar comandas fiados a conta client
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django.shortcuts import render, redirect
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from comandas.models import Comanda
|
||||
from gestaoRaul.decorators import group_required
|
||||
from clients.models import Client
|
||||
|
||||
@@ -11,6 +12,13 @@ def clients(request):
|
||||
clients = Client.objects.all()
|
||||
return render(request, 'clients.html', {'clients': clients})
|
||||
|
||||
def viewClient(request,clientId):
|
||||
id = int(clientId)
|
||||
print(id)
|
||||
client = Client.objects.get(id=id)
|
||||
comandas = Comanda.objects.filter(client = client).filter(status = 'FIADO')
|
||||
return render(request, 'viewclient.html', {'client': client, 'comandas': comandas})
|
||||
|
||||
|
||||
@group_required(groupName='Gerente')
|
||||
def createClient(request):
|
||||
|
||||
Reference in New Issue
Block a user