Cash Book Pro 1.0

A secure, single user Windows desktop application built for Krishi Vigyan Kendra Dhalai, Salema, Tripura - replacing manual cash ledgers with a structured, audit ready digital cash book featuring tamper evident logs, automated backup and print ready statements.

Developer
Guide Mr. Subrata Shib, Programme Coordinator, KVK Dhalai

The Problem

Krishi Vigyan Kendra Dhalai (KVK Dhalai) is a district level Farm Science Centre operating under the Indian Council of Agricultural Research, engaged in transferring latest agricultural technologies to end users across Tripura. As a government affiliated organisation, its office cash book - recording all cash receipts and expenditures - was subject to periodic inspection by audit authorities. Accuracy, completeness and traceability of every entry were non-negotiable.

At the time, KVK Dhalai maintained this entirely through handwritten ledgers. The process required significant pen and paper work, was less secure and offered no quick way to retrieve historical entries or generate statements for a specific time period. A single accountant held access responsibility and there was no safeguard against data loss from a system failure.

Core ask: Build a single-user desktop cash book system that records all cash receipts and expenditure transactions, preserves a tamper evident audit trail of every operation, guards against data loss through automated backup and produces print ready statements for any date range - eliminating the paper ledger entirely.

This was my third year MCA internship project (Internship Program II, CA660) at ICFAI University, Tripura, completed at KVK Dhalai from January to June 2014 under the guidance of Mr. Subrata Shib (Programme Coordinator, KVK Dhalai) and co-guides Mr. Debaraj Barman, Mr. Pradip Kumar Das, Mr. Ramanuj Chakraborty and Dr. Alak Chowdhury.


Technology

Visual Studio 2008 VB.NET WinForms MS SQL Server .NET Framework Windows 7+

Built as a Windows Forms single-user desktop application in VB.NET, with Microsoft SQL Server as the backend database. SQL Server was chosen over lighter alternatives to provide stronger transaction integrity for the concurrent audit log writes the security model required. All cashbook operations - insert, update, delete - were designed to write simultaneously to both the primary CASHBOOK table and the TTABLECASHBOOK audit table, ensuring the trail remained consistent even in the event of an unexpected process termination.

The iterative waterfall model was followed as the SDLC approach: feasibility, requirements specification, design (DFDs at three levels, E-R diagram, Use Case diagram), coding and testing - with structured feedback loops between phases.


What It Does

✏️

Full Entry Lifecycle

Create (Cash Detail Update), edit the last entry (Cash Detail Edit) and delete the last entry (Cash Detail Delete) - each operation logged automatically to the audit trail.

🖨️

Cashbook Statement

View and print the cashbook statement for any selected date range - formatted for direct submission to audit authorities without further modification.

📊

Current Status View

Instantly view the current status of office funds - the last successfully committed cashbook entry - without scrolling through historical records.

🔒

Tamper-Evident Audit Trail

Every operation - login, cash entry, edit, delete, backup, restore, password change - is recorded in dedicated transaction tables with timestamps and user identity.

🔑

Login Attempt Tracking

All successful and failed login attempts are captured in TTABLELOGIN with timestamps - providing a full access history for compliance and security review.

💾

Dual Backup Strategy

Manual backup/restore on demand, plus automatic scheduled backup every seven days to a dated folder on a separate drive - both preserving user credentials alongside transaction data.

Cash Book Pro home screen
Application home screen - entry point for all cash book operations

The Backup Architecture

Data loss was the highest risk scenario for an audit bound organisation. The application addresses this on two levels. Manual backup and restore gives the accountant direct control over point in time snapshots - both operations preserve the USERACCOUNTS table alongside the transaction data, meaning a restored environment is immediately operational without re setup.

The automated weekly backup runs silently in the background, creating a new dated folder on a drive separate from the primary installation every seven days. In a worst case scenario - hard drive failure between manual backups - the maximum data exposure is bounded to seven days of entries. All backup and restore operations are themselves recorded in TTABLEDATABASE, making the backup history auditable.

Database backup and restore tools screen
Database tools - manual backup and restore with user data preservation

System Design

The project followed an iterative waterfall model. Design artefacts included Data Flow Diagrams at three levels - Level 0 (context), Level 1 (functional decomposition into six processes: login, manage cashbook, generate statement, view current status, view transactions, manage database) and Level 2 (subprocess detail) - alongside an Entity-Relationship diagram and a Use Case diagram covering all user facing functions.

Data Flow Diagrams

