Billing table contains the billing invoice number, which is a primary key to the field,And the date of the invoice,And also of the total bill,It contains the number of the supplier and the fact that a foreign key
CREATE TABLE `billing` (
`Billing_Id` int(11) unsigned NOT NULL,
`User_code` enum('Customer','Supplier') NOT NULL,
`date` date NOT NULL,
`Total_Invoice` int(50) unsigned NOT NULL,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`Process` enum('sales','purches') NOT NULL,
PRIMARY KEY (`Billing_Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
Brant contains the types of item No. It is a main field, and the name of the item and the quantity of any product is the quantity of each item and the price of our Class Unit
CREATE TABLE `brands` (
`Brands_Id` int(11) unsigned NOT NULL auto_increment,
`Brands_Name` varchar(50) NOT NULL,
`Quantity` int(11) unsigned NOT NULL,
`Unit _Price` decimal(10,2) unsigned NOT NULL,
PRIMARY KEY (`Brands_Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Custtomer table contains the customer number and customer information on the client-page, place the name of the client and phone number and any company continued
CREATE TABLE `customer` (
`Customer_Id` int(11) unsigned NOT NULL auto_increment,
`Customer_Fname` varchar(50) NOT NULL,
`Customer_Lname` varchar(50) NOT NULL,
`Customer_Adress` varchar(100) NOT NULL,
`Customer_phone` int(50) unsigned NOT NULL,
`name_Com_Admin` varchar(100) NOT NULL,
PRIMARY KEY (`Customer_Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
Suppliers table contains the suppliers of information on the supplier Supplier-page number, name and location and Phone number and postal code
REATE TABLE `suppliers` (
`Suppliers_Id` int(11) unsigned NOT NULL auto_increment,
`Suppliers_Name` varchar(50) NOT NULL,
`Suppliers_Address` varchar(50) NOT NULL,
`Phone` varchar(15) NOT NULL,
`Country` varchar(50) NOT NULL,
`PostalCode` varchar(15) NOT NULL,
PRIMARY KEY (`Suppliers_Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
Terms of billing table containing invoice number p, which is a key and type the item number and quantity of the item and the price per unit of product
CREATE TABLE `terms of billing` (
`Billing_Id` int(11) unsigned NOT NULL,
`Brands_Id` int(11) unsigned NOT NULL COMMENT 'FK',
`Quantity` int(50) unsigned NOT NULL,
`Unit _Price` decimal(10,2) unsigned NOT NULL,
PRIMARY KEY (`Billing_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;