- = lang('Sales.payment') ?>
+ = lang(ucfirst($controller_name) .'.payment') ?>
= form_dropdown('payment_type', $payment_options, $selected_payment_type, ['id' => 'payment_types', 'class' => 'selectpicker show-menu-arrow', 'data-style' => 'btn-default btn-sm', 'data-width' => 'fit', 'disabled' => 'disabled']) ?>
- = lang('Sales.amount_tendered') ?>
+ = lang(ucfirst($controller_name) .'.amount_tendered') ?>
= form_input (['name' => 'amount_tendered', 'id' => 'amount_tendered', 'class' => 'form-control input-sm disabled', 'disabled' => 'disabled', 'value' => '0', 'size' => '5', 'tabindex' => ++$tabindex, 'onClick' => 'this.select();']) ?>
@@ -533,7 +533,7 @@ if(isset($success))
{
foreach($payments as $payment_id => $payment)
{
- if($payment['payment_type'] == lang('Sales.due'))
+ if($payment['payment_type'] == lang(ucfirst($controller_name) .'.due'))
{
$due_payment = true;
}
@@ -543,7 +543,7 @@ if(isset($success))
if(!$due_payment || ($due_payment && isset($customer))) //TODO: $due_payment is not needed because the first clause insures that it will always be true if it gets to this point. Can be shortened to if(!$due_payment || isset($customer))
{
?>
-   = lang('Sales.complete_sale') ?>
+   = lang(ucfirst($controller_name) .'.complete_sale') ?>
'add_payment_form', 'class' => 'form-horizontal']) ?>
- = lang('Sales.payment') ?>
+ = lang(ucfirst($controller_name) .'.payment') ?>
= form_dropdown('payment_type', $payment_options, $selected_payment_type, ['id' => 'payment_types', 'class' => 'selectpicker show-menu-arrow', 'data-style' => 'btn-default btn-sm', 'data-width' => 'fit']) ?>
- = lang('Sales.amount_tendered') ?>
+ = lang(ucfirst($controller_name) .'.amount_tendered') ?>
= form_input (['name' => 'amount_tendered', 'id' => 'amount_tendered', 'class' => 'form-control input-sm non-giftcard-input', 'value' => to_currency_no_money($amount_due), 'size' => '5', 'tabindex' => ++$tabindex, 'onClick' => 'this.select();']) ?>
= form_input (['name' => 'amount_tendered', 'id' => 'amount_tendered', 'class' => 'form-control input-sm giftcard-input', 'disabled' => true, 'value' => to_currency_no_money($amount_due), 'size' => '5', 'tabindex' => ++$tabindex]) ?>
@@ -571,7 +571,7 @@ if(isset($success))
= form_close() ?>
-   = lang('Sales.add_payment') ?>
+   = lang(ucfirst($controller_name) .'.add_payment') ?>
@@ -585,8 +585,8 @@ if(isset($success))
= lang('Common.delete') ?>
- = lang('Sales.payment_type') ?>
- = lang('Sales.payment_amount') ?>
+ = lang(ucfirst($controller_name) .'.payment_type') ?>
+ = lang(ucfirst($controller_name) .'.payment_amount') ?>
@@ -612,7 +612,7 @@ if(isset($success))
= form_open(esc("$controller_name/cancel"), ['id' => 'buttons_form']) ?>
= form_close() ?>
@@ -646,7 +646,7 @@ if(isset($success))
= form_checkbox (['name' => 'sales_print_after_sale', 'id' => 'sales_print_after_sale', 'value' => 1, 'checked' => $print_after_sale]) ?>
- = lang('Sales.print_after_sale') ?>
+ = lang(ucfirst($controller_name) .'.print_after_sale') ?>
@@ -657,7 +657,7 @@ if(isset($success))
= form_checkbox (['name' => 'email_receipt', 'id' => 'email_receipt', 'value'=>1, 'checked' => $email_receipt]) ?>
- = lang('Sales.email_receipt') ?>
+ = lang(ucfirst($controller_name) .'.email_receipt') ?>
= form_checkbox (['name' => 'price_work_orders', 'id' => 'price_work_orders', 'value' => 1, 'checked' => $price_work_orders]) ?>
- = lang('Sales.include_prices') ?>
+ = lang(ucfirst($controller_name) .'.include_prices') ?>
- = lang('Sales.invoice_enable') ?>
+ = lang(ucfirst($controller_name) .'.invoice_enable') ?>
@@ -779,7 +779,7 @@ $(document).ready(function()
$('#item').focus();
$('#item').blur(function() {
- $(this).val("= lang('Sales.start_typing_item_name') ?>");
+ $(this).val("= lang(ucfirst($controller_name) .'.start_typing_item_name') ?>");
});
$('#item').autocomplete( {
@@ -802,7 +802,7 @@ $(document).ready(function()
});
var clear_fields = function() {
- if($(this).val().match("= lang('Sales.start_typing_item_name') . '|' . lang('Sales.start_typing_customer_name') ?>"))
+ if($(this).val().match("= lang(ucfirst($controller_name) .'.start_typing_item_name') . '|' . lang(ucfirst($controller_name) .'.start_typing_customer_name') ?>"))
{
$(this).val('');
}
@@ -813,7 +813,7 @@ $(document).ready(function()
});
$('#customer').blur(function() {
- $(this).val("= lang('Sales.start_typing_customer_name') ?>");
+ $(this).val("= lang(ucfirst($controller_name) .'.start_typing_customer_name') ?>");
});
$('#customer').autocomplete( {
@@ -889,7 +889,7 @@ $(document).ready(function()
});
$('#cancel_sale_button').click(function() {
- if(confirm("= lang('Sales.confirm_cancel_sale') ?>"))
+ if(confirm("= lang(ucfirst($controller_name) .'.confirm_cancel_sale') ?>"))
{
$('#buttons_form').attr('action', "= esc(site_url("$controller_name/cancel"), 'url') ?>");
$('#buttons_form').submit();
@@ -967,21 +967,21 @@ function check_payment_type()
{
var cash_mode = = json_encode($cash_mode) ?>;
- if($("#payment_types").val() == "= lang('Sales.giftcard') ?>")
+ if($("#payment_types").val() == "= lang(ucfirst($controller_name) .'.giftcard') ?>")
{
$("#sale_total").html("= to_currency($total) ?>");
$("#sale_amount_due").html("= to_currency($amount_due) ?>");
- $("#amount_tendered_label").html("= lang('Sales.giftcard_number') ?>");
+ $("#amount_tendered_label").html("= lang(ucfirst($controller_name) .'.giftcard_number') ?>");
$("#amount_tendered:enabled").val('').focus();
$(".giftcard-input").attr('disabled', false);
$(".non-giftcard-input").attr('disabled', true);
$(".giftcard-input:enabled").val('').focus();
}
- else if(($("#payment_types").val() == "= lang('Sales.cash') ?>" && cash_mode == '1'))
+ else if(($("#payment_types").val() == "= lang(ucfirst($controller_name) .'.cash') ?>" && cash_mode == '1'))
{
$("#sale_total").html("= to_currency($non_cash_total) ?>");
$("#sale_amount_due").html("= to_currency($cash_amount_due) ?>");
- $("#amount_tendered_label").html("= lang('Sales.amount_tendered') ?>");
+ $("#amount_tendered_label").html("= lang(ucfirst($controller_name) .'.amount_tendered') ?>");
$("#amount_tendered:enabled").val("= to_currency_no_money($cash_amount_due) ?>");
$(".giftcard-input").attr('disabled', true);
$(".non-giftcard-input").attr('disabled', false);
@@ -990,7 +990,7 @@ function check_payment_type()
{
$("#sale_total").html("= to_currency($non_cash_total) ?>");
$("#sale_amount_due").html("= to_currency($amount_due) ?>");
- $("#amount_tendered_label").html("= lang('Sales.amount_tendered') ?>");
+ $("#amount_tendered_label").html("= lang(ucfirst($controller_name) .'.amount_tendered') ?>");
$("#amount_tendered:enabled").val("= to_currency_no_money($amount_due) ?>");
$(".giftcard-input").attr('disabled', true);
$(".non-giftcard-input").attr('disabled', false);
diff --git a/app/Views/taxes/manage.php b/app/Views/taxes/manage.php
index 00dd4a1e3..7b8bb55eb 100644
--- a/app/Views/taxes/manage.php
+++ b/app/Views/taxes/manage.php
@@ -6,16 +6,16 @@
diff --git a/app/Views/taxes/tax_rates.php b/app/Views/taxes/tax_rates.php
index 231385fea..8689da7f1 100644
--- a/app/Views/taxes/tax_rates.php
+++ b/app/Views/taxes/tax_rates.php
@@ -20,8 +20,8 @@ $(document).ready(function()
' data-href='= esc("$controller_name/view") ?>'
- title='= lang("$controller_name.new") ?>'>
-   = lang("$controller_name.new") ?>
+ title='= lang(ucfirst($controller_name) .".new") ?>'>
+   = lang(ucfirst($controller_name) .".new") ?>