mirror of
https://github.com/nanoy42/coope
synced 2024-11-25 22:22:27 +00:00
parent
693bd93b51
commit
dfec4e7b3c
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ def order(request):
|
||||||
consumption, _ = Consumption.objects.get_or_create(customer=user, product=product)
|
consumption, _ = Consumption.objects.get_or_create(customer=user, product=product)
|
||||||
consumption.quantity += quantity
|
consumption.quantity += quantity
|
||||||
consumption.save()
|
consumption.save()
|
||||||
ch = ConsumptionHistory(customer = user, quantity = quantity, paymentMethod=paymentMethod, product=product, amount=int(quantity*product.amount), coopeman=request.user)
|
ch = ConsumptionHistory(customer=user, quantity=quantity, paymentMethod=paymentMethod, product=product, amount=Decimal(quantity*product.amount), coopeman=request.user)
|
||||||
ch.save()
|
ch.save()
|
||||||
for m in menus:
|
for m in menus:
|
||||||
menu = get_object_or_404(Menu, pk=m["pk"])
|
menu = get_object_or_404(Menu, pk=m["pk"])
|
||||||
|
|
Loading…
Reference in a new issue