MediCare POS: Pharmacy Inventory & IAS 2 Accounting Web App

A lightweight, serverless pharmacy Point of Sale (POS) and inventory management web application built on Google Apps Script and Google Sheets. It tracks base stock in pieces and bottles with automatic strip and box conversion, follows IAS 2 FIFO costing rules, and generates 80mm thermal receipts.

Overview

MediCare POS is a browser-based pharmacy management and accounting suite designed to run completely on Google Workspace without monthly server or software fees. I built this application so pharmacy owners and retail medicine stores can handle daily counter sales, batch-wise stock purchases, expiry tracking, and accurate profit reporting from a single clean dashboard.

The application opens with a fast Point of Sale screen where staff can search medicines by brand name, generic name, or manufacturer. Behind the interface, Google Sheets acts as a structured database that automatically records every sale, purchase, customer return, and stock adjustment in real time.

Main features:

  • Multi-unit retail billing supporting Pcs, Bottles, Strips, and Boxes on the same invoice with split-line items
  • True IAS 2 FIFO inventory costing that deducts oldest purchase batches first and separates retail markup from supplier trade commissions
  • Wholesale stock purchase entry with automatic unit cost breakdown and batch expiry dates
  • Expiry and batch tracker with supplier return and inventory write-off options
  • Automated HTML low-stock email alerts triggered when a medicine drops below its minimum threshold
  • 80mm thermal receipt printing with cash received and change calculation
  • Date-filtered accounting ledger with one-click CSV export for audits

The Pharmacy POS Challenge

Pharmacies deal with complex unit conversions, strict expiry dates, and supplier trade commissions that standard retail POS tools often miscalculate. Treating supplier discounts as immediate profit inflates income before items are actually sold, while selling loose tablets alongside full strips and boxes can easily create stock mismatches.

Handling multi-unit conversions. Instead of tracking strips and boxes separately, the system stores all stock in single base units (pieces or bottles) and converts strips and boxes automatically during both wholesale purchasing and counter sales.

Accurate IAS 2 profit tracking. Under International Accounting Standard 2 (IAS 2), supplier commissions reduce the net carrying cost of inventory rather than counting as upfront revenue. I programmed the FIFO engine so commission profit is recognized strictly when each batch unit is sold, and expired stock write-offs are recorded at net carrying cost.

What I Did

  • Designed the Google Sheets relational tab structure for master medicine catalog, purchase batches, sales invoices, customer records, and the general ledger
  • Built the backend logic in Google Apps Script (Code.gs) for FIFO batch allocation, invoice editing, full customer returns, and automated low-stock email notifications
  • Developed a responsive, fast-loading frontend (index.html) with local browser caching so counter operations run smoothly without lag
  • Created an 80mm thermal receipt layout and a real-time KPI dashboard displaying Retail Markup Profit, Realized Commission, Net Realized Profit, and Inventory Write-Off Loss
  • Published the open-source codebase on GitHub with a step-by-step setup guide for pharmacy operators

Want to see more of my work? Browse my digital projects or get in touch if you have a similar project in mind.

PROJECT OVERVIEW

Project type

Web Application / POS & Accounting Software

Platform/Language

Google Apps Script, HTML, CSS, JavaScript, Google Sheets

My role

Designed and built the complete web application including database architecture, IAS 2 FIFO inventory logic, multi-unit POS checkout, 80mm thermal receipt printing, and automated email alerts.