mirror of https://github.com/itflow-org/itflow
Fix Regression issues with invoice quote amounts
This commit is contained in:
parent
372afdcc0c
commit
86467bc9c9
|
|
@ -87,7 +87,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
$invoice_status = htmlentities($row['invoice_status']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_created_at = $row['invoice_created_at'];
|
||||
$category_id = $row['category_id'];
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
}
|
||||
$quote_status = htmlentities($row['quote_status']);
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = htmlentities($row['quote_amount']);
|
||||
$quote_amount = floatval($row['quote_amount']);
|
||||
$quote_currency_code = htmlentities($row['quote_currency_code']);
|
||||
$quote_created_at = $row['quote_created_at'];
|
||||
$category_id = $row['category_id'];
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
$recurring_last_sent = "-";
|
||||
}
|
||||
$recurring_next_date = $row['recurring_next_date'];
|
||||
$recurring_amount = htmlentities($row['recurring_amount']);
|
||||
$recurring_amount = floatval($row['recurring_amount']);
|
||||
$recurring_currency_code = htmlentities($row['recurring_currency_code']);
|
||||
$recurring_created_at = $row['recurring_created_at'];
|
||||
$category_id = $row['category_id'];
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
|
|||
$invoice_status = htmlentities($row['invoice_status']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_note = htmlentities($row['invoice_note']);
|
||||
$invoice_category_id = $row['invoice_category_id'];
|
||||
|
|
@ -218,11 +218,11 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
|
|||
$item_id = $row['item_id'];
|
||||
$item_name = htmlentities($row['item_name']);
|
||||
$item_description = htmlentities($row['item_description']);
|
||||
$item_quantity = $row['item_quantity'];
|
||||
$item_price = $row['item_price'];
|
||||
$item_subtotal = $row['item_price'];
|
||||
$item_tax = $row['item_tax'];
|
||||
$item_total = $row['item_total'];
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_subtotal = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
$sub_total = $item_price * $item_quantity + $sub_total;
|
||||
|
||||
|
|
@ -748,7 +748,7 @@ var docDefinition = {
|
|||
$invoice_number = htmlentities($row['invoice_number']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_url_key = htmlentities($row['invoice_url_key']);
|
||||
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
|
||||
|
|
@ -808,7 +808,7 @@ var docDefinition = {
|
|||
$invoice_number = htmlentities($row['invoice_number']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_url_key = htmlentities($row['invoice_url_key']);
|
||||
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
|
||||
|
|
@ -869,7 +869,7 @@ var docDefinition = {
|
|||
$invoice_number = htmlentities($row['invoice_number']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_url_key = htmlentities($row['invoice_url_key']);
|
||||
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
|
||||
|
|
@ -894,7 +894,7 @@ var docDefinition = {
|
|||
while($row = mysqli_fetch_array($sql_payments)){
|
||||
$payment_id = $row['payment_id'];
|
||||
$payment_date = $row['payment_date'];
|
||||
$payment_amount = htmlentities($row['payment_amount']);
|
||||
$payment_amount = floatval($row['payment_amount']);
|
||||
$payment_currency_code = htmlentities($row['payment_currency_code']);
|
||||
$payment_method = htmlentities($row['payment_method']);
|
||||
$payment_reference = htmlentities($row['payment_reference']);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
|
|||
$quote_number = htmlentities($row['quote_number']);
|
||||
$quote_status = htmlentities($row['quote_status']);
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = htmlentities($row['quote_amount']);
|
||||
$quote_amount = floatval($row['quote_amount']);
|
||||
$quote_currency_code = htmlentities($row['quote_currency_code']);
|
||||
$quote_note = htmlentities($row['quote_note']);
|
||||
$category_id = $row['category_id'];
|
||||
|
|
@ -172,11 +172,10 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
|
|||
$item_id = $row['item_id'];
|
||||
$item_name = htmlentities($row['item_name']);
|
||||
$item_description = htmlentities($row['item_description']);
|
||||
$item_quantity = $row['item_quantity'];
|
||||
$item_price = $row['item_price'];
|
||||
$item_subtotal = $row['item_price'];
|
||||
$item_tax = $row['item_tax'];
|
||||
$item_total = $row['item_total'];
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
$sub_total = $item_price * $item_quantity + $sub_total;
|
||||
|
||||
|
|
|
|||
13
invoice.php
13
invoice.php
|
|
@ -26,7 +26,7 @@ if(isset($_GET['invoice_id'])){
|
|||
$invoice_status = htmlentities($row['invoice_status']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_note = htmlentities($row['invoice_note']);
|
||||
$invoice_url_key = htmlentities($row['invoice_url_key']);
|
||||
|
|
@ -259,11 +259,10 @@ if(isset($_GET['invoice_id'])){
|
|||
$item_id = $row['item_id'];
|
||||
$item_name = htmlentities($row['item_name']);
|
||||
$item_description = htmlentities($row['item_description']);
|
||||
$item_quantity = htmlentities($row['item_quantity']);
|
||||
$item_price = htmlentities($row['item_price']);
|
||||
$item_subtotal = htmlentities($row['item_price']);
|
||||
$item_tax = htmlentities($row['item_tax']);
|
||||
$item_total = htmlentities($row['item_total']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
$item_created_at = $row['item_created_at'];
|
||||
$tax_id = $row['item_tax_id'];
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
|
|
@ -459,7 +458,7 @@ if(isset($_GET['invoice_id'])){
|
|||
while($row = mysqli_fetch_array($sql_payments)){
|
||||
$payment_id = $row['payment_id'];
|
||||
$payment_date = $row['payment_date'];
|
||||
$payment_amount = htmlentities($row['payment_amount']);
|
||||
$payment_amount = floatval($row['payment_amount']);
|
||||
$payment_currency_code = htmlentities($row['payment_currency_code']);
|
||||
$payment_reference = htmlentities($row['payment_reference']);
|
||||
$account_name = htmlentities($row['account_name']);
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@
|
|||
$invoice_status = htmlentities($row['invoice_status']);
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = htmlentities($row['invoice_amount']);
|
||||
$invoice_amount = floatval($row['invoice_amount']);
|
||||
$invoice_currency_code = htmlentities($row['invoice_currency_code']);
|
||||
$invoice_created_at = $row['invoice_created_at'];
|
||||
$client_id = $row['client_id'];
|
||||
|
|
|
|||
11
quote.php
11
quote.php
|
|
@ -21,7 +21,7 @@ if(isset($_GET['quote_id'])){
|
|||
$quote_scope = htmlentities($row['quote_scope']);
|
||||
$quote_status = htmlentities($row['quote_status']);
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = htmlentities($row['quote_amount']);
|
||||
$quote_amount = floatval($row['quote_amount']);
|
||||
$quote_currency_code = htmlentities($row['quote_currency_code']);
|
||||
$quote_note = htmlentities($row['quote_note']);
|
||||
$quote_url_key = htmlentities($row['quote_url_key']);
|
||||
|
|
@ -223,11 +223,10 @@ if(isset($_GET['quote_id'])){
|
|||
$item_id = $row['item_id'];
|
||||
$item_name = htmlentities($row['item_name']);
|
||||
$item_description = htmlentities($row['item_description']);
|
||||
$item_quantity = htmlentities($row['item_quantity']);
|
||||
$item_price = htmlentities($row['item_price']);
|
||||
$item_subtotal = htmlentities($row['item_price']);
|
||||
$item_tax = htmlentities($row['item_tax']);
|
||||
$item_total = htmlentities($row['item_total']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
$item_created_at = $row['item_created_at'];
|
||||
$tax_id = $row['item_tax_id'];
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
}
|
||||
$quote_status = htmlentities($row['quote_status']);
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = htmlentities($row['quote_amount']);
|
||||
$quote_amount = floatval($row['quote_amount']);
|
||||
$quote_currency_code = htmlentities($row['quote_currency_code']);
|
||||
$quote_created_at = $row['quote_created_at'];
|
||||
$client_id = $row['client_id'];
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if(isset($_GET['recurring_id'])){
|
|||
$recurring_last_sent = '-';
|
||||
}
|
||||
$recurring_next_date = $row['recurring_next_date'];
|
||||
$recurring_amount = htmlentities($row['recurring_amount']);
|
||||
$recurring_amount = float($row['recurring_amount']);
|
||||
$recurring_currency_code = htmlentities($row['recurring_currency_code']);
|
||||
$recurring_note = htmlentities($row['recurring_note']);
|
||||
$recurring_created_at = $row['recurring_created_at'];
|
||||
|
|
@ -194,11 +194,10 @@ if(isset($_GET['recurring_id'])){
|
|||
$item_id = $row['item_id'];
|
||||
$item_name = htmlentities($row['item_name']);
|
||||
$item_description = htmlentities($row['item_description']);
|
||||
$item_quantity = htmlentities($row['item_quantity']);
|
||||
$item_price = htmlentities($row['item_price']);
|
||||
$item_subtotal = htmlentities($row['item_price']);
|
||||
$item_tax = htmlentities($row['item_tax']);
|
||||
$item_total = htmlentities($row['item_total']);
|
||||
$item_quantity = floatval($row['item_quantity']);
|
||||
$item_price = floatval($row['item_price']);
|
||||
$item_tax = floatval($row['item_tax']);
|
||||
$item_total = floatval($row['item_total']);
|
||||
$item_created_at = $row['item_created_at'];
|
||||
$tax_id = $row['item_tax_id'];
|
||||
$total_tax = $item_tax + $total_tax;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
$recurring_last_sent = "-";
|
||||
}
|
||||
$recurring_next_date = $row['recurring_next_date'];
|
||||
$recurring_amount = htmlentities($row['recurring_amount']);
|
||||
$recurring_amount = floatval($row['recurring_amount']);
|
||||
$recurring_currency_code = htmlentities($row['recurring_currency_code']);
|
||||
$recurring_created_at = $row['recurring_created_at'];
|
||||
$client_id = $row['client_id'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue