diff --git a/app/Helpers/locale_helper.php b/app/Helpers/locale_helper.php
index fc3ef6b8d..81c4ade51 100644
--- a/app/Helpers/locale_helper.php
+++ b/app/Helpers/locale_helper.php
@@ -186,6 +186,7 @@ function get_timezones(): array
'Asia/Kabul' => '(GMT+04:30) Kabul',
'Asia/Baku' => '(GMT+04:00) Baku',
'Asia/Yekaterinburg' => '(GMT+05:00) Ekaterinburg',
+ 'Asia/Karachi' => '(GMT+05:00) Karachi, Islamabad',
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
'Asia/Kolkata' => '(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi',
'Asia/Katmandu' => '(GMT+05:45) Kathmandu',
diff --git a/app/Language/tl-PH/reports_lang.php b/app/Language/tl-PH/reports_lang.php
index 97358bfdb..b7c99bb86 100644
--- a/app/Language/tl-PH/reports_lang.php
+++ b/app/Language/tl-PH/reports_lang.php
@@ -122,7 +122,7 @@ $lang["reports_suppliers"] = "Suppliers";
$lang["reports_suppliers_summary_report"] = "Suppliers Summary Report";
$lang["reports_tax"] = "Tax";
$lang["reports_tax_category"] = "Tax Category";
-$lang["reports_tax_name"] = "";
+$lang["reports_tax_name"] = "Tax Name";
$lang["reports_tax_percent"] = "Tax Percent";
$lang["reports_tax_rate"] = "Tax Rate";
$lang["reports_taxes"] = "Taxes";
diff --git a/app/Libraries/Token_lib.php b/app/Libraries/Token_lib.php
index c7cb5bf67..fc7863ef4 100644
--- a/app/Libraries/Token_lib.php
+++ b/app/Libraries/Token_lib.php
@@ -14,7 +14,7 @@ class Token_lib
/**
* Expands all the tokens found in a given text string and returns the results.
*/
- public function render(string $tokened_text, array $tokens = []): string
+ public function render(string $tokened_text, array $tokens = [], $save TRUE): string
{
// Apply the transformation for the "%" tokens if any are used
if(strpos($tokened_text, '%') !== FALSE)
@@ -39,7 +39,7 @@ class Token_lib
$token_values = [];
$tokens_to_replace = [];
- $this->generate($token_tree, $tokens_to_replace, $token_values, $tokens);
+ $this->generate($token_tree, $tokens_to_replace, $token_values, $tokens, $save);
return str_replace($tokens_to_replace, $token_values, $tokened_text);
}
@@ -128,12 +128,12 @@ class Token_lib
return $results;
}
- public function generate(array $used_tokens, array &$tokens_to_replace, array &$token_values, array $tokens): array //TODO: $tokens
+ public function generate(array $used_tokens, array &$tokens_to_replace, array &$token_values, array $tokens, $save = TRUE): array //TODO: $tokens
{
foreach($used_tokens as $token_code => $token_info)
{
// Generate value here based on the key value
- $token_value = $this->resolve_token($token_code);
+ $token_value = $this->resolve_token($token_code, array(), $save);
foreach($token_info as $length => $token_spec)
{
@@ -152,13 +152,13 @@ class Token_lib
return $token_values;
}
- private function resolve_token($token_code, array $tokens = []): string
+ private function resolve_token($token_code, array $tokens = [], $save = TRUE): string
{
foreach(array_merge($tokens, Token::get_tokens()) as $token)
{
if($token->token_id() == $token_code)
{
- return $token->get_value();
+ return $token->get_value($save);
}
}
diff --git a/app/Models/Reports/Summary_taxes.php b/app/Models/Reports/Summary_taxes.php
index 1cbb4d0d6..f39a6389d 100644
--- a/app/Models/Reports/Summary_taxes.php
+++ b/app/Models/Reports/Summary_taxes.php
@@ -7,6 +7,7 @@ class Summary_taxes extends Summary_report
protected function _get_data_columns(): array //TODO: hungarian notation
{
return [
+ ['tax_name' => $this->lang->line('reports_tax_name'), 'sortable' => FALSE],
['tax_percent' => lang('Reports.tax_percent'), 'sorter' => 'number_sorter'],
['report_count' => lang('Reports.sales')],
['subtotal' => lang('Reports.subtotal'), 'sorter' => 'number_sorter'],
@@ -64,9 +65,10 @@ class Summary_taxes extends Summary_report
. ' ELSE sales_items.quantity_purchased * (sales_items.item_unit_price - sales_items.discount) END)';
}
- $query = $this->db->query("SELECT percent, COUNT(DISTINCT sale_id) AS count, ROUND(SUM(subtotal), $decimals) AS subtotal, ROUND(SUM(tax), $decimals) AS tax, ROUND(SUM(total), $decimals) AS total
+ $query = $this->db->query("SELECT name as name, percent, COUNT(DISTINCT sale_id) AS count, ROUND(SUM(subtotal), $decimals) AS subtotal, ROUND(SUM(tax), $decimals) AS tax, ROUND(SUM(total), $decimals) AS total
FROM (
SELECT
+ name AS name,
CONCAT(IFNULL(ROUND(percent, $decimals), 0), '%') AS percent,
sales.sale_id AS sale_id,
$sale_subtotal AS subtotal,
diff --git a/app/Views/configs/info_config.php b/app/Views/configs/info_config.php
index 1b4b8faac..51641ce29 100644
--- a/app/Views/configs/info_config.php
+++ b/app/Views/configs/info_config.php
@@ -147,7 +147,7 @@ $(document).ready(function()
{
$("a.fileinput-exists").click(function() {
$.ajax({
- type: 'GET',
+ type: 'POST',
url: '',
dataType: 'json'
})
diff --git a/app/Views/expenses/manage.php b/app/Views/expenses/manage.php
index 71f76610f..cf56f5317 100644
--- a/app/Views/expenses/manage.php
+++ b/app/Views/expenses/manage.php
@@ -33,6 +33,7 @@ $(document).ready(function()
if($("#table tbody tr").length > 1) {
$("#payment_summary").html(response.payment_summary);
$("#table tbody tr:last td:first").html("");
+ $("#table tbody tr:last").css('font-weight', 'bold');
}
},
queryParams: function() {
diff --git a/app/Views/login.php b/app/Views/login.php
index 46431918e..ab69faba4 100644
--- a/app/Views/login.php
+++ b/app/Views/login.php
@@ -65,7 +65,7 @@