mirror of https://github.com/itflow-org/itflow
Added Notes to Software
This commit is contained in:
parent
ce7c0af00d
commit
47d7515220
|
|
@ -15,6 +15,9 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-notes">Notes</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-login">Login</a>
|
||||
</li>
|
||||
|
|
@ -63,6 +66,12 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-notes">
|
||||
|
||||
<textarea class="form-control" rows="8" name="notes"></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-login">
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ $total_pages = ceil($total_found_rows / 10);
|
|||
$software_name = $row['software_name'];
|
||||
$software_type = $row['software_type'];
|
||||
$software_license = $row['software_license'];
|
||||
$software_notes = $row['software_notes'];
|
||||
|
||||
$sql_login = mysqli_query($mysqli,"SELECT *, AES_DECRYPT(login_password, '$config_aes_key') AS login_password FROM logins WHERE software_id = $software_id");
|
||||
$row = mysqli_fetch_array($sql_login);
|
||||
|
|
|
|||
4
db.sql
4
db.sql
|
|
@ -685,6 +685,7 @@ CREATE TABLE `software` (
|
|||
`software_name` varchar(200) NOT NULL,
|
||||
`software_type` varchar(200) NOT NULL,
|
||||
`software_license` varchar(200) DEFAULT NULL,
|
||||
`software_notes` text DEFAULT NULL,
|
||||
`software_created_at` datetime NOT NULL,
|
||||
`software_updated_at` datetime DEFAULT NULL,
|
||||
`login_id` int(11) DEFAULT NULL,
|
||||
|
|
@ -838,6 +839,7 @@ CREATE TABLE `vendors` (
|
|||
`vendor_website` varchar(200) DEFAULT NULL,
|
||||
`vendor_account_number` varchar(200) DEFAULT NULL,
|
||||
`vendor_notes` text DEFAULT NULL,
|
||||
`vendor_global` tinyint(1) DEFAULT NULL,
|
||||
`vendor_created_at` datetime NOT NULL,
|
||||
`vendor_updated_at` datetime DEFAULT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
|
|
@ -855,4 +857,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2020-02-03 13:54:11
|
||||
-- Dump completed on 2020-02-24 16:59:52
|
||||
|
|
|
|||
|
|
@ -14,10 +14,13 @@
|
|||
|
||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-software-tab<?php echo $software_id; ?>" data-toggle="pill" href="#pills-software<?php echo $software_id; ?>">Software</a>
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-details<?php echo $software_id; ?>">Details</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-login-tab<?php echo $software_id; ?>" data-toggle="pill" href="#pills-login<?php echo $software_id; ?>">Login</a>
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-notes<?php echo $software_id; ?>">Notes</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-login<?php echo $software_id; ?>">Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -25,10 +28,10 @@
|
|||
|
||||
<div class="tab-content" id="pills-tabContent<?php echo $software_id; ?>">
|
||||
|
||||
<div class="tab-pane fade show active" id="pills-software<?php echo $software_id; ?>">
|
||||
<div class="tab-pane fade show active" id="pills-details<?php echo $software_id; ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Application Name <strong class="text-danger">*</strong></label>
|
||||
<label>Software Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
|
||||
|
|
@ -63,6 +66,12 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-notes<?php echo $software_id; ?>">
|
||||
|
||||
<textarea class="form-control" rows="8" name="notes"><?php echo $software_notes; ?></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-login<?php echo $software_id; ?>">
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
|
|||
?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header d-print-none">
|
||||
<div class="card-header bg-light d-print-none">
|
||||
<div class="float-right">
|
||||
<a class="btn btn-secondary" data-toggle="collapse" href="#collapsePreviousInvoices"><i class="fa fa-fw fa-history"></i> Invoice History</a>
|
||||
<a class="btn btn-primary" href="#" onclick="window.print();"><i class="fa fa-fw fa-print"></i> Print</a>
|
||||
|
|
@ -283,7 +283,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
|
|||
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id AND invoice_id <> $invoice_id AND (invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') ORDER BY invoice_date DESC");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id AND invoice_due < CURDATE() AND(invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') ORDER BY invoice_date DESC");
|
||||
|
||||
if(mysqli_num_rows($sql) > 1){
|
||||
|
||||
|
|
@ -339,6 +339,65 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
|
|||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id AND invoice_due > CURDATE() AND(invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') ORDER BY invoice_date DESC");
|
||||
|
||||
if(mysqli_num_rows($sql) > 1){
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="card d-print-none card-light">
|
||||
<div class="card-header">
|
||||
<strong><i class="fa fa-fw fa-clock"></i> Current Invoices</strong>
|
||||
</div>
|
||||
<div card="card-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Invoice #</th>
|
||||
<th>Date</th>
|
||||
<th>Due</th>
|
||||
<th class="text-right">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$invoice_id = $row['invoice_id'];
|
||||
$invoice_number = $row['invoice_number'];
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = $row['invoice_amount'];
|
||||
$invoice_url_key = $row['invoice_url_key'];
|
||||
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
|
||||
$difference = strtotime($invoice_due) - time();
|
||||
$days = floor($difference / (60*60*24) );
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th class="text-center"><a href="guest_view_invoice.php?invoice_id=<?php echo $invoice_id; ?>&url_key=<?php echo $invoice_url_key; ?>"><?php echo $invoice_number; ?></a></th>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><?php echo $invoice_due; ?> (Due in <?php echo $days; ?> Days)</td>
|
||||
<td class="text-right text-monospace">$<?php echo $invoice_amount; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id AND invoice_status = 'Paid' ORDER BY invoice_date DESC");
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ if(isset($_GET['invoice_id'])){
|
|||
<?php include("add_payment_modal.php"); ?>
|
||||
<?php include("add_invoice_copy_modal.php"); ?>
|
||||
<?php include("add_invoice_recurring_modal.php"); ?>
|
||||
<?php include("edit_invoice_modal.php"); ?>
|
||||
<?php include("invoice_note_modal.php"); ?>
|
||||
<?php
|
||||
}
|
||||
|
|
|
|||
6
post.php
6
post.php
|
|
@ -3471,8 +3471,9 @@ if(isset($_POST['add_software'])){
|
|||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
$type = strip_tags(mysqli_real_escape_string($mysqli,$_POST['type']));
|
||||
$license = strip_tags(mysqli_real_escape_string($mysqli,$_POST['license']));
|
||||
$notes = strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes']));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO software SET software_name = '$name', software_type = '$type', software_license = '$license', software_created_at = NOW(), client_id = $client_id, company_id = $session_company_id");
|
||||
mysqli_query($mysqli,"INSERT INTO software SET software_name = '$name', software_type = '$type', software_license = '$license', software_notes = '$notes', software_created_at = NOW(), client_id = $client_id, company_id = $session_company_id");
|
||||
|
||||
if(!empty($_POST['username'])) {
|
||||
$software_id = mysqli_insert_id($mysqli);
|
||||
|
|
@ -3499,10 +3500,11 @@ if(isset($_POST['edit_software'])){
|
|||
$name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
|
||||
$type = strip_tags(mysqli_real_escape_string($mysqli,$_POST['type']));
|
||||
$license = strip_tags(mysqli_real_escape_string($mysqli,$_POST['license']));
|
||||
$notes = strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes']));
|
||||
$username = strip_tags(mysqli_real_escape_string($mysqli,$_POST['username']));
|
||||
$password = strip_tags(mysqli_real_escape_string($mysqli,$_POST['password']));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE software SET software_name = '$name', software_type = '$type', software_license = '$license', software_updated_at = NOW() WHERE software_id = $software_id AND company_id = $session_company_id");
|
||||
mysqli_query($mysqli,"UPDATE software SET software_name = '$name', software_type = '$type', software_license = '$license', software_notes = '$notes', software_updated_at = NOW() WHERE software_id = $software_id AND company_id = $session_company_id");
|
||||
|
||||
//If login exists then update the login
|
||||
if($login_id > 0){
|
||||
|
|
|
|||
Loading…
Reference in New Issue