Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,159,047 members, 7,838,647 topics. Date: Friday, 24 May 2024 at 07:10 AM

Projectova's Posts

Nairaland Forum / Projectova's Profile / Projectova's Posts

(1) (of 1 pages)

Programming / Re: How To Code This Logic With Php... by Projectova: 11:42am On Jul 26, 2018
Aliks:
I'm trying to code a software for a pharmacy that will allow them to manage their sales, purchases and stock.

For every stock they purchase; they'll be able to add 'item name', indicate quantity by description e.g. 'sachet, packet or carton' of drugs with a dropdown, and indicate quantity in units of '1, 2, 3 etc'. Eg. a purchase of item 'panadol', '3(units)' of 'cartons' and /or item 'paracetamol', '5(units)' of 'packets'.

Now, I'm trying to convert dynamically the relationship between the qualities sachet, packet, carton and possibly other quantities they'll enter in the qualities table...

So that in the end, when they make sales of 5 packets of panadol a day, the system will automatically calculate the balance stock from 3 cartons based on the quantity relationship between sachets, packets and cartons...
The best SOLUTION to this problem is to convert all units of measurements to the smallest unit of measurement.

Let me tell you WHY first, then HOW thereafter.

WHY?
1. Customers buy in varying units: Someone may buy in retail, while another may buy in bulk. Customer A wants a dose (2 caplets) while customer B needs a sachet (10 caplets). And there could even be Customer C who needs A packet (5 sachets), and Customer D might even need a whole carton (many packets).

2. Keep It Simple: Your client wants to easily look through his reports (sales/purchases) and easily understand what transpired without the need for needless conversions. Also, the software will thank you for this. But most importantly, all the job of how many is done once, during entry, and not anytime reports are polled from the database.

SUGGESTION: Batching your entries (sales/purchase) is necessary should you want to integrate in-built automatic unit converter (sachet-to-tablet, carton-tablets, etc) in the app. This is so because from my knowledge, packaging quantities are likely going to change. In fact trying to build your converter for this will be tantamount to creating a KBS, an expert sub-system in your app.

HOW?
Advise your client to enter all drugs quantities in the smallest measurement units (capsule/caplet/tablet/bottle/jar) and not in bulk units. In Computer Science, things are preferrably stored in elementary rather than as grouped items. And especially for Database Normalization.

So, you design should be such that:

Purchases input include:
Purchase Quantity: (in bulk: sachets/cartons/rolls etc)
Purchase Price:
Units Per Purchase Quantity: (How many tablets/bottle in a sachet/carton/roll)
Unit Quantity (in units: capsule/caplet/tablet/bottle/jar)
Unit Price: (price of 1 capsule/caplet/tablet/bottle/jar)
Batch No.: this is ONLY necessary should there be a change in packaging composition.

Sales input include:
Sales Quantity: (in units: capsule/caplet/tablet/bottle/jar)
Other nominal inputs are either fetched from the DB or derived from a function of computation thereof.

I hope this is as helpful as you anticipated.

1 Like

Celebrities / Re: Wizkid Vs. Michael Jackson: Who Wore It Better??? by Projectova: 9:06am On Dec 26, 2017
This M.J looks like Korede Bello cool

7 Likes

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.