Re: Writing csv files to server

2009-04-23 Thread Florian Strzelecki
Hm... in my opinion this isn't a Django problem, but a conception problem.

I think you need a "state" on the invoices : when does it have been paid ?
If you know when, so you can filter on the date of paiement.

Exemple :

Paid (id-1, sales-1, date_paid-2009-03-02, value-$150)
Paid (id-1, sales-1, date_paid-2009-03-24, value-$100)
Paid (id-2, sales-1, date_paid-2009-04-02, value-$400)

And, in another table, you could have this :

Invoice (id-1, client-1, value-$650, is_paid-1)

At 2009-03-25 you can say : the client have paid $350, remain $400.
At 2009-04-12 you can say : the client have paid $650, remain $0

And, if you want, at 2009-05-06 say "at 2009-03-25 what was the state of
this sales ?" : you are able to give this information !

2009/4/23 Alfonso 

> Does anyone have a better suggestion and how would I start writing to
> csv on server.
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Writing csv files to server

2009-04-23 Thread Alfonso

I need to generate a statement at the end of the month that grabs all
the invoices for that month and lets the client knows who hasn't paid
on time. Problem is the usual setup I have of creating a view/template
that simply shows unpaid invoices (within a statement) doesn't stay
persistent, i.e. when one invoice is paid it disappears from the
statement and the client wants to have these statements as a sort of
permanent 'snapshot' of everything that wasn't settled at that time.

I'm at a bit of a loss to make this work but figure writing the
relevant data to csv on the server and pulling it through in a custom
django template could be a way to go.

Does anyone have a better suggestion and how would I start writing to
csv on server.

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---