Glider
Loading...
Searching...
No Matches
src.report_generation.GenUnmatched Namespace Reference

Functions

 get_month (date)
 
 get_num_files (csv_file)
 
 generate_unmatched_csv (event)
 

Constants

 f_path = __file__
 
 index = f_path.find("report_generation/")
 
 mongo_conn = mongo_connection()
 Class to connect to mongodb.
 
 collection = mongo_conn.mongo_conn_sales()
 Mongo collection to consult sales.
 
 ROOT_DIR = os.path.expanduser('~')
 Sets the root path.
 
str path = ROOT_DIR+"/Reports/"
 Creates the folder when reports will be saved.
 

Function Documentation

◆ generate_unmatched_csv()

src.report_generation.GenUnmatched.generate_unmatched_csv ( event)
Generates the unmatched lines in compressed csv format according to sales which matches with 'accounting_date' field

Args:
    date (str): accounting_date, i.e processing files date
Returns (str): Nothing.

Definition at line 64 of file GenUnmatched.py.

Here is the call graph for this function:

◆ get_month()

src.report_generation.GenUnmatched.get_month ( date)
Generate the filename according to date in 'MonthYear' format.

Args:
    date (str): accounting date, i.e processing files date
Returns: full_date (str) 

Definition at line 31 of file GenUnmatched.py.

Here is the caller graph for this function:

◆ get_num_files()

src.report_generation.GenUnmatched.get_num_files ( csv_file)
Counts the total files which contains not matched lines

Args:
    csv_file (str): path to csv report
Returns: num_files (int) 

Definition at line 47 of file GenUnmatched.py.

Here is the caller graph for this function:

Constant Documentation

◆ collection

src.report_generation.GenUnmatched.collection = mongo_conn.mongo_conn_sales()

Mongo collection to consult sales.

Definition at line 22 of file GenUnmatched.py.

◆ f_path

src.report_generation.GenUnmatched.f_path = __file__

Definition at line 12 of file GenUnmatched.py.

◆ index

src.report_generation.GenUnmatched.index = f_path.find("report_generation/")

Definition at line 13 of file GenUnmatched.py.

◆ mongo_conn

src.report_generation.GenUnmatched.mongo_conn = mongo_connection()

Class to connect to mongodb.

Definition at line 20 of file GenUnmatched.py.

◆ path

str src.report_generation.GenUnmatched.path = ROOT_DIR+"/Reports/"

Creates the folder when reports will be saved.

Definition at line 27 of file GenUnmatched.py.

◆ ROOT_DIR

src.report_generation.GenUnmatched.ROOT_DIR = os.path.expanduser('~')

Sets the root path.

Definition at line 25 of file GenUnmatched.py.