Skip to content
OnlyProjects
BCA · GeneralFor educational purposes only
Code included

Milk Collection & Quality-Based Payment Ledger for a Village Dairy Co-operative Society (PHP + MySQL)

Two-time milk collections, fat/SNF testing, quality-based payments, recoveries and the monthly member settlement

Mapped to your syllabusKerala University FYUGP 2024 · UK8RPHCAP400 / UK8CIPCAP400 Research Project / Internship Project · Semester 8

Overview

1 min read

Milk Collection & Quality-Based Payment Ledger (MCPL) is a PHP and MySQL web application for a village-level Dairy Co-operative Society (DCS) — in Kerala, a primary society affiliated to Milma, the Kerala Co-operative Milk Marketing Federation, under the Anand Pattern. A typical society has 200–400 member families who bring milk twice a day, in the morning and evening shifts. At the society counter the milk is weighed and tested for fat and SNF (solids-not-fat), and the member's payment depends on those quality readings — yet most small societies still record this in a bound notebook, a calculator and carbon-copy payment slips.

MCPL gives the society secretary, the collection operator and each member one accurate record. The operator enters weight, fat and SNF per member per shift; the system computes kilograms of fat and SNF, applies the effective-dated rate table (separate rates for cow and buffalo milk, revisable for flush and lean seasons) and posts the amount to the member's ledger. Deductions at source — cattle-feed credit instalments, society loan recovery, share capital and the Dairy Farmers' Fund contribution — are applied automatically with caps. Each member gets a passbook view, and the system produces the fortnightly payment register, the society's milk pool summary and the reconciliation sheet against the union's receipt.

The project is sized for a final-year FYUGP BCA research project: a normalised database, temporal rate data, transaction-safe shift closing, role-based access and a documented test suite make every design decision defensible in the viva.

Branch
General
Relevant for
Kerala
Level
Advanced · 16 weeks · team of 3
Common at
University of Kerala, University of Madras, Bengaluru City University
Updated
Nov 2026

Syllabus alignment

Kerala University · FYUGP 2024

UK8RPHCAP400 / UK8CIPCAP400 · Research Project / Internship Project · Semester 8 · 12 credits

Subjects this project applies
  • PHP + MySQL (UK5DSCCAP300)
  • DBMS (UK3DSCCAP201)
  • HTML/JS (client-side form validation)
  • Software engineering: SDLC, DFD, ER diagram, test cases
How it is evaluated

See your department's project guidelines.

Also fits: University of Madras CBCS 2023-24, BCU SEP 2024, Bharathiar University 2023-24.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

6 min read

Problem statement

A village dairy co-operative society collects milk from hundreds of member families twice a day, tests fat and SNF at the counter, and must pay every member correctly at each settlement after deducting feed credit, loan instalments, share capital and welfare-fund contributions. When this runs on a handwritten register and a calculator, fat or weight entries are miscopied, seasonal rate revisions are applied inconsistently, the same member is sometimes entered twice in one shift, deductions over-recover from small suppliers, and members have no way to verify what they were paid for. The secretary spends days compiling fortnightly payment registers and union reports, and disputes at the settlement counter are common.

The problem is to build a web-based ledger that makes each collection entry unique and traceable, computes payments transparently from effective-dated rates, applies deductions safely, and gives the secretary, operator and member reliable registers and reports — without storing any government identity numbers.

Synopsis

Abstract

Village dairy co-operative societies are the first link of India's three-tier Anand Pattern: members pour milk at the society, the society pays them by quality (fat and SNF), and pooled milk moves to the district union and state federation — Milma in Kerala, with 3,113 primary societies and 10.7 lakh member-farmers. Payment is the society's most sensitive daily operation, yet in many societies it runs on notebooks and hand calculators, producing calculation errors, untraceable deductions and disputes. This project builds the Milk Collection & Quality-Based Payment Ledger (MCPL), a PHP/MySQL web application that records shift-wise collections, computes quality-based payments from effective-dated rates, manages deductions at source and prints passbooks, payment registers and settlement reports.

Introduction

