04/09/2022 - 18h30

master
ChérifBALDE 2022-09-04 18:44:32 +02:00 committed by cherif
parent 5dd8f6acc9
commit a5a3005b67
1 changed files with 4 additions and 1 deletions

View File

@ -935,6 +935,8 @@ dont la date facturation est arrivée à échéance (colonne : next_invoice_date
IMPORTANT : Meme la facturation n'est pas faire le meme jours, on qu'on a un retard de X jours, ceci
n'est pas grave tant que X < 1 mois.
- le end date doit etre vide
Car à la facturation, la date prochaine facturation se mettra à date de dernière facture + 1 mois ou un 1 an.
"""
@ -950,7 +952,8 @@ def AutoamticCreateInvoice():
today = datetime.today().date()
i = 0
for diction in coll_order.find({"next_invoice_date" : { '$lte' : str(today) }},{'_id':0}):
for diction in coll_order.find({"next_invoice_date" : { '$lte' : str(today) },
'end_date': { '$exists': False }},{'_id':0}):
i = i +1
print(' Facturation de la commande '+str(diction['order_id'])+" -- "+str(diction['next_invoice_date']))