BCS Delphi XE8 Invoice Generator


There are those times when the programmer need to submit an invoice so they can be paid for services rendered. invgen
The first task would be to create a MySQL database named “bcsi” (minus quotes). The BCS Select Date And Time Component is required for this software.  Review the specification by clicking here.

There are four primary tables that comprise the database used for the BCS Invoice Generator. The customers table is listed below.

-- phpMyAdmin SQL Dump
-- version 4.3.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 16, 2015 at 02:29 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `bcsi`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `cust`
--
 
CREATE TABLE IF NOT EXISTS `cust` (
  `id` int(11) NOT NULL,
  `cust` varchar(125) NOT NULL,
  `cinfo` mediumtext NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `cust`
--
ALTER TABLE `cust`
  ADD PRIMARY KEY (`id`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `cust`
--
ALTER TABLE `cust`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
The services or inventory master table is listed below.
-- phpMyAdmin SQL Dump
-- version 4.3.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 16, 2015 at 02:32 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `bcsi`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `invm`
--
 
CREATE TABLE IF NOT EXISTS `invm` (
  `id` int(11) NOT NULL,
  `rdate` datetime NOT NULL,
  `cust` varchar(125) NOT NULL,
  `cinfo` mediumtext NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `invm`
--
ALTER TABLE `invm`
  ADD PRIMARY KEY (`id`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `invm`
--
ALTER TABLE `invm`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
The inventory or services items table is listed below.
-- phpMyAdmin SQL Dump
-- version 4.3.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 16, 2015 at 02:35 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `bcsi`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `inv`
--
 
CREATE TABLE IF NOT EXISTS `inv` (
  `id` int(11) NOT NULL,
  `inv` varchar(125) NOT NULL,
  `cost` double NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `inv`
--
ALTER TABLE `inv`
  ADD PRIMARY KEY (`id`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `inv`
--
ALTER TABLE `inv`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
The invoice details table description is listed below.
-- phpMyAdmin SQL Dump
-- version 4.3.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 16, 2015 at 02:37 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `bcsi`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `est`
--
 
CREATE TABLE IF NOT EXISTS `est` (
  `id` int(11) NOT NULL,
  `invno` int(11) NOT NULL,
  `cnt` double NOT NULL,
  `task` varchar(125) NOT NULL,
  `cost` double NOT NULL,
  `stot` double NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
 
--
-- Indexes for dumped tables
--
 
--
-- Indexes for table `est`
--
ALTER TABLE `est`
  ADD PRIMARY KEY (`id`);
 
--
-- AUTO_INCREMENT for dumped tables
--
 
--
-- AUTO_INCREMENT for table `est`
--
ALTER TABLE `est`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=21;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
The 32 bit executable program may be downloaded here. The 64 bit executable program may be downloaded here. The component documentation can be viewed by clicking here. The source code for this application can be downloaded by clicking here. Once the database is created and the tables are imported simply download either the 32 or 64 bit executable and you should be in operation. invgen When the application comes active I recommend entering the information for one customer and one or more service items. To add a new customer click on the Customers menu item and fill in the required information on the form. To add a new service click on the Services Offered menu item and fill in the rewired information on the form. Each time you create a new invoice (clicking the + (plus button) on the database navigator) you are prompted to select the customer by the appearance of the Customer dialog.  Simply double click on the item in the database grid to select the associated item. When you would like to add a new service provided to the invoice (clicking the + (plus button) on the database navigator) you are prompted to select the service from the available services by double clicking on the desired service to be added. In either scenario the user can perform CRUD operations via the database grid until the desired results are entered into the database.  Then simply double click on the desired item to utilize it in this application. To invoke the reports click on the Reports menu item and a drop down will appear.  Then simply click on the desired menu item to generate the associated report. There are three reports with this application.  The first report is the Invoice Report and is depicted below. invr01 Another report is the Customers Report and it is depicted below. invr02 The final report is for the individual services offered and is depicted below. invr03 This application generates invoices for services rendered and should be of service to the programmers for years into the future. Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply