Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for Untitled
Smart Invoice Generator with Discount Codes
OVERVIEW: A complete Python invoice system designed for the BitBuilders Fun Code Race. This program allows users to create professional invoices by entering item names, quantities, and prices, with automatic calculations and discount code functionality.
HOW IT WORKS: The system operates through a menu-driven interface where users input item details (name, quantity, price). The program calculates line totals (quantity × price), applies optional discount codes, adds 18% GST tax, and generates a professionally formatted invoice. All invoices are stored with unique invoice numbers for easy retrieval.
CUSTOM FEATURE - DISCOUNT CODE SYSTEM: Pre-built discount codes (SAVE10, SAVE20, FIRST50, STUDENT15) that apply percentage-based discounts (10%, 20%, 50%, 15%). Codes are validated during invoice creation and automatically deducted from the subtotal before tax calculation. The applied discount is clearly shown on the invoice.
TECHNICAL IMPLEMENTATION:
- Language: Python 3
- Data Structures: Lists for items, Dictionaries for discount codes
- Features: Input validation, automatic calculations, formatted output, invoice history
- Lines of Code: 280+
CHALLENGES: Implementing proper input validation, formatting the invoice to look professional in the terminal, and calculating discounts before tax while maintaining accuracy.
WHAT I LEARNED: Improved understanding of Python dictionaries, string formatting, and modular programming through functions.