Re: DAILY,MONTHLY AND ANNUAL REPORTS

2023-08-09 Thread ivan harold
is this thread closed? resolved?


On Saturday, July 22, 2023 at 8:08:48 AM UTC+8 Ryan Nowakowski wrote:

> Check out the Sum() aggregate:
>
> https://docs.djangoproject.com/en/4.2/topics/db/aggregation/
>
>
> On July 21, 2023 12:41:48 PM CDT, Abdou KARAMBIZI  
> wrote:
>
>> Hello Friends,
>>
>> How can I get weekly,Monthly and annual reports? from the following model.
>> I want to get the total amount paid in the week,month and year 
>>
>>
>> class Payments(models.Model):
>> id = models.AutoField(primary_key = True)
>> amount = models.IntegerField()
>> paidon = models.DateField(auto_now=True)
>>
>> def __str__ (self):
>> return self.id
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9f84c4fd-0c83-463a-a39f-ff089b233211n%40googlegroups.com.


Re: DAILY,MONTHLY AND ANNUAL REPORTS

2023-07-21 Thread Prashanth Patelc
Write a condition based on paidon date filed like filter date ,
If date is today get last 7days report and get last month report.

On Fri, Jul 21, 2023, 11:12 PM Abdou KARAMBIZI 
wrote:

> Hello Friends,
>
> How can I get weekly,Monthly and annual reports? from the following model.
> I want to get the total amount paid in the week,month and year
>
>
> class Payments(models.Model):
> id = models.AutoField(primary_key = True)
> amount = models.IntegerField()
> paidon = models.DateField(auto_now=True)
>
> def __str__ (self):
> return self.id
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABnE44wPtzkAL5YJ4uh3eRpupXUpH%3DkTJL71obTpTthorCdrTw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMCU6Co%2B8t1OZYAavf0CvhU6S9Boe2-%2B71fynpxiYWeiGDGijw%40mail.gmail.com.


DAILY,MONTHLY AND ANNUAL REPORTS

2023-07-21 Thread Abdou KARAMBIZI
Hello Friends,

How can I get weekly,Monthly and annual reports? from the following model.
I want to get the total amount paid in the week,month and year


class Payments(models.Model):
id = models.AutoField(primary_key = True)
amount = models.IntegerField()
paidon = models.DateField(auto_now=True)

def __str__ (self):
return self.id

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABnE44wPtzkAL5YJ4uh3eRpupXUpH%3DkTJL71obTpTthorCdrTw%40mail.gmail.com.