mirror of https://github.com/itflow-org/itflow
More UI Cleanups, added a ticketing system, added milage linking with client, invoice, vendor or location, new DB dump
This commit is contained in:
parent
b20ed30ada
commit
f44b9b19fa
|
|
@ -114,11 +114,21 @@
|
|||
<div class="tab-pane fade" id="pills-more" role="tabpanel" aria-labelledby="pills-more-tab">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Invoice Net Terms</label>
|
||||
<label>Hours</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="hours" placeholder="Hours of operation">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Invoice Net Terms</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<select class="form-control" name="net_terms">
|
||||
<option value="7">Default (7 Days)</option>
|
||||
<option value="1">Upon Reciept</option>
|
||||
|
|
|
|||
|
|
@ -9,51 +9,175 @@
|
|||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<div class="modal-body bg-white">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-7">
|
||||
<label>Date</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-basic-tab" data-toggle="pill" href="#pills-basic" role="tab" aria-controls="pills-basic" aria-selected="true">Basic</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-link-tab" data-toggle="pill" href="#pills-link" role="tab" aria-controls="pills-link" aria-selected="false">Link</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
|
||||
<div class="tab-pane fade show active" id="pills-basic" role="tabpanel" aria-labelledby="pills-basic-tab">
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-7">
|
||||
<label>Date</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="date" class="form-control" name="date" value="<?php echo date("Y-m-d"); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<input type="date" class="form-control" name="date" value="<?php echo date("Y-m-d"); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-5">
|
||||
<label>Miles</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-bicycle"></i></span>
|
||||
<div class="form-group col-5">
|
||||
<label>Miles</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-bicycle"></i></span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="miles" placeholder="Enter miles" required autofocus="autofocus">
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="miles" placeholder="Enter miles" required autofocus="autofocus">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Location</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||
<div class="form-group">
|
||||
<label>Location</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="starting_location" placeholder="Enter your starting location" required>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="starting_location" placeholder="Enter your starting location" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-arrow-right"></i></span>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-arrow-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="destination" placeholder="Enter your destination" required>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="destination" placeholder="Enter your destination" required>
|
||||
<div class="form-group">
|
||||
<label>Purpose</label>
|
||||
<textarea rows="4" class="form-control" name="purpose" required></textarea>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="customControlAutosizing" name="roundtrip" value="1" >
|
||||
<label class="custom-control-label" for="customControlAutosizing">Roundtrip</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-link" role="tabpanel" aria-labelledby="pills-link-tab">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Invoice</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-file"></i></span>
|
||||
</div>
|
||||
<select class="form-control" id="selectIt" name="invoice">
|
||||
<option value="">- Invoice -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM clients, invoices WHERE invoices.client_id = clients.client_id ORDER BY invoice_number DESC");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
$invoice_id = $row['invoice_id'];
|
||||
$invoice_number = $row['invoice_number'];
|
||||
$invoice_status = $row['invoice_status'];
|
||||
|
||||
?>
|
||||
<option value="<?php echo $invoice_id; ?>"><?php echo "$invoice_number - $invoice_status - $client_name"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control" id="selectIt" name="client">
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM clients");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
?>
|
||||
<option <?php if($_GET['client_id'] == $client_id) { echo "selected"; } ?> value="<?php echo "$client_id"; ?>"><?php echo "$client_name"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Location</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||
</div>
|
||||
<select class="form-control" name="location">
|
||||
<option value="">- Location -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM client_locations, clients WHERE client_locations.client_id = clients.client_id ORDER BY clients.client_id DESC");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$location_id = $row['client_location_id'];
|
||||
$location_name = $row['client_location_name'];
|
||||
$client_name = $row['client_name'];
|
||||
?>
|
||||
<option value="<?php echo $location_id; ?>"><?php echo "$client_name - $location_name"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Vendor</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
||||
</div>
|
||||
<select class="form-control" name="vendor">
|
||||
<option value="">- Vendor -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM vendors");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$vendor_id = $row['vendor_id'];
|
||||
$vendor_name = $row['vendor_name'];
|
||||
?>
|
||||
<option value="<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Purpose</label>
|
||||
<textarea rows="4" class="form-control" name="purpose" required></textarea>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="customControlAutosizing" name="roundtrip" value="1" >
|
||||
<label class="custom-control-label" for="customControlAutosizing">Roundtrip</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<div class="modal" id="addTicketModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header text-white">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-tag mr-2"></i>New Ticket</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control" id="selectIt" name="client" required <?php if(isset($_GET['client_id'])){ echo "disabled"; } ?>>
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM clients");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
?>
|
||||
<option <?php if($_GET['client_id'] == $client_id) { echo "selected"; } ?> value="<?php echo "$client_id"; ?>"><?php echo "$client_name"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Subject</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="subject" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Details</label>
|
||||
<textarea class="form-control" rows="8" name="details"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" name="add_ticket" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -30,17 +30,32 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<input type="text" class="form-control" name="name" required autofocus>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Name" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<input type="text" class="form-control" name="description">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="description" placeholder="Description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Account Number</label>
|
||||
<input type="text" class="form-control" name="account_number">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-fingerprint"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="account_number" placeholder="Account number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -49,27 +64,47 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<input type="text" class="form-control" name="address">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="address"placeholder="Street address" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<input type="text" class="form-control" name="city">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-city"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="city" placeholder="City">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
<select class="form-control" name="state">
|
||||
<option value="">- State -</option>
|
||||
<?php foreach($states_array as $state_abbr => $state_name) { ?>
|
||||
<option value="<?php echo $state_abbr; ?>"><?php echo $state_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-flag"></i></span>
|
||||
</div>
|
||||
<select class="form-control" name="state">
|
||||
<option value="">- State -</option>
|
||||
<?php foreach($states_array as $state_abbr => $state_name) { ?>
|
||||
<option value="<?php echo $state_abbr; ?>"><?php echo $state_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Zip</label>
|
||||
<input type="text" class="form-control" name="zip">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fab fa-fw fa-usps"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="zip" placeholder="Zip code">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -78,17 +113,32 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label>Phone</label>
|
||||
<input type="text" class="form-control" name="phone">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="phone" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="email" class="form-control" name="email">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
</div>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Website</label>
|
||||
<input type="text" class="form-control" name="website">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="website" placeholder="Website include http://">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ if(isset($_GET['client_id'])){
|
|||
<div class="card mb-3">
|
||||
<div class="card-body mb-2">
|
||||
<div class="row">
|
||||
<div class="col border-right">
|
||||
<div class="col">
|
||||
<h4 class="text-secondary">Address</h4>
|
||||
<a href="//maps.<?php echo $session_map_source; ?>.com/?q=<?php echo "$client_address $client_zip"; ?>" target="_blank">
|
||||
<?php echo $client_address; ?>
|
||||
|
|
@ -93,7 +93,7 @@ if(isset($_GET['client_id'])){
|
|||
<?php echo "$client_city $client_state $client_zip"; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col border-right">
|
||||
<div class="col border-left">
|
||||
<h4 class="text-secondary">Contact</h4>
|
||||
<?php
|
||||
if(!empty($client_email)){
|
||||
|
|
@ -114,12 +114,12 @@ if(isset($_GET['client_id'])){
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="col border-right">
|
||||
<div class="col border-left">
|
||||
<h4 class="text-secondary">Standings</h4>
|
||||
<h6>Paid to Date <small class="text-secondary ml-5">$<?php echo number_format($amount_paid,2); ?></small>
|
||||
<h6>Balance <small class="text-secondary ml-5">$<?php echo number_format($balance,2); ?></small>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<div class="col-1 border-left">
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-dark btn-sm float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-fw fa-ellipsis-v"></i>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-file"></i> Invoices</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientInvoiceModal"><i class="fa fa-plus"></i></button>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addInvoiceModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
|
|
|||
677
db.sql
677
db.sql
|
|
@ -0,0 +1,677 @@
|
|||
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: pittpc
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.1.38-MariaDB-0ubuntu0.18.04.2
|
||||
|
||||
/*!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 utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `accounts`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `accounts`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `accounts` (
|
||||
`account_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`account_name` varchar(200) NOT NULL,
|
||||
`opening_balance` decimal(15,2) NOT NULL,
|
||||
PRIMARY KEY (`account_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `alerts`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `alerts`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `alerts` (
|
||||
`alert_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`alert_type` varchar(200) NOT NULL,
|
||||
`alert_message` varchar(200) NOT NULL,
|
||||
`alert_date` date NOT NULL,
|
||||
`alert_ack_date` date NOT NULL,
|
||||
PRIMARY KEY (`alert_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `c4v_invoices`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `c4v_invoices`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `c4v_invoices` (
|
||||
`invoice_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`company_id` int(11) NOT NULL,
|
||||
`invoice_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`order_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`invoice_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`invoice_date` datetime NOT NULL,
|
||||
`invoice_due` datetime NOT NULL,
|
||||
`invoice_amount` double(15,4) NOT NULL,
|
||||
`currency_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`currency_rate` double(15,8) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
`customer_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`customer_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`customer_tax_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`customer_phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`customer_address` text COLLATE utf8mb4_unicode_ci,
|
||||
`invoice_note` text COLLATE utf8mb4_unicode_ci,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||
`category_id` int(11) NOT NULL,
|
||||
`parent_id` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`invoice_id`),
|
||||
UNIQUE KEY `invoices_company_id_invoice_number_deleted_at_unique` (`company_id`,`invoice_number`,`deleted_at`),
|
||||
KEY `invoices_company_id_index` (`company_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `calendar_events`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `calendar_events`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `calendar_events` (
|
||||
`calendar_event_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`calendar_event_title` varchar(200) NOT NULL,
|
||||
`calendar_event_start` datetime NOT NULL,
|
||||
`calendar_event_end` datetime NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
`client_location_id` int(11) NOT NULL,
|
||||
`calendar_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`calendar_event_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `calendars`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `calendars`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `calendars` (
|
||||
`calendar_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`calendar_name` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`calendar_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `categories`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `categories`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `categories` (
|
||||
`category_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`category_name` varchar(200) NOT NULL,
|
||||
`category_type` varchar(200) NOT NULL,
|
||||
`category_color` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`category_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_applications`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_applications`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_applications` (
|
||||
`client_application_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_application_name` varchar(200) NOT NULL,
|
||||
`client_application_type` varchar(200) NOT NULL,
|
||||
`client_application_license` varchar(200) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_application_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_assets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_assets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_assets` (
|
||||
`client_asset_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_asset_type` varchar(200) NOT NULL,
|
||||
`client_asset_name` varchar(200) NOT NULL,
|
||||
`client_asset_make` varchar(200) NOT NULL,
|
||||
`client_asset_model` varchar(200) NOT NULL,
|
||||
`client_asset_serial` varchar(200) NOT NULL,
|
||||
`client_asset_purchase_date` date NOT NULL,
|
||||
`client_asset_warranty_expire` date NOT NULL,
|
||||
`client_asset_reciept` varchar(200) NOT NULL,
|
||||
`client_asset_note` varchar(200) NOT NULL,
|
||||
`client_password_id` int(11) NOT NULL,
|
||||
`client_vendor_id` int(11) NOT NULL,
|
||||
`client_location_id` int(11) NOT NULL,
|
||||
`client_contact_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_asset_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_contacts`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_contacts`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_contacts` (
|
||||
`client_contact_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_contact_name` varchar(200) NOT NULL,
|
||||
`client_contact_title` varchar(200) NOT NULL,
|
||||
`client_contact_email` varchar(200) NOT NULL,
|
||||
`client_contact_phone` varchar(200) NOT NULL,
|
||||
`client_contact_primary` tinyint(1) NOT NULL,
|
||||
`client_contact_recieve_invoices` tinyint(1) NOT NULL,
|
||||
`client_contact_photo` varchar(200) NOT NULL,
|
||||
`location_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_contact_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_domains`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_domains`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_domains` (
|
||||
`client_domain_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_domain_name` varchar(200) NOT NULL,
|
||||
`client_domain_registrar` int(11) NOT NULL,
|
||||
`client_domain_webhost` int(11) NOT NULL,
|
||||
`client_domain_expire` date NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_domain_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_locations`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_locations`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_locations` (
|
||||
`client_location_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_location_name` varchar(200) NOT NULL,
|
||||
`client_location_address` varchar(200) NOT NULL,
|
||||
`client_location_city` varchar(200) NOT NULL,
|
||||
`client_location_state` varchar(200) NOT NULL,
|
||||
`client_location_zip` varchar(200) NOT NULL,
|
||||
`client_location_phone` varchar(200) NOT NULL,
|
||||
`client_location_hours` varchar(200) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_location_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_logins`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_logins`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_logins` (
|
||||
`client_login_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_login_description` varchar(200) NOT NULL,
|
||||
`client_login_web_link` varchar(200) NOT NULL,
|
||||
`client_login_username` varchar(200) NOT NULL,
|
||||
`client_login_password` varchar(200) NOT NULL,
|
||||
`client_login_note` text NOT NULL,
|
||||
`client_vendor_id` int(11) NOT NULL,
|
||||
`client_asset_id` int(11) NOT NULL,
|
||||
`client_application_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_login_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_networks`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_networks`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_networks` (
|
||||
`client_network_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_network_name` varchar(200) NOT NULL,
|
||||
`client_network` varchar(200) NOT NULL,
|
||||
`client_network_gateway` varchar(200) NOT NULL,
|
||||
`client_network_dhcp_range` varchar(200) NOT NULL,
|
||||
`client_network_notes` text NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_network_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_notes`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_notes`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_notes` (
|
||||
`client_note_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_note_subject` varchar(200) NOT NULL,
|
||||
`client_note_body` text NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_note_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_vendors`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_vendors`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_vendors` (
|
||||
`client_vendor_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_vendor_name` varchar(200) NOT NULL,
|
||||
`client_vendor_description` varchar(200) NOT NULL,
|
||||
`client_vendor_account_number` varchar(200) NOT NULL,
|
||||
`client_vendor_note` text NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_vendor_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `clients`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `clients`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `clients` (
|
||||
`client_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`client_name` varchar(200) NOT NULL,
|
||||
`client_address` varchar(200) NOT NULL,
|
||||
`client_city` varchar(200) NOT NULL,
|
||||
`client_state` varchar(200) NOT NULL,
|
||||
`client_zip` varchar(200) NOT NULL,
|
||||
`client_phone` varchar(200) NOT NULL,
|
||||
`client_email` varchar(200) NOT NULL,
|
||||
`client_website` varchar(200) NOT NULL,
|
||||
`client_net_terms` int(10) NOT NULL,
|
||||
`client_created_at` int(11) NOT NULL,
|
||||
`client_updated_at` int(11) NOT NULL,
|
||||
PRIMARY KEY (`client_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `expenses`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `expenses`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `expenses` (
|
||||
`expense_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`expense_description` text NOT NULL,
|
||||
`expense_amount` decimal(15,2) NOT NULL,
|
||||
`expense_date` date NOT NULL,
|
||||
`expense_reference` varchar(200) NOT NULL,
|
||||
`expense_receipt` varchar(200) NOT NULL,
|
||||
`vendor_id` int(11) NOT NULL,
|
||||
`category_id` int(11) NOT NULL,
|
||||
`account_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`expense_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `files`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `files`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `files` (
|
||||
`file_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`reference_file_name` varchar(200) NOT NULL,
|
||||
`file_name` varchar(200) NOT NULL,
|
||||
`file_ext` varchar(200) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`file_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoice_history`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `invoice_history`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `invoice_history` (
|
||||
`invoice_history_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`invoice_history_date` date NOT NULL,
|
||||
`invoice_history_status` varchar(200) NOT NULL,
|
||||
`invoice_history_description` varchar(200) NOT NULL,
|
||||
`invoice_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`invoice_history_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=402 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoice_items`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `invoice_items`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `invoice_items` (
|
||||
`invoice_item_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`invoice_item_name` varchar(200) NOT NULL,
|
||||
`invoice_item_description` text NOT NULL,
|
||||
`invoice_item_quantity` decimal(15,2) NOT NULL,
|
||||
`invoice_item_price` decimal(15,2) NOT NULL,
|
||||
`invoice_item_subtotal` decimal(15,2) NOT NULL,
|
||||
`invoice_item_tax` decimal(15,2) NOT NULL,
|
||||
`invoice_item_total` decimal(15,2) NOT NULL,
|
||||
`invoice_id` int(11) NOT NULL,
|
||||
`quote_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`invoice_item_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=564 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `invoices`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `invoices`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `invoices` (
|
||||
`invoice_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`invoice_number` int(11) NOT NULL,
|
||||
`invoice_status` varchar(200) NOT NULL,
|
||||
`invoice_date` date NOT NULL,
|
||||
`invoice_due` date NOT NULL,
|
||||
`invoice_amount` decimal(15,2) NOT NULL,
|
||||
`invoice_note` text NOT NULL,
|
||||
`category_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`invoice_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `mileage`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `mileage`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `mileage` (
|
||||
`mileage_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mileage_date` date NOT NULL,
|
||||
`mileage_purpose` varchar(200) NOT NULL,
|
||||
`mileage_starting_location` varchar(200) NOT NULL,
|
||||
`mileage_destination` varchar(200) NOT NULL,
|
||||
`mileage_start_odometer` int(11) DEFAULT NULL,
|
||||
`mileage_end_odmeter` int(11) DEFAULT NULL,
|
||||
`mileage_miles` int(11) NOT NULL,
|
||||
`client_id` int(11) DEFAULT NULL,
|
||||
`invoice_id` int(11) NOT NULL,
|
||||
`location_id` int(11) NOT NULL,
|
||||
`vendor_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`mileage_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `payments`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `payments`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `payments` (
|
||||
`payment_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`payment_date` date NOT NULL,
|
||||
`payment_amount` decimal(15,2) NOT NULL,
|
||||
`payment_method` varchar(200) NOT NULL,
|
||||
`payment_reference` varchar(200) NOT NULL,
|
||||
`account_id` int(11) NOT NULL,
|
||||
`invoice_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`payment_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `products`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `products`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `products` (
|
||||
`product_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`product_name` varchar(200) NOT NULL,
|
||||
`product_description` text NOT NULL,
|
||||
`product_cost` decimal(15,2) NOT NULL,
|
||||
PRIMARY KEY (`product_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `quotes`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `quotes`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `quotes` (
|
||||
`quote_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`quote_number` varchar(200) NOT NULL,
|
||||
`quote_status` varchar(200) NOT NULL,
|
||||
`quote_date` date NOT NULL,
|
||||
`quote_amount` decimal(15,2) NOT NULL,
|
||||
`quote_note` text NOT NULL,
|
||||
`quote_url_key` varchar(200) NOT NULL,
|
||||
`category_id` int(11) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`quote_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `recurring_invoices`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `recurring_invoices`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `recurring_invoices` (
|
||||
`recurring_invoice_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`recurring_invoice_frequency` varchar(200) NOT NULL,
|
||||
`recurring_invoice_start_date` date NOT NULL,
|
||||
`recurring_invoice_last_sent` date NOT NULL,
|
||||
`recurring_invoice_next_date` date NOT NULL,
|
||||
`recurring_invoice_status` int(1) NOT NULL,
|
||||
`invoice_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`recurring_invoice_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `settings`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `settings`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `settings` (
|
||||
`config_default_expense_account` varchar(200) NOT NULL,
|
||||
`config_default_payment_account` varchar(200) NOT NULL,
|
||||
`config_default_net_terms` varchar(200) NOT NULL,
|
||||
`config_start_page` varchar(200) NOT NULL,
|
||||
`config_company_name` varchar(200) NOT NULL,
|
||||
`config_company_address` varchar(200) NOT NULL,
|
||||
`config_company_city` varchar(200) NOT NULL,
|
||||
`config_company_state` varchar(200) NOT NULL,
|
||||
`config_company_zip` varchar(200) NOT NULL,
|
||||
`config_company_phone` varchar(200) NOT NULL,
|
||||
`config_company_site` varchar(200) NOT NULL,
|
||||
`config_smtp_host` varchar(200) NOT NULL,
|
||||
`config_smtp_username` varchar(200) NOT NULL,
|
||||
`config_smtp_password` varchar(200) NOT NULL,
|
||||
`config_smtp_port` int(200) NOT NULL,
|
||||
`config_mail_from_email` varchar(200) NOT NULL,
|
||||
`config_mail_from_name` varchar(200) NOT NULL,
|
||||
`config_account_balance_threshold` varchar(200) NOT NULL,
|
||||
`config_invoice_logo` varchar(200) NOT NULL,
|
||||
`config_invoice_footer` text NOT NULL,
|
||||
`config_next_invoice_number` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket_updates`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ticket_updates`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ticket_updates` (
|
||||
`ticket_update_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ticket_update` text NOT NULL,
|
||||
`ticket_update_created_at` datetime NOT NULL,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`ticket_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ticket_update_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `tickets`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `tickets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `tickets` (
|
||||
`ticket_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ticket_category` varchar(200) NOT NULL,
|
||||
`ticket_subject` varchar(200) NOT NULL,
|
||||
`ticket_details` text NOT NULL,
|
||||
`ticket_status` varchar(200) NOT NULL,
|
||||
`ticket_created_at` datetime NOT NULL,
|
||||
`ticket_updated_at` datetime NOT NULL,
|
||||
`ticket_closed_at` datetime NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
`vendor_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ticket_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `transfers`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `transfers`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `transfers` (
|
||||
`transfer_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`transfer_amount` decimal(15,2) NOT NULL,
|
||||
`transfer_date` date NOT NULL,
|
||||
`transfer_account_from` int(11) NOT NULL,
|
||||
`transfer_account_to` int(11) NOT NULL,
|
||||
`expense_id` int(11) NOT NULL,
|
||||
`payment_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`transfer_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `users` (
|
||||
`user_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(200) NOT NULL,
|
||||
`email` varchar(200) NOT NULL,
|
||||
`password` varchar(200) NOT NULL,
|
||||
`avatar` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`user_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `vendors`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `vendors`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `vendors` (
|
||||
`vendor_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`vendor_name` varchar(200) NOT NULL,
|
||||
`vendor_description` varchar(200) NOT NULL,
|
||||
`vendor_address` varchar(200) NOT NULL,
|
||||
`vendor_city` varchar(200) NOT NULL,
|
||||
`vendor_state` varchar(200) NOT NULL,
|
||||
`vendor_zip` 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,
|
||||
PRIMARY KEY (`vendor_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!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 */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-05-14 19:02:29
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-file"></i> Edit Invoice</h5>
|
||||
<h5 class="modal-title"><i class="fa fa-file"></i> Edit INV-<?php echo $invoice_number; ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
<?php include("config.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
if(isset($_POST['pay_invoice'])){
|
||||
|
||||
$email = mysqli_real_escape_string($mysqli,$_POST['email']);
|
||||
$password = md5(mysqli_real_escape_string($mysqli,$_POST['password']));
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM users WHERE email = '$email' AND password = '$password'");
|
||||
|
||||
if(mysqli_num_rows($sql) == 1){
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$_SESSION['logged'] = TRUE;
|
||||
$_SESSION['user_id'] = $row['user_id'];
|
||||
$_SESSION['name'] = $row['name'];
|
||||
|
||||
header("Location: $config_start_page");
|
||||
}else{
|
||||
$response = "
|
||||
<div class='alert alert-danger'>
|
||||
Incorrect email or password.
|
||||
<button class='close' data-dismiss='alert'>×</button>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title><?php echo $config_company_name; ?> | Pay Invoice</title>
|
||||
|
||||
<!-- Custom fonts for this template-->
|
||||
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Custom styles for this template-->
|
||||
<link href="css/sb-admin.css" rel="stylesheet">
|
||||
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body class="bg-secondary">
|
||||
|
||||
<div class="container">
|
||||
<div class="card card-login mx-auto mt-5 bg-dark">
|
||||
<div class="card-header mt-2 text-white text-center"><h3>Invoice 103</h3></div>
|
||||
<div class="card-body bg-white">
|
||||
<center class="mb-3">
|
||||
<i class="fab fa-fw fa-3x fa-cc-visa"></i>
|
||||
<i class="fab fa-fw fa-3x fa-cc-mastercard"></i>
|
||||
<i class="fab fa-fw fa-3x fa-cc-discover"></i>
|
||||
<i class="fab fa-fw fa-3x fa-cc-amex"></i>
|
||||
</center>
|
||||
<?php if(isset($response)) { echo $response; } ?>
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label>Name on card</label>
|
||||
<input type="text" name="name" class="form-control" placeholder="" required autofocus="autofocus">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Card number</label>
|
||||
<input type="text" name="card_number" class="form-control" placeholder="" required>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label>Expiration</label>
|
||||
<input type="text" name="expiration" class="form-control" placeholder="MM / YY" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col">
|
||||
<label>Security code</label>
|
||||
<input type="text" name="security_code" class="form-control" placeholder="" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Postal code</label>
|
||||
<input type="text" name="postal_code" class="form-control" placeholder="" required>
|
||||
</div>
|
||||
<button class="btn btn-success btn-block" type="submit" name="pay_invoice">Pay <strong>$100.00</strong></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap core JavaScript-->
|
||||
<script src="vendor/jquery/jquery.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Core plugin JavaScript-->
|
||||
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
|
||||
|
||||
<!-- Prevents resubmit on refresh or back -->
|
||||
<script>
|
||||
|
||||
if ( window.history.replaceState ) {
|
||||
window.history.replaceState( null, null, window.location.href );
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
22
post.php
22
post.php
|
|
@ -310,6 +310,20 @@ if(isset($_GET['delete_calendar_event'])){
|
|||
|
||||
}
|
||||
|
||||
if(isset($_POST['add_ticket'])){
|
||||
|
||||
$client_id = intval($_POST['client']);
|
||||
$subject = strip_tags(mysqli_real_escape_string($mysqli,$_POST['subject']));
|
||||
$details = strip_tags(mysqli_real_escape_string($mysqli,$_POST['details']));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO tickets SET ticket_subject = '$subject', ticket_details = '$details', ticket_status = 'Open', ticket_created_at = NOW(), client_id = $client_id");
|
||||
|
||||
$_SESSION['alert_message'] = "Ticket created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['add_vendor'])){
|
||||
|
||||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
|
|
@ -419,11 +433,15 @@ if(isset($_POST['add_mileage'])){
|
|||
$miles = intval($_POST['miles']);
|
||||
$roundtrip = intval($_POST['roundtrip']);
|
||||
$purpose = strip_tags(mysqli_real_escape_string($mysqli,$_POST['purpose']));
|
||||
$client_id = intval($_POST['client']);
|
||||
$invoice_id = intval($_POST['invoice']);
|
||||
$location_id = intval($_POST['location']);
|
||||
$vendor_id = intval($_POST['vendor']);
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO mileage SET mileage_date = '$date', mileage_starting_location = '$starting_location', mileage_destination = '$destination', mileage_miles = $miles, mileage_purpose = '$purpose'");
|
||||
mysqli_query($mysqli,"INSERT INTO mileage SET mileage_date = '$date', mileage_starting_location = '$starting_location', mileage_destination = '$destination', mileage_miles = $miles, mileage_purpose = '$purpose', client_id = $client_id, invoice_id = $invoice_id, location_id = $location_id, vendor_id = $vendor_id");
|
||||
|
||||
if($roundtrip == 1){
|
||||
mysqli_query($mysqli,"INSERT INTO mileage SET mileage_date = '$date', mileage_starting_location = '$destination', mileage_destination = '$starting_location', mileage_miles = $miles, mileage_purpose = '$purpose'");
|
||||
mysqli_query($mysqli,"INSERT INTO mileage SET mileage_date = '$date', mileage_starting_location = '$destination', mileage_destination = '$starting_location', mileage_miles = $miles, mileage_purpose = '$purpose', client_id = $client_id, invoice_id = $invoice_id, location_id = $location_id, vendor_id = $vendor_id");
|
||||
}
|
||||
|
||||
$_SESSION['alert_message'] = "Mileage added";
|
||||
|
|
|
|||
|
|
@ -21,6 +21,12 @@
|
|||
<span>Calendar</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item <?php if(basename($_SERVER["REQUEST_URI"]) == "tickets.php") { echo "active"; } ?>">
|
||||
<a class="nav-link" href="tickets.php">
|
||||
<i class="fas fa-fw fa-tags mx-2"></i>
|
||||
<span>Tickets</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item <?php if(basename($_SERVER["REQUEST_URI"]) == "products.php") { echo "active"; } ?>">
|
||||
<a class="nav-link" href="products.php">
|
||||
<i class="fas fa-fw fa-box mx-2"></i>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
<?php include("header.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM tickets, clients
|
||||
WHERE tickets.client_id = clients.client_id
|
||||
ORDER BY ticket_id DESC");
|
||||
?>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="float-left mt-2"><i class="fa fa-fw fa-tags mr-2"></i>Tickets</h5>
|
||||
<button type="button" class="btn btn-primary badge-pill float-right" data-toggle="modal" data-target="#addTicketModal"><i class="fas fa-fw fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Client</th>
|
||||
<th>Subject</th>
|
||||
<th>Date Opened</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$ticket_id = $row['ticket_id'];
|
||||
$ticket_subject = $row['ticket_subject'];
|
||||
$ticket_details = $row['ticket_details'];
|
||||
$ticket_status = $row['ticket_status'];
|
||||
$ticket_created_at = $row['ticket_created_at'];
|
||||
$ticket_updated_at = $row['ticket_updated_at'];
|
||||
$ticket_closed_at = $row['ticket_closed_at'];
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
|
||||
if($ticket_status == "Open"){
|
||||
$ticket_badge_color = "primary";
|
||||
}elseif($ticket_status == "Resolved"){
|
||||
$ticket_badge_color = "success";
|
||||
}elseif($ticket_status == "Closed"){
|
||||
$ticket_badge_color = "secondary";
|
||||
}else{
|
||||
$ticket_badge_color = "info";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="#" data-toggle="modal" data-target="#viewTicketModal<?php echo $ticket_id; ?>"><span class="badge badge-pill badge-secondary p-2"><?php echo $ticket_id; ?></span></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td><?php echo $ticket_created_at; ?></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $ticket_badge_color; ?>">
|
||||
<?php echo $ticket_status; ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#viewTicketModal<?php echo $ticket_id; ?>">Details</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editTicketModal<?php echo $ticket_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
include("edit_ticket_modal.php");
|
||||
include("view_ticket_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_ticket_modal.php"); ?>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<div class="modal" id="viewTicketModal<?php echo $ticket_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header text-white">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-tag mr-2"></i>Ticket # <?php echo $ticket_id; ?></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<div class="modal-body bg-white">
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<h4><?php echo $client_name; ?></h4>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<h6>
|
||||
<span class="p-2 float-right badge badge-<?php echo $ticket_badge_color; ?>">
|
||||
<?php echo $ticket_status; ?>
|
||||
</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="text-secondary"><i class="far fa-fw fa-clock"></i> <?php echo $ticket_created_at; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<center><h5><?php echo $ticket_subject; ?></h5></center>
|
||||
<p><?php echo $ticket_details; ?></p>
|
||||
<hr>
|
||||
|
||||
<form>
|
||||
<textarea class="form-control" rows="8" name="details"></textarea>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="button" class="btn btn-success">Resolve</button>
|
||||
<button type="button" class="btn btn-secondary">Close</button>
|
||||
<button type="submit" name="add_ticket" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue