diff --git a/html/bts_client_invoice_template.html b/html/bts_client_invoice_template.html
index d2e813c..b40e7c4 100644
--- a/html/bts_client_invoice_template.html
+++ b/html/bts_client_invoice_template.html
@@ -60,7 +60,8 @@
-
+
+
|
{{/has_summary}}
@@ -70,7 +71,8 @@
{{tos}} |
{{ndis}} |
{{Hours}} |
- |
+ {{unitprice}} |
+ {{tos_total}} |
|
{{/summary}}
@@ -80,7 +82,8 @@
-
+
+
|
|
diff --git a/ts.php b/ts.php
index 83f59af..ee2c0b5 100644
--- a/ts.php
+++ b/ts.php
@@ -1465,17 +1465,23 @@ ZOT;
{
$response['nojob'] = true;
}
-
+ $response['overall_total'] = 0;
foreach ($summary as $key => $val)
{
+ $unitprice = $price->get_tos_price($key);
+ $tos_total = $val * $price->get_tos_price($key);
+ $response['overall_total'] += $tos_total;
$response['summary'][] = array(
'ndis' => $key,
'tos' => $price->get_tos_full_str($key),
+ 'unitprice'=> $unitprice,
'Hours'=> sprintf("%0.2f", $val),
+ 'tos_total'=> sprintf("%0.2f", $tos_total),
);
}
if (count($summary) > 0){
$response['has_summary'] = true;
+ $response['overall_total'] = sprintf("%0.2f", $response['overall_total'] );
}
|