{"id":28942535,"url":"https://github.com/mejez6603/printing-pos-python","last_synced_at":"2026-05-02T05:03:28.674Z","repository":{"id":300552136,"uuid":"1006430875","full_name":"Mejez6603/Printing-POS-Python","owner":"Mejez6603","description":"Portable Python Tkinter desktop app for print shop transaction management and sales reporting, storing data locally.","archived":false,"fork":false,"pushed_at":"2025-06-22T10:38:59.000Z","size":24314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T11:18:47.418Z","etag":null,"topics":["csv","excel","pos","print","printing","pycharm","python","record-management","report","standalone","transaction"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mejez6603.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T08:53:08.000Z","updated_at":"2025-06-22T10:39:02.000Z","dependencies_parsed_at":"2025-06-22T11:28:56.871Z","dependency_job_id":null,"html_url":"https://github.com/Mejez6603/Printing-POS-Python","commit_stats":null,"previous_names":["mejez6603/printing-pos-python"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/Mejez6603/Printing-POS-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mejez6603%2FPrinting-POS-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mejez6603%2FPrinting-POS-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mejez6603%2FPrinting-POS-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mejez6603%2FPrinting-POS-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mejez6603","download_url":"https://codeload.github.com/Mejez6603/Printing-POS-Python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mejez6603%2FPrinting-POS-Python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261408852,"owners_count":23154081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","excel","pos","print","printing","pycharm","python","record-management","report","standalone","transaction"],"created_at":"2025-06-23T04:01:08.675Z","updated_at":"2026-05-02T05:03:28.661Z","avatar_url":"https://github.com/Mejez6603.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Printing Shop Transaction System\n\n## Overview\n\nThis is a simple, standalone desktop application developed using Python and Tkinter for managing printing shop transactions. It allows users to record printing jobs, view a history of all transactions, and generate basic sales reports for different periods. The system is designed for ease of use and portability, storing all data in a local CSV file.\n\n![](images/GUI1.png) ![](images/GUI2.png) \n\n## Features\n\n* **Intuitive Transaction Entry:**\n    * Input fields for Paper Type (Short, Long, A4, PhotoPaper), Color (Black, Colored), Pages, Price/Page, and Total.\n    * Automatic calculation/suggestion of \"Total\" price based on Pages and Price/Page.\n    * Add multiple items to a temporary \"Items in Transaction\" list before confirming.\n    * Edit and delete individual items from the temporary list via double-click or right-click context menu.\n* **Transaction Management:**\n    * Confirm transactions to move items from the temporary list to the main \"Record\" table.\n    * Auto-generates unique Transaction IDs for each confirmed sale.\n    * Save all confirmed records to a `records.csv` file for persistence.\n    * Delete past transactions from the \"Record\" table via right-click context menu.\n* **Quick Sales Summary (Main Screen):**\n    * Displays real-time summaries for Today's Income, This Month's Income, and This Year's Income.\n* **Detailed Sales Report:**\n    * Accessible via a dedicated \"Report\" button.\n    * Allows filtering transactions by a custom date range.\n    * Provides aggregate statistics including Total Sales, Total Pages, Total Transactions, and specific page counts by Paper Type (Short, Long, A4, PhotoPaper) and Color (Black, Colored).\n    * Ability to export the displayed report data as a CSV file.\n* **Portable Design:**\n    * Can be packaged into a standalone application (using PyInstaller) that runs without needing Python installed on the user's machine.\n    * Data (`records.csv`) persists directly within the application's folder structure when distributed, making it easy to move.\n* **Customizable Window Icon \u0026 Sidebar Logo:**\n    * Supports custom application icon for the window title bar.\n    * Displays a custom logo/image in the sidebar.\n* **Reset Functionality:**\n    * A \"Reset Records\" button at the bottom-left allows clearing all saved transaction data for a fresh start (with confirmation).\n\n## Technologies Used\n\n* **Python 3.x:** The core programming language.\n* **Tkinter:** Python's standard GUI (Graphical User Interface) toolkit.\n* **Pillow (PIL Fork):** For handling and displaying images (logo, window icon).\n* **CSV Module:** For reading and writing transaction data to `records.csv`.\n* **PyInstaller:** (Used for packaging) To create standalone executable versions of the application.\n\n## Getting Started\n\n### Prerequisites\n\n* Python 3.x installed on your system.\n* `pip` (Python's package installer), usually comes with Python.\n\n### Setup (for Development)\n\n1.  **Clone the Repository:**\n    ```bash\n    git clone [https://github.com/Mejez6603/Printing-POS-Python.git](https://github.com/Mejez6603/Printing-POS-Python.git)\n    cd Printing-POS-Python\n    ```\n    (Note: Replace `Printing-POS-Python` if your repository name is different)\n\n2.  **Install Dependencies:**\n    ```bash\n    pip install Pillow\n    ```\n\n3.  **Prepare Data/Assets:**\n    * Ensure you have a `database` folder in the root directory.\n    * Inside `database`, an empty `records.csv` file will be created on first run, or you can paste provided sample data.\n    * Place your `logo.png` and `your_app_icon.png` (or whatever you named them) in the root directory alongside `main.py`.\n\n### Running the Application (Development Mode)\n\n```bash\npython main.py\n````\n\n## Usage\n\n1.  **Start a Transaction:** Fill in the item details (Paper Type, Color, Pages, Price/Page). The \"Total\" will auto-calculate.\n2.  **Add Item:** Click \"Add Item\" to add the current item to the \"Items in Transaction\" list. You can add multiple items.\n3.  **Edit/Delete Item (Before Confirming):**\n      * Double-click an item in the \"Items in Transaction\" table to populate its details back into the input fields for editing.\n      * Right-click an item in the \"Items in Transaction\" table for \"Edit Item\" or \"Delete Item\" options.\n4.  **Confirm Transaction:** Once all items for a sale are added, click \"Confirm Transaction\". This saves the items to the main \"Record\" table and `records.csv`.\n5.  **View Records:** The \"Record\" table on the main screen displays all past transactions.\n6.  **Generate Sales Reports:** Click the \"Report\" button in the sidebar to open a detailed sales report window. You can select date ranges and export.\n7.  **Reset Records:** Click the \"Reset Records\" button in the sidebar (bottom-left) to clear all saved data (requires confirmation).\n\n## Project Structure\n\n```\nPrinting-System-Python/\n├── main.py                   # Main application entry point and GUI layout\n├── transaction.py            # Handles CSV saving/loading and input validation\n├── sales_report.py           # Logic for generating sales statistics from CSV\n├── sales_report_window.py    # GUI for the detailed Sales Report window\n├── database/                 # Directory for data files\n│   └── records.csv           # Stores all transaction records\n├── reports/                  # Directory for exported CSV reports\n├── logo.png                  # Sidebar logo image\n└── your_app_icon.png         # Application window icon (rename as appropriate)\n├── .gitignore                # Specifies files/folders to ignore in Git\n└── README.md                 # This file!\n```\n\n## Packaging for Distribution (Standalone Executable)\n\nTo create a portable executable (e.g., `main.exe` on Windows) that can be run on computers without Python installed:\n\n1.  **Install PyInstaller:** `pip install pyinstaller`\n2.  **Navigate to project root:** `cd Printing-System-Python`\n3.  **Run PyInstaller command:**\n    ```bash\n    pyinstaller --noconsole --add-data \"database;database\" --add-data \"logo.png;.\" --add-data \"your_app_icon.png;.\" \"main.py\"\n    ```\n    (Remember to replace `your_app_icon.png` with your actual icon filename.)\n4.  The standalone application will be found in the `dist/main` folder. Copy this entire folder for distribution.\n\n## Future Enhancements\n\n  * **Embedded Sales Report View:** Implement the option to display the sales report directly within the main window instead of a new Toplevel window (already partially prototyped).\n  * **PDF Export for Reports:** Add functionality to export sales reports as PDF files.\n  * **Advanced Reporting:** More detailed filtering options, graphical charts, or custom report generation tools.\n  * **Product/Service Catalog:** Implement a database (e.g., SQLite) to manage predefined paper types, ink types, and pricing rules.\n  * **User Management:** Add login functionality for different staff members with roles.\n  * **Basic Inventory Tracking:** Monitor stock levels of paper and ink.\n\n## Changelog\n\n### v1.0.0 - Initial Release (2025-06-22)\n\n* **Core Functionality:**\n    * Implemented full transaction input and management.\n    * Added dynamic \"Add Item\" to temporary list.\n    * Enabled confirmation of transactions to main record table.\n    * Persistent data storage in `database/records.csv`.\n* **Reporting:**\n    * Quick sales summary on the main transaction screen.\n    * Detailed Sales Report window with date filtering.\n    * Aggregated metrics (Total Sales, Total Pages, Total Transactions).\n    * Breakdown of pages by Paper Type (Short, Long, A4, PhotoPaper) and Color (Black, Colored).\n    * Export Sales Report to CSV.\n* **User Interface \u0026 Experience:**\n    * Clean and intuitive Tkinter GUI.\n    * Automatic \"Total\" calculation in transaction input.\n    * Item editing and deletion from pending transaction list.\n    * Application window icon and sidebar logo integration.\n* **Maintenance \u0026 Portability:**\n    * Configured project for PyInstaller packaging (`--onedir` for portable folder distribution).\n    * \"Reset Records\" functionality to clear all stored data.\n    * Robust path handling for data files in packaged app.\n\n---\n## System Requirements\n\n### For Portable Standalone Application\n\n* **Operating System:** Windows 7 or newer (Windows 10/11 recommended).\n    * (Note: Linux/macOS executables can be built with appropriate GitHub Actions runners, but are not bundled in the default Windows build.)\n* **Hardware:** A modern computer with sufficient RAM (e.g., 2GB+ RAM, 1GHz+ processor) for general desktop application usage.\n* **Disk Space:** Approximately [e.g., 100MB - 300MB] for the extracted application folder, plus space for your `records.csv` data (which will grow over time).\n\n### For Development Setup (Running from Source Code)\n\n* **Operating System:** Windows, macOS, or Linux.\n* **Python:** Python 3.6 or newer (Python 3.9+ recommended).\n* **Pip:** Python's package installer.\n* **Required Python Libraries:**\n    * `Pillow`\n    * `tkinter` (usually built-in with Python)\n    * (Optionally `pyinstaller` if you plan to build executables yourself)\n\n## Troubleshooting\n\n### Common Issues and Solutions\n\n* **\"ModuleNotFoundError: No module named 'PIL'\"** (When running from source)\n    * **Reason:** The `Pillow` library is not installed.\n    * **Solution:** Open your terminal/command prompt and run `pip install Pillow`.\n* **Data not refreshing or showing zeros in Sales Reports/Quick Summary (in bundled app)**\n    * **Reason:** The application might be having trouble locating `records.csv`. This specific issue was addressed in recent updates.\n    * **Solution:** Ensure you are using the latest version of the application code. If you rebuilt with PyInstaller, ensure `sales_report.py` uses the updated pathing `base_dir = os.path.dirname(os.path.abspath(__file__))`.\n* **\"Add Item\" button is disabled.**\n    * **Reason:** Not all required input fields (Paper Type, Color, Pages, Price/Page, Total) in the transaction input section are filled.\n    * **Solution:** Fill in all the fields. The button will enable automatically.\n* **Application launches, but crashes shortly after (in bundled app).**\n    * **Reason:** This can be due to various reasons, including missing data files or environmental issues not captured during packaging.\n    * **Solution:**\n        1.  Ensure you used the `--add-data` flags correctly during PyInstaller packaging for `database`, `logo.png`, and `your_app_icon.png`.\n        2.  Try running PyInstaller without `--noconsole` first to see if any errors are printed to the console window that appears.\n* **My data disappeared after I moved the portable app folder!**\n    * **Reason:** If you moved the *extracted* application folder (e.g., `dist/main/`) to a new location, the `database/records.csv` file inside it moved along with it. If you had saved data, it should still be there.\n    * **Solution:** Ensure you're running the `main.exe` from the correct, complete portable application folder that contains your `database` subfolder with your `records.csv`.\n\n## Acknowledgments\n\n* Special thanks to the open-source community for developing Python, Tkinter, Pillow, and PyInstaller.\n* Nooby\n* Doc\n* Firelink\n* SBBC PC\n* To my dog and cat\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmejez6603%2Fprinting-pos-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmejez6603%2Fprinting-pos-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmejez6603%2Fprinting-pos-python/lists"}