44 lines
2.8 KiB
Python
44 lines
2.8 KiB
Python
"""Allow-listed imported CSV tables and their database columns."""
|
|
|
|
TABLES: dict[str, tuple[str, ...]] = {
|
|
"sales_projection": ("name", "headquarter", "report_date", "month", "serial_no", "product_name", "pts", "closing_qty", "closing_value", "projection_qty", "projection_value"),
|
|
"weekly_report": ("employee_name", "report_date", "headquarter", "month", "no_of_days_worked", "no_of_doctor_called", "no_of_chemist_called", "pob_booked", "secondary_sales", "pob_objective", "secondary_objective", "product_offer_scheme_booked", "product_offer_scheme_objective"),
|
|
"field_activity_report": ("name", "headquarter", "month", "report_date", "station_worked", "no_of_doctors_called", "no_of_chemists_pds_called", "doctor_call_avg", "chemist_call_avg"),
|
|
"fare_chart": ("name", "headquarter", "serial_no", "report_date", "from_location", "to_location", "kilometers_km"),
|
|
"daily_call_report_csv": ("name", "headquarter", "report_date", "month", "doctor_sr_no", "doctor_name", "qualification", "product_promote", "product_sample", "remarks", "chemist_sr_no", "chemist_name", "pob", "stockist_visit", "order_value"),
|
|
"core_dr_call_conversion": ("name", "headquarter", "month", "doctor_name", "date_of_visit", "product_targeted", "status"),
|
|
"area_covered": ("name", "headquarter", "month", "sale_status", "area_to_cover", "sale_objective", "status"),
|
|
"sales_and_stock_statement": ("name", "headquarter", "report_date", "month", "serial_no", "product_name", "opening", "receipt", "sale", "closing", "value_in_pts"),
|
|
"tour_plan": ("name", "headquarter", "serial_no", "report_date", "from_location", "to_location", "pob", "stockiest_visit"),
|
|
"standard_tour_plan": ("name", "headquarter", "serial_no", "place"),
|
|
"expense_statement": ("name", "designation", "headquarter", "month", "serial_no", "report_date", "from_location", "to_location", "fare", "da_hq", "da_ex", "da_out", "postage", "other_expense", "total", "business_achieved"),
|
|
}
|
|
|
|
#: The order the forms are listed in, on screen and in the API.
|
|
FORM_ORDER = (
|
|
"standard_tour_plan",
|
|
"tour_plan",
|
|
"fare_chart",
|
|
"sales_and_stock_statement",
|
|
"sales_projection",
|
|
"field_activity_report",
|
|
"expense_statement",
|
|
"area_covered",
|
|
"weekly_report",
|
|
"core_dr_call_conversion",
|
|
"daily_call_report_csv",
|
|
)
|
|
|
|
CSV_LABELS = {
|
|
"weekly_report": "Weekly Report",
|
|
"field_activity_report": "Field Activity Report",
|
|
"fare_chart": "Fare Chart",
|
|
"daily_call_report_csv": "Daily Call Report CSV",
|
|
"core_dr_call_conversion": "Core Doctor Call Conversion",
|
|
"area_covered": "Area Coverage",
|
|
"sales_and_stock_statement": "Sales and Stock Statement",
|
|
"tour_plan": "Tour Plan",
|
|
"standard_tour_plan": "Standard Tour Plan",
|
|
"sales_projection": "Sales Projection",
|
|
"expense_statement": "Expense Statement",
|
|
} |