Added Folders

This commit is contained in:
root 2019-07-02 23:50:50 -04:00
parent 571223d920
commit ef9c61c1cf
6 changed files with 16 additions and 21 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
node_modules
uploads

View File

@ -23,7 +23,7 @@ if(isset($_GET['q'])){
if(!empty($_GET['sb'])){
$sb = $_GET['sb'];
}else{
$sb = "client_name";
$sb = "client_id";
}
if(isset($_GET['o'])){
@ -35,8 +35,8 @@ if(isset($_GET['o'])){
$disp = "ASC";
}
}else{
$o = "ASC";
$disp = "DESC";
$o = "DESC";
$disp = "ASC";
}
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM clients WHERE client_name LIKE '%$q%' OR client_email LIKE '%$q%' ORDER BY $sb $o LIMIT $record_from, $record_to");

View File

@ -1,12 +0,0 @@
<?php
$dbhost = "localhost";
$dbusername = "root";
$dbpassword = "password";
$database = "pittpc";
$mysqli = mysqli_connect($dbhost, $dbusername, $dbpassword, $database);
include("get_settings.php");
?>

15
db.sql
View File

@ -63,6 +63,7 @@ CREATE TABLE `assets` (
`asset_make` varchar(200) NOT NULL,
`asset_model` varchar(200) NOT NULL,
`asset_serial` varchar(200) NOT NULL,
`asset_ip` varchar(20) NOT NULL,
`asset_purchase_date` date NOT NULL,
`asset_warranty_expire` date NOT NULL,
`asset_reciept` varchar(200) NOT NULL,
@ -73,6 +74,7 @@ CREATE TABLE `assets` (
`vendor_id` int(11) NOT NULL,
`location_id` int(11) NOT NULL,
`contact_id` int(11) NOT NULL,
`network_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
PRIMARY KEY (`asset_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -387,6 +389,10 @@ CREATE TABLE `logs` (
`log_type` varchar(200) NOT NULL,
`log_description` varchar(200) NOT NULL,
`log_created_at` datetime NOT NULL,
`invoice_id` int(11) NOT NULL,
`quote_id` int(11) NOT NULL,
`recurring_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -407,6 +413,7 @@ CREATE TABLE `networks` (
`network_notes` text NOT NULL,
`network_created_at` datetime NOT NULL,
`network_updated_at` datetime NOT NULL,
`location_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
PRIMARY KEY (`network_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -677,6 +684,7 @@ CREATE TABLE `users` (
`name` varchar(200) NOT NULL,
`email` varchar(200) NOT NULL,
`password` varchar(200) NOT NULL,
`token` varchar(200) NOT NULL,
`avatar` varchar(200) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
@ -700,12 +708,13 @@ CREATE TABLE `vendors` (
`vendor_city` varchar(200) NOT NULL,
`vendor_state` varchar(200) NOT NULL,
`vendor_zip` varchar(200) NOT NULL,
`vendor_contact_name` varchar(200) NOT NULL,
`vendor_phone` varchar(200) NOT NULL,
`vendor_email` varchar(200) NOT NULL,
`vendor_website` varchar(200) NOT NULL,
`vendor_account_number` varchar(200) NOT NULL,
`vendor_created_at` int(11) NOT NULL,
`vendor_updated_at` int(11) NOT NULL,
`vendor_created_at` datetime NOT NULL,
`vendor_updated_at` datetime NOT NULL,
`client_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -720,4 +729,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-06-11 17:51:43
-- Dump completed on 2019-07-01 19:37:05

View File

@ -34,7 +34,6 @@ $config_invoice_prefix = $row['config_invoice_prefix'];
$config_quote_email_subject = $row['config_quote_email_subject'];
$config_recurring_email_auto_send = $row['config_recurring_email_auto_send'];
$config_default_net_terms = $row['default_net_terms'];
$config_api_key = $row['config_api_key'];

View File

@ -1834,7 +1834,7 @@ if(isset($_POST['add_payment'])){
}
//Update Invoice Status
mysqli_query($mysqli,"UPDATE invoices SET invoice_status = '$invoice_status' invoice_updated_at = NOW() WHERE invoice_id = $invoice_id");
mysqli_query($mysqli,"UPDATE invoices SET invoice_status = '$invoice_status', invoice_updated_at = NOW() WHERE invoice_id = $invoice_id");
//Add Payment to History
mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = '$invoice_status', history_description = 'INVOICE payment added', history_created_at = NOW(), invoice_id = $invoice_id");