
    Fdf                     L    d dl mZ d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d Z
dS )    )Count)timezone)now)datetime	timedelta)	Customersc                 f   	 t          j                    }|t          d          z
  }g g g g d}t          d          D ]Y}|t          d|z            z   }|t          d          z   }t          j                            | t          j        |          t          j        |                    }|                    ddg	          	                                }|                    ddg	          	                                }	|	                                }
|d
         
                    |           |d         
                    |	           |d         
                    |
           |d         
                    |                    d                     [|S # t          $ r}Y d}~dS d}~ww xY w)znot tested yet   )days)
registeredunregisteredtotalmonths      )$batch__category__created_by__companycreated__gtecreated__lt N)password__inr   r   r   r   z%Y-%m)r   r   r   ranger   objectsfilter
make_awareexcludecountappendstrftime	Exception)companyr   
start_datemonthly_dataistart_of_monthend_of_monthmonthly_customersregistered_countunregistered_counttotal_countes               KD:\MyProjects\RESCUE_SCANNER\qr_onkar\website\company_view\reports_views.pyget_monthly_customer_datar,   	   s   lnn9&1111
	
 
 q 	L 	LA')a*@*@*@@N)I2,>,>,>>L ) 1 8 85<%0@@$/== !9 ! !  188r4j8QQWWYY!2!9!9Dz!9!R!R!X!X!Z!Z+1133K&--.>???(//0BCCC!((555")).*A*A'*J*JKKKK   rrrrrs   FF 
F0+F0N)django.db.modelsr   django.utilsr   django.utils.timezoner   r   r   accounts.modelsr   r,        r+   <module>r3      s~    " " " " " " ! ! ! ! ! ! % % % % % % ( ( ( ( ( ( ( ( % % % % % %! ! ! ! !r2   