Update main.py
Browse files
main.py
CHANGED
|
@@ -384,8 +384,17 @@ def financial_statement():
|
|
| 384 |
f"{json.dumps({'transactions': txns})}\n"
|
| 385 |
f"Generate a detailed {stype} for the period from "
|
| 386 |
f"{dt_start.strftime('%d/%m/%Y')} to {dt_end.strftime('%d/%m/%Y')} "
|
| 387 |
-
f"
|
| 388 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 389 |
)
|
| 390 |
chat = client.chats.create(model="gemini-2.5-pro-exp-03-25")
|
| 391 |
resp = chat.send_message(prompt)
|
|
|
|
| 384 |
f"{json.dumps({'transactions': txns})}\n"
|
| 385 |
f"Generate a detailed {stype} for the period from "
|
| 386 |
f"{dt_start.strftime('%d/%m/%Y')} to {dt_end.strftime('%d/%m/%Y')} "
|
| 387 |
+
f"Specific Formatting and Content Requirements:"
|
| 388 |
+
f"Standard Accounting Structure (South Africa Focus): Organize the {stype} according to typical accounting practices followed in South Africa (e.g., for an Income Statement, clearly separate Revenue, Cost of Goods Sold, Gross Profit, Operating Expenses, and Net Income, in nice tables considering local terminology where applicable). If unsure of specific local variations, adhere to widely accepted international accounting structures."
|
| 389 |
+
f"Clear Headings and Subheadings: Use distinct and informative headings and subheadings in English to delineate different sections of the report. Ensure these are visually prominent."
|
| 390 |
+
f"Consistent Formatting: Maintain consistent formatting for monetary values (e.g., using 'R'for South African Rand if applicable and discernible from the data, comma separators for thousands), dates, and alignment."
|
| 391 |
+
f"Totals and Subtotals: Clearly display totals for relevant categories and subtotals where appropriate to provide a clear understanding of the financial performance or position."
|
| 392 |
+
f"Descriptive Line Items: Use clear and concise descriptions for each transaction or aggregated account based on the provided JSON data."
|
| 393 |
+
f"Key Insights: Include a brief section (e.g., 'Key Highlights' or 'Summary') that identifies significant trends, notable figures, or key performance indicators derived from the data within the statement. This should be written in plain, understandable English, potentially highlighting aspects particularly relevant to the economic context of Zimbabwe if discernible from the data."
|
| 394 |
+
f"Concise Summary: Provide a concluding summary paragraph that encapsulates the overall financial picture presented in the {stype}."
|
| 395 |
+
f"Format the report in Markdown for better visual structure.
|
| 396 |
+
f"Do not name the company if name is not there and return just the report and nothing else."
|
| 397 |
+
f"subtotals, totals, key highlights, and a concise summary."
|
| 398 |
)
|
| 399 |
chat = client.chats.create(model="gemini-2.5-pro-exp-03-25")
|
| 400 |
resp = chat.send_message(prompt)
|