I studied a 300-member society in Kottayam district (name changed). Members queue at the counter in the morning and evening; the operator weighs the milk, tests fat with an electronic milk tester, notes weight, fat and can number in a register, and reads SNF from a lactometer table. Payment is announced only at the fortnightly settlement, and a member disputing a figure has no record to check. The secretary separately tracks feed-credit instalments, loans, share capital and the Dairy Farmers' Fund, all subtracted from milk payment in the same notebook.

Existing system and its limitations

  • Handwritten collection register — illegible entries, no duplicate check, no running totals.
  • Payment calculated at settlement time, so errors surface weeks later.
  • Rate revisions (per kg fat, seasonal) applied from memory or loose paper slips.
  • Deductions applied by hand with no cap check, occasionally over-recovering from a small supplier.
  • No member-facing record — every query is answered by re-reading the register.
  • Union reports (quantity, quality average, amount payable) are compiled manually.

Proposed system

  • Shift-wise collection entry (weight, fat, SNF) with one entry per member per shift enforced by the database.
  • Payment engine: kg fat = weight × fat ÷ 100; amount = kg fat × fat rate + kg SNF × SNF rate (two-axis) or kg fat × per-kg-fat rate (single-axis), using an effective-dated rate table per milk type.
  • Deduction engine: standing recoveries (feed credit EMI, loan instalment, share capital, Dairy Farmers' Fund) applied in fixed order, capped so the net payable never goes negative.
  • Member passbook, fortnightly settlement register, shift-close pool totals and a union reconciliation sheet.
  • Role-based access (Secretary, Collection Operator, Member) and an audit log of every rate change and settlement.

Feasibility study

  • Technical: PHP 8 with PDO and MySQL 8 are taught in the syllabus (UK5DSCCAP300, UK3DSCCAP201); all software is open-source. Transactions and unique keys give the needed safety.
  • Economic: zero licence cost; a shared office PC or a small VPS is enough for one society.
  • Operational: screens mirror the counter workflow — weigh, test, enter — so an operator trains in under an hour; members read the passbook on a phone.
  • Schedule: 16 weeks cover analysis, design, four build increments, testing and report writing.

Objectives

  1. 01Model the society's collection-to-settlement workflow with level-0 and level-1 data flow diagrams and a 3NF relational schema.
  2. 02Record shift-wise collections with weight, fat and SNF readings, enforcing one entry per member per shift through unique database constraints.
  3. 03Compute quality-based payments using a two-axis (fat + SNF) or single-axis (per kg fat) scheme selectable by the society.
  4. 04Maintain effective-dated rate tables per milk type so historical collections always use the rate valid on that date.
  5. 05Automate deductions at source — cattle-feed credit, loan recovery, share capital, Dairy Farmers' Fund — in a fixed order with non-negative caps.
  6. 06Provide member passbooks, fortnightly settlement registers, shift-closing pool summaries and a union reconciliation sheet.
  7. 07Implement role-based access for Secretary, Collection Operator and Member with hashed passwords and an audit log of financial changes.
  8. 08Verify the payment, deduction and shift-closing logic with a documented unit and functional test suite.

Scope

In scope

  • One primary dairy co-operative society with 200–500 member families and one collection counter (two shifts a day).
  • Three roles: Society Secretary (administrator), Collection Operator and Member (read-only passbook).
  • Member registry with member number, milk type (cow/buffalo/mixed), bank or co-op account reference and feed-credit account; no Aadhaar, PAN or government ID numbers stored.
  • Collection entry (weight, fat, SNF) for morning and evening shifts; regrade of sour or rejected milk as a flagged entry.
  • Effective-dated rate management (per milk type, seasonal), payment computation in single-axis or two-axis mode.
  • Standing deductions with instalment schedules, caps and a per-member deduction ledger.
  • Fortnightly settlement, member passbook, daily collection register, pool summary and union reconciliation report, all exportable as CSV.

Out of scope (v1)

  • Automatic import from electronic milk testers or AMCU machines (readings are typed in manually; an import is future scope).
  • Payment gateway or UPI disbursement; settlement amounts are paid in cash or by bank transfer outside the system.
  • Multi-society (union-level) deployment and cold-chain or logistics tracking.
  • A native mobile app (the web UI is responsive).

Methodology

The project follows the Incremental (iterative) SDLC model: the collection entry core is delivered first, and payment, deduction and settlement layers are added as working increments, each reviewed by the guide. This suits a 16-week FYUGP semester-8 project because a demonstrable system exists from week 6 onward.

PhaseWeeksActivitiesDeliverable
Requirement study1–2Visit the society, observe both shifts, interview the secretary and two operators, collect blank registers and rate slipsRequirement notes
System design3–4DFD level 0/1, ER diagram, 3NF table design, wireframes, test planDesign document
Increment 15–6Authentication, roles, member registryWorking registry
Increment 27–9Collection entry, unique per-shift constraint, shift close, pool summaryWorking collection module
Increment 310–11Rate tables, payment engine, deduction engineWorking payment module
Increment 412–13Passbook, settlement, registers, CSV export, reconciliationFull application
Testing14Unit tests (payment, caps, rounding), functional test cases, security checksTest report
Documentation & viva prep15–16Report writing, screenshots, PPT, rehearsalFinal submission

Member-wise work split (team of 3). Member 1: database design, member registry, authentication and audit log. Member 2: collection entry, shift closing and rate management. Member 3: payment engine, deductions, settlement, reports and the test suite. All three jointly prepared the DFDs and the report.

Payment rule. For a collection of weight W kg with fat F% and SNF S%: kg fat = W × F ÷ 100 and kg SNF = W × S ÷ 100. In two-axis mode the amount is (kg fat × fat rate) + (kg SNF × SNF rate); in single-axis mode it is kg fat × per-kg-fat rate. Rates come from the rate table row effective on the collection date for the member's milk type. Amounts are computed to two decimals and rounded to the rupee only at settlement; deductions are applied in the order feed credit → loan → share capital → welfare fund, each capped at the remaining net.

Architecture & tech stack

3 diagrams · 6 technologies · 3 min read

  • PHP 8.2
  • MySQL 8
  • PDO (prepared statements)
  • HTML5/CSS3/JavaScript
  • Bootstrap 5 (industry-standard extra)
  • PHPUnit (industry-standard extra)

MCPL follows a three-tier architecture: browser → PHP application (page controllers, service classes for payment, deduction and settlement) → MySQL 8, with PDO prepared statements for every query and server-side sessions for authentication.

DFD Level 0 (context diagram)

flowchart TD
  SEC["Society Secretary"] -->|"rates, deduction setups"| P0(("Milk Collection and Payment Ledger"))
  OPR["Collection Operator"] -->|"weight, fat, SNF readings"| P0
  MEM["Member"] -->|"login, passbook view"| P0
  P0 -->|"rate change alerts, settlement register"| SEC
  P0 -->|"shift totals, collection list"| OPR
  P0 -->|"passbook, net payable"| MEM

DFD Level 1

flowchart TD
  SEC["Secretary"] --> P1(("1.0 Manage members and rates"))
  P1 --> D1[("D1 Members")]
  P1 --> D2[("D2 Rate table")]
  OPR["Operator"] --> P2(("2.0 Record collection"))
  D1 --> P2
  D2 --> P3(("3.0 Compute payment"))
  P2 --> D3[("D3 Collections")]
  D3 --> P3
  P3 --> D4[("D4 Payment entries")]
  SEC --> P4(("4.0 Manage deductions"))
  P4 --> D5[("D5 Recovery schedule")]
  D4 --> P5(("5.0 Fortnightly settlement"))
  D5 --> P5
  P5 --> D6[("D6 Settlements")]
  D6 --> P6(("6.0 Registers and reconciliation"))
  D3 --> P6
  P6 --> SEC2["Secretary"]
  D6 --> P7(("7.0 Member passbook"))
  P7 --> MEM["Member"]

ER diagram

erDiagram
  APP_USER ||--o{ AUDIT_LOG : writes
  MEMBER ||--o{ COLLECTION : supplies
  MILK_TYPE ||--o{ RATE : "is priced by"
  RATE ||--o{ COLLECTION : applies
  COLLECTION ||--|| PAYMENT_ENTRY : earns
  MEMBER ||--o{ RECOVERY_SCHEDULE : carries
  MEMBER ||--o{ DEDUCTION : "is charged"
  MEMBER ||--o{ SETTLEMENT_LINE : "is settled in"
  SETTLEMENT ||--|{ SETTLEMENT_LINE : contains

  APP_USER {
    int id PK
    string username UK
    string password_hash
    string role
  }
  MEMBER {
    int id PK
    string member_no UK
    string full_name
    string phone
    int milk_type_id FK
    date joined_on
    boolean active
  }
  MILK_TYPE {
    int id PK
    string name
  }
  RATE {
    int id PK
    int milk_type_id FK
    decimal fat_rate
    decimal snf_rate
    date effective_from
    date effective_to
  }
  COLLECTION {
    int id PK
    int member_id FK
    date coll_date
    string shift
    decimal weight_kg
    decimal fat_pct
    decimal snf_pct
    string quality_flag
  }
  PAYMENT_ENTRY {
    int id PK
    int collection_id FK
    decimal kg_fat
    decimal kg_snf
    decimal gross_amount
  }
  RECOVERY_SCHEDULE {
    int id PK
    int member_id FK
    string recovery_type
    decimal instalment
    int instalments_left
    string status
  }
  DEDUCTION {
    int id PK
    int member_id FK
    string recovery_type
    decimal amount
    date applied_on
  }
  SETTLEMENT {
    int id PK
    date period_from
    date period_to
    boolean closed
  }
  SETTLEMENT_LINE {
    int id PK
    int settlement_id FK
    int member_id FK
    decimal gross
    decimal deductions
    decimal net_payable
  }
  AUDIT_LOG {
    int id PK
    int user_id FK
    string action
    string entity
    datetime created_at
  }

Key design decisions. Rate history is temporal: each RATE row has an effective-from and effective-to window, so a rate revision never rewrites past collections — the payment engine joins the collection date against the window. COLLECTION carries a unique key on (member_id, coll_date, shift), which makes duplicate shift entries impossible at the database level, not just in the UI. PAYMENT_ENTRY stores the computed kg fat, kg SNF and gross amount so a later rate change cannot silently alter history. Every state-changing action by Secretary or Operator writes an AUDIT_LOG row, and audit rows have no update or delete path in the application. Shift close runs inside a transaction that recomputes the pool totals from D3 and marks the shift read-only.

Modules

7 modules

  1. Module 01

    Authentication, Roles and Audit Log

    Session-based login with password_hash and password_verify, three roles (Secretary, Operator, Member) checked by a shared guard on every page, and an append-only audit log recording rate changes, settlements and recovery edits with user and timestamp. Owner: Member 1.

  2. Module 02

    Member Registry

    The Secretary registers member families with member number, name, phone, milk type, feed-credit account and join date. Deactivation preserves all history and member numbers are never reused, so old registers remain meaningful. Owner: Member 1.

  3. Module 03

    Collection Entry and Shift Closing

    The operator types weight, fat and SNF per member for the morning or evening shift; client-side JavaScript validates ranges (fat 0–12%, SNF 7–11%) and the unique (member, date, shift) key blocks duplicates. Shift close recomputes pool totals inside a transaction and locks the shift's entries. Owner: Member 2.

  4. Module 04

    Rate Management

    Effective-dated rate rows per milk type with fat and SNF rates. Creating a revision closes the previous row's effective_to date, and the payment engine always selects the row whose window contains the collection date, so history stays priced correctly. Owner: Member 2.

  5. Module 05

    Payment Engine

    Converts readings to kilograms of fat and SNF, applies single-axis or two-axis computation with the effective rate, stores the immutable payment entry, and flags regraded or rejected collections with zero payment and a quality note. Owner: Member 3.

  6. Module 06

    Deduction and Recovery Engine

    Standing recoveries — cattle-feed credit EMI, society loan instalment, share capital and Dairy Farmers' Fund — are scheduled per member and applied at settlement in a fixed order, each capped at the remaining net so no member's payable goes negative. Owner: Member 3.

  7. Module 07

    Passbook, Settlement and Reports

    Fortnightly settlement generation with per-member lines (gross, deductions, net payable), the member passbook with shift-wise history, the daily collection register, pool summary and union reconciliation sheet, all exportable to CSV. Owner: Member 3.

Slides

12 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Milk Collection & Quality-Based Payment Ledger

  2. Slide 2

    Background: the Anand Pattern chain

  3. Slide 3

    Problem

  4. Slide 4

    Objectives

  5. Slide 5

    Tools and justification

  6. Slide 6

    System design

  7. Slide 7

    Payment and deduction rules

  8. Slide 8

    Database design highlights

  9. Slide 9

    Modules and team split

  10. Slide 10

    Demo

  11. Slide 11

    Testing

  12. Slide 12

    Conclusion and future scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 16 answered free · 13 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    Why is this domain suitable for a relational database like MySQL?

    The data is relational and rule-driven: members, collections, rates, recoveries and settlements all reference each other, and correctness depends on constraints — one collection per member per shift, foreign keys to the rate in force, and totals that must balance. MySQL provides transactions, unique keys and referential integrity, which a flat file or spreadsheet cannot enforce.

  2. 02Concept

    What is two-axis pricing in milk procurement?

    Two-axis pricing pays the farmer on two quality components separately: kilograms of fat multiplied by the fat rate, plus kilograms of SNF multiplied by the SNF rate. A single-axis scheme pays only on kilograms of fat. Our system supports both modes because different societies adopt different schemes, and the mode is a society-level setting.

  3. 03Concept

    How do prepared statements prevent SQL injection?

    With PDO prepared statements the SQL text is sent to the server first and user input is bound afterwards as typed parameters, so input can never change the structure of a query. Even if someone types a quote or a Boolean fragment into the fat field, it is treated as data. This is the primary defence, with server-side validation as the second layer.

+13 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

6 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

6 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

297 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

297 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

358 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

358 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

8 sources

  1. PHP Manual — Language Reference and PDO (Prepared Statements)
  2. MySQL 8.0 Reference Manual
  3. Milma — Kerala Co-operative Milk Marketing Federation (official site)
  4. National Dairy Development Board — Anand Pattern and cooperative services
  5. Dairy Knowledge Portal (NDDB) — Dairy Cooperative Society, Milk Union, Milk Federation: relations and functions
  6. OWASP Top 10 — Web Application Security Risks
  7. Ramez Elmasri and Shamkant B. Navathe, Fundamentals of Database Systems, 7th ed., Pearson
  8. Roger S. Pressman and Bruce R. Maxim, Software Engineering: A Practitioner's Approach, 9th ed., McGraw-Hill

Cite this bundle

OnlyProjects. (2026). Milk Collection & Quality-Based Payment Ledger for a Village Dairy Co-operative Society (PHP + MySQL): BCA General project bundle [Educational resource]. https://onlyprojects.online/projects/bca-general-dairy-society-milk-collection-ledger

Future scope

1 min read

  • Import from electronic milk testers / AMCU units via serial or CSV output, removing manual entry of fat and SNF readings.
  • UPI or bank-file disbursement of the net settlement amount with an automatic payment-advice slip per member.
  • Member mobile app or SMS passbook showing dues, payments and rate notices in Malayalam.
  • Union-level multi-society deployment with consolidated procurement reports for the district union.
  • Analytics — per-member yield trends, seasonality of fat content and feed-credit repayment behaviour — to help the committee plan input services.
  • Offline tolerance at the counter: a local entry queue that syncs when connectivity returns.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

BCACode included

Web Development

Smart Hostel Management System

Room allocation, complaints and mess billing without the register

  • Next.js
  • TypeScript
  • Node.js
  • +3

intermediate8 wk2 students