continue last commit into add payment and edit items in invoice quotes and recurring

This commit is contained in:
johnny@pittpc.com 2021-02-07 14:12:43 -05:00
parent 274e1dc9e8
commit 0b0ccddd89
7 changed files with 9 additions and 6 deletions

View File

@ -53,7 +53,7 @@
<option value="">- Account -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $session_company_id ORDER BY account_name ASC");
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE account_archived_at IS NULL AND company_id = $session_company_id ORDER BY account_name ASC");
while($row = mysqli_fetch_array($sql)){
$account_id = $row['account_id'];
$account_name = $row['account_name'];
@ -93,7 +93,7 @@
<option value="">- Method of Payment -</option>
<?php
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method' AND company_id = $session_company_id ORDER BY category_name ASC");
$sql = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_type = 'Payment Method' AND category_archived_at IS NULL AND company_id = $session_company_id ORDER BY category_name ASC");
while($row = mysqli_fetch_array($sql)){
$category_name = $row['category_name'];
?>

View File

@ -70,7 +70,7 @@
<option value="0">None</option>
<?php
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session_company_id ORDER BY tax_name ASC");
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE (tax_archived_at > '$item_created_at' OR tax_archived_at IS NULL) AND company_id = $session_company_id ORDER BY tax_name ASC");
while($row = mysqli_fetch_array($taxes_sql)){
$tax_id_select = $row['tax_id'];
$tax_name = $row['tax_name'];

View File

@ -71,7 +71,7 @@
<option value="0">None</option>
<?php
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session_company_id ORDER BY tax_name ASC");
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE (tax_archived_at > '$item_created_at' OR tax_archived_at IS NULL) AND company_id = $session_company_id ORDER BY tax_name ASC");
while($row = mysqli_fetch_array($taxes_sql)){
$tax_id_select = $row['tax_id'];
$tax_name = $row['tax_name'];

View File

@ -71,7 +71,7 @@
<option value="0.00">None</option>
<?php
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session_company_id ORDER BY tax_name ASC");
$taxes_sql = mysqli_query($mysqli,"SELECT * FROM taxes WHERE (tax_archived_at > '$item_created_at' OR tax_archived_at IS NULL) AND company_id = $session_company_id ORDER BY tax_name ASC");
while($row = mysqli_fetch_array($taxes_sql)){
$tax_id_select = $row['tax_id'];
$tax_name = $row['tax_name'];

View File

@ -251,6 +251,7 @@ if(isset($_GET['invoice_id'])){
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$item_created_at = $row['item_created_at'];
$tax_id = $row['tax_id'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;

View File

@ -215,6 +215,7 @@ if(isset($_GET['quote_id'])){
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$item_created_at = $row['item_created_at'];
$tax_id = $row['tax_id'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;

View File

@ -98,7 +98,7 @@ if(isset($_GET['recurring_id'])){
<button class="btn btn-primary btn-sm float-right" type="button" data-toggle="dropdown">
<i class="fas fa-ellipsis-h"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<div class="dropdown-menu">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editRecurringModal<?php echo $recurring_id; ?>">Edit</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="post.php?force_recurring=<?php echo $recurring_id; ?>">Force Send</a>
@ -195,6 +195,7 @@ if(isset($_GET['recurring_id'])){
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$item_created_at = $row['item_created_at'];
$tax_id = $row['tax_id'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;