mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
fixed: timezone de orders alterado para exibição utc -3
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
from django.db import models
|
||||
from django.utils.formats import date_format
|
||||
from datetime import timedelta
|
||||
|
||||
from products.models import Product
|
||||
from comandas.models import Comanda, ProductComanda
|
||||
@@ -18,6 +19,8 @@ class Order(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
status = 'Em espera'
|
||||
datetime = self.queue - timedelta(hours=3)
|
||||
|
||||
if self.preparing:
|
||||
status = 'Preparando'
|
||||
if self.finished:
|
||||
@@ -25,4 +28,4 @@ class Order(models.Model):
|
||||
if self.delivered:
|
||||
status = 'Entregue'
|
||||
|
||||
return f"{self.id_product}| {self.obs}|{status}|{self.id_comanda.name}|{self.id_comanda.mesa.name}|{date_format(self.queue, 'd/m/Y H:i')}"
|
||||
return f"{self.id_product}| {self.obs}|{status}|{self.id_comanda.name}|{self.id_comanda.mesa.name}|{date_format(datetime, 'd/m/Y H:i')}"
|
||||
Reference in New Issue
Block a user