DEV Community

Cover image for Fruit Sales Invoice Generator
Capin Judicael Akpado
Capin Judicael Akpado Subscriber

Posted on

Fruit Sales Invoice Generator

This is a submission for the Runner H "AI Agent Prompting" Challenge

What I Built

I built a web application that generates downloadable invoices for a fruit vendor. The vendor simply needs to enter the customer's name, the type of fruit, the quantity purchased, and the unit price. The invoice is then automatically generated, including applicable taxes and discounts based on the quantity purchased. Once the invoice is generated, it can be downloaded as a PDF.

Demo

How I Used Runner H

I ask RunnerH AI to help me for creation of my app through this prompt " You are my web developer and accounting.expert. I want to build a web application that automatically generates invoices for fruit sales. Put welcome message on dashboard when user come on app. I want to download in pdf, each invoice. The app should allow me to enter the following information manually: First Name and Last Name of the customer
• Name of the fruit purchased
• Quantity of items purchased
• Unit price of the product
Based on this data, the application should:
• Calculate the total cost
• Apply a tax rate (e.g., 10%)
• Apply a discount if a certain quantity threshold is reached (e.g., 5% discount for purchases over 10 items and 15% discount for purchases over 20 items)
• Display a formatted invoice including all of the above information
I want this app to be built using only HTML, CSS, and JavaScript. Please provide me with:

  1. The complete HTML structure for the input form and invoice display.
  2. CSS styles to make the app look clean and professional
  3. JavaScript code to handle form submission, calculations (subtotal, tax, discount, and total), and display the final invoice on the page The app should not require any external libraries or frameworks. Everything must be written in plain HTML, CSS, and JavaScript. Give me all codes for this.

". And Runner AI gives me all codes and what I should to create my app. The app works properly with all fuctions, I asked. Runner H AI is good for creation of app.

Use Case & Impact

This web application addresses a real-world need for small business owners, particularly street vendors and local fruit sellers, who often lack access to digital tools for managing sales and generating invoices. By simplifying the billing process, the solution allows them to automatically generate professional, tax-inclusive invoices with discounts based on quantity.
This benefits vendors who want to save time, avoid calculation errors, and offer clear proof of purchase to their customers. It also improves transparency and helps build trust with clients. Unlike traditional handwritten receipts, the application standardizes and speeds up the invoicing process, making it more efficient, secure, and eco-friendly thanks to its digital PDF output.

Top comments (0)