Timbres mes correct
This commit is contained in:
@@ -41,9 +41,11 @@ class Clientes(models.Model):
|
||||
fecha_baja = models.DateField(blank=True,null=True)
|
||||
|
||||
@property
|
||||
def timbres_mes_count(self):
|
||||
print('date',datetime.date.today())
|
||||
return Timbres.objects.filter(rfcc=self.RFC, created_at__gte=datetime.date.today()).count()
|
||||
def timbres_mes_count(self):
|
||||
today = datetime.date.today()
|
||||
month = today.month
|
||||
year = today.year
|
||||
return Timbres.objects.filter(rfcc=self.RFC, created_at__year=str(year),created_at__month=str(month)).count()
|
||||
class Meta:
|
||||
ordering = ('RFC',)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user