DFD Level 0 - context diagram
DFD Level 0 - Context: single Administrator actor interacting with the Cash Book Transaction system
DFD Level 1 - functional decomposition
DFD Level 1 - Six top-level processes across USERACCOUNTS, CASHBOOK, TTABLECASHBOOK and TTABLEDATABASE
DFD Level 2.2 - manage cashbook
DFD Level 2.2 - Cashbook CRUD: insert, update, delete with parallel TTABLECASHBOOK audit writes
DFD Level 2.3 - generate statement
DFD Level 2.3 - Statement generation and print pipeline from CASHBOOK
DFD Level 2.6 - database management
DFD Level 2.6 - Database management: backup (0.6.1), restore (0.6.2) and scheduled backup (0.6.3) processes against TTABLEDATABASE

Use Case & Entity-Relationship

Use Case Diagram - CashBook Pro v1.0
Use Case Diagram - eight top-level functions available to the single User actor, with Cash Details expanding to Update / Edit / Delete sub-cases
E-R Diagram - CashBook Pro v1.0
E-R Diagram - five tables: CASHBOOK, USERACCOUNTS, TTABLECASHBOOK, TTABLELOGIN, TTABLEDATABASE

Database Schema

Five tables cover the full data model. The CASHBOOK table carries a richly structured daily entry - separate receipt and payment columns per expenditure head - while three audit tables (TTABLECASHBOOK, TTABLELOGIN, TTABLEDATABASE) share a common schema for maximum consistency and simpler cross-event querying.

CASHBOOK - Primary cash entry record (26 columns)
ColumnTypeDescription
tid_CBnumeric(20,0)Transaction ID - unique, not null
date_rapdatetimeDate of receipt and payment
monthnvarchar(50)Month name
part_rec / part_paynvarchar(250)Particulars - receipts / payments
pna_rec / pna_paynumeric(18,2)Pay & allowance - receipts / payments
off_rec / off_paynumeric(18,2)Office contingency - receipts / payments
work_rec / work_paynumeric(18,2)Working contingency - receipts / payments
nrc_rec / nrc_paynumeric(18,2)Non-recurring contingency - receipts / payments
misc_rec / misc_paynumeric(18,2)Miscellaneous - receipts / payments
tot_rec / tot_paynumeric(18,2)Row total - receipts / payments
ob_rec / cb_paynumeric(18,2)Opening balance - receipts / payments (not null)
gt_rec / gt_paynumeric(18,2)Grand total - receipts / payments (not null)
chkndate_paynvarchar(250)Cheque number and date of payment
rem_rec / rem_paynvarchar(250)Remarks - receipts / payments
ruinvarchar(100)Record entry user info (not null)
TTABLECASHBOOK / TTABLELOGIN / TTABLEDATABASE - Shared audit table structure
ColumnTypeDescription
tidnumeric(18,0)Transaction ID - unique, not null
doedatetimeDate of entry
userInfonvarchar(50)User identity at time of operation
typenvarchar(250)Operation type (e.g. CASH DETAIL UPDATE, LOGIN SUCCESS, BACKUP)
remnvarchar(250)Remarks
USERACCOUNTS - Single administrator credential store
ColumnTypeDescription
useridnvarchar(20)User ID - unique, not null
passnvarchar(20)Password - not null

The three audit tables share an identical schema by design - keeping the audit pattern uniform and join logic trivial when cross-referencing event types. TTABLECASHBOOK tracks cashbook CRUD operations; TTABLELOGIN captures all login attempts (successful and failed); TTABLEDATABASE records backup, restore and scheduled backup events. This separation means each audit stream can be queried and reported independently without schema changes.


Application Screens


Limitations & Outcomes

Known Limitations

  • Single user, single machine - no LAN or multi user access
  • Offline only - hard disk crash recovers only to last scheduled backup
  • Only the last cashbook entry can be edited or deleted - earlier records are locked by design
  • No cash analysis report - identified as the primary future enhancement at delivery

Outcomes

  • Replaced handwritten ledgers with structured, queryable records
  • Eliminated manual statement compilation ahead of government audits
  • Automated weekly backup bounded maximum data loss to seven days
  • Full audit trail met inspection requirements from day one of deployment

The system was delivered to KVK Dhalai as a production-ready desktop application in June 2014, certified by Mr. Subrata Shib. The core architectural decisions - separating audit logs into dedicated tables per event class, running backup on a timer rather than relying on user discipline and locking edit/delete to only the last record to prevent backdated tampering - hold up as sound patterns. A modern rebuild would swap local SQL Server for a cloud hosted database, the backup folder for object storage and the single user model for role-based access - but the data model and audit logic would translate cleanly.


Code

The full source code - VB.NET forms, SQL scripts and project files - is available on GitHub.

← All Projects SUBHAJITDEBNATH.COM Get in touch →