mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-10 09:59:08 -04:00
Removed problematic calls to site_url function.
This commit is contained in:
@@ -33,7 +33,7 @@ function show_report(string $report_prefix, string $report_name, string $lang_ke
|
||||
if(!empty($report_label) && $report_label != $lang_key . ' (TBD)') //TODO: String Interpolation. Also !==
|
||||
{//TODO: Is there a better way to do this? breaking the php like this makes it more difficult to read.
|
||||
?>
|
||||
<a class="list-group-item" href="<?= site_url("reports/$report_prefix" . preg_replace('/reports_(.*)/', '$1', $report_name)) ?>"><?= $report_label; ?></a>
|
||||
<a class="list-group-item" href="<?= "reports/$report_prefix" . preg_replace('/reports_(.*)/', '$1', $report_name) ?>"><?= $report_label; ?></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ $(document).ready(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$.post('<?php echo esc(site_url("$controller_name/delete_attribute_value/"), 'url') ?>', {definition_id: definition_id, attribute_value: value});
|
||||
$.post('<?php echo esc("$controller_name/delete_attribute_value/") ?>', {definition_id: definition_id, attribute_value: value});
|
||||
}
|
||||
$(this).parents("li").remove();
|
||||
};
|
||||
@@ -210,7 +210,7 @@ $(document).ready(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$.post('<?php echo site_url("attributes/save_attribute_value/") ?>', {definition_id: definition_id, attribute_value: value});
|
||||
$.post('<?php echo "attributes/save_attribute_value/" ?>', {definition_id: definition_id, attribute_value: value});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit('<?php echo esc(site_url($controller_name), 'url') ?>', response);
|
||||
table_support.handle_submit('<?php echo esc($controller_name) ?>', response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ foreach($definition_values as $definition_id => $definition_value)
|
||||
$("input[name='attribute_ids[" + definition_id + "]']").val('');
|
||||
}).autocomplete({
|
||||
source: function(request, response) {
|
||||
$.get('<?php echo site_url('attributes/suggest_attribute/') ?>' + this.element.data('definition-id') + '?term=' + request.term, function(data) {
|
||||
$.get('<?php echo 'attributes/suggest_attribute/' ?>' + this.element.data('definition-id') + '?term=' + request.term, function(data) {
|
||||
return response(data);
|
||||
}, 'json');
|
||||
},
|
||||
@@ -125,7 +125,7 @@ foreach($definition_values as $definition_id => $definition_value)
|
||||
var definition_id = $("#definition_name option:selected").val();
|
||||
var attribute_values = definition_values();
|
||||
attribute_values[definition_id] = '';
|
||||
$('#attributes').load('<?php echo esc(site_url("items/attributes/$item_id"), 'url') ?>', {
|
||||
$('#attributes').load('<?php echo esc("items/attributes/$item_id") ?>', {
|
||||
'definition_ids': JSON.stringify(attribute_values)
|
||||
}, enable_delete);
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div id="title_bar" class="btn-toolbar print_hide">
|
||||
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url($controller_name."/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc($controller_name."/view") ?>'
|
||||
title='<?php echo lang($controller_name . '.new') ?>'>
|
||||
<span class="glyphicon glyphicon-star"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
</button>
|
||||
|
||||
@@ -310,7 +310,7 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
$('#open_amount_cash, #transfer_amount_cash, #closed_amount_cash, #closed_amount_due, #closed_amount_card, #closed_amount_check').keyup(function() {
|
||||
$.post("<?php echo esc(site_url("$controller_name/ajax_cashup_total"), 'url') ?>", {
|
||||
$.post("<?php echo esc("$controller_name/ajax_cashup_total") ?>", {
|
||||
'open_amount_cash': $('#open_amount_cash').val(),
|
||||
'transfer_amount_cash': $('#transfer_amount_cash').val(),
|
||||
'closed_amount_due': $('#closed_amount_due').val(),
|
||||
@@ -332,7 +332,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit('<?php echo esc(site_url('cashups'), 'url') ?>', response);
|
||||
table_support.handle_submit('<?php echo esc('cashups') ?>', response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -46,8 +46,8 @@ $(document).ready(function()
|
||||
<button onclick="javascript:printdoc()" class='btn btn-info btn-sm pull-right'>
|
||||
<span class="glyphicon glyphicon-print"> </span><?php echo lang('Common.print') ?>
|
||||
</button>
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo site_url($controller_name."/view") //TODO: String Interpolation ?>'
|
||||
title='<?php echo lang(esc($controller_name) . '.new') //TODO: String Interpolation?>'>
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo "$controller_name/view" ?>'
|
||||
title='<?php echo lang("$controller_name.new") ?>'>
|
||||
<span class="glyphicon glyphicon-tags"> </span><?php echo lang(esc($controller_name) . '.new') //TODO: String Interpolation ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -473,12 +473,12 @@ $(document).ready(function()
|
||||
lines_per_page:
|
||||
{
|
||||
required: true,
|
||||
remote: "<?php echo esc(site_url("$controller_name/check_numeric"), 'url') ?>"
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
},
|
||||
default_sales_discount:
|
||||
{
|
||||
required: true,
|
||||
remote: "<?php echo esc(site_url("$controller_name/check_numeric"), 'url') ?>"
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
},
|
||||
gcaptcha_site_key:
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ $(document).ready(function()
|
||||
$("a.fileinput-exists").click(function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '<?php echo site_url("$controller_name/remove_logo"); ?>',
|
||||
url: '<?php echo "$controller_name/remove_logo"; ?>',
|
||||
dataType: 'json'
|
||||
})
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#mailchimp_api_key').change(function() {
|
||||
$.post("<?php echo esc(site_url($controller_name . '/ajax_check_mailchimp_api_key'), 'url') ?>", {
|
||||
$.post("<?php echo esc("$controller_name/ajax_check_mailchimp_api_key"), ?>", {
|
||||
'mailchimp_api_key': $('#mailchimp_api_key').val()
|
||||
},
|
||||
function(response) {
|
||||
|
||||
@@ -122,7 +122,7 @@ $(document).ready(function()
|
||||
},
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#customer_rewards").load('<?php echo site_url("config/ajax_customer_rewards") ?>', init_add_remove_tables);
|
||||
$("#customer_rewards").load('<?php echo "config/ajax_customer_rewards" ?>', init_add_remove_tables);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -80,7 +80,7 @@ $(document).ready(function()
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#stock_locations").load('<?php echo site_url("config/ajax_stock_locations") ?>', init_add_remove_locations);
|
||||
$("#stock_locations").load('<?php echo "config/ajax_stock_locations" ?>', init_add_remove_locations);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ $(document).ready(function()
|
||||
},
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#dinner_tables").load('<?php echo esc(site_url("config/ajax_dinner_tables"), 'url') ?>', init_add_remove_tables);
|
||||
$("#dinner_tables").load('<?php echo esc("config/ajax_dinner_tables") ?>', init_add_remove_tables);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -159,11 +159,11 @@ $(document).ready(function()
|
||||
{
|
||||
default_tax_1_rate:
|
||||
{
|
||||
remote: "<?php echo esc(site_url("$controller_name/check_numeric"), 'url') ?>"
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
},
|
||||
default_tax2_rate:
|
||||
{
|
||||
remote: "<?php echo esc(site_url("$controller_name/check_numeric"), 'url') ?>"
|
||||
remote: "<?php echo esc("$controller_name/checkNumeric") ?>"
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
@@ -226,7 +226,7 @@ $(document).ready(function()
|
||||
|
||||
required: true,
|
||||
minlength: 5,
|
||||
remote: '<?php echo esc(site_url("$controller_name/check_username/$employee_id"), 'url') ?>'
|
||||
remote: '<?php echo esc("$controller_name/check_username/$employee_id") ?>'
|
||||
},
|
||||
password:
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ $(document).ready(function()
|
||||
|
||||
var amount_validator = function(field) {
|
||||
return {
|
||||
url: "<?php echo esc(site_url("$controller_name/ajax_check_amount"), 'url') ?>",
|
||||
url: "<?php echo esc("$controller_name/ajax_check_amount") ?>",
|
||||
type: 'POST',
|
||||
dataFilter: function(data) {
|
||||
var response = JSON.parse(data);
|
||||
@@ -226,7 +226,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ $(document).ready(function()
|
||||
<button onclick="javascript:printdoc()" class='btn btn-info btn-sm pull-right'>
|
||||
<span class="glyphicon glyphicon-print"> </span><?php echo lang('Common.print') ?>
|
||||
</button>
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url("$controller_name/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc("$controller_name/view") ?>'
|
||||
title='<?php echo lang($controller_name . 'new') ?>'>
|
||||
<span class="glyphicon glyphicon-tags"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
</button>
|
||||
|
||||
@@ -47,7 +47,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<div id="title_bar" class="btn-toolbar">
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url("$controller_name/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc("$controller_name/view") ?>'
|
||||
title='<?php echo lang($controller_name . '.new') ?>'>
|
||||
<span class="glyphicon glyphicon-list"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
</button>
|
||||
|
||||
@@ -83,7 +83,7 @@ $(document).ready(function()
|
||||
};
|
||||
|
||||
$('#person_name').autocomplete({
|
||||
source: "<?php echo esc(site_url('customers/suggest'), 'url') ?>",
|
||||
source: "<?php echo esc("customers/suggest") ?>",
|
||||
minChars: 0,
|
||||
delay: 15,
|
||||
cacheLength: 1,
|
||||
@@ -98,11 +98,11 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", {message: errorThrown});
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", {message: errorThrown});
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
@@ -129,7 +129,7 @@ $(document).ready(function()
|
||||
required: true,
|
||||
remote:
|
||||
{
|
||||
url: "<?php echo esc(site_url("$controller_name/ajax_check_number_giftcard"), 'url') ?>",
|
||||
url: "<?php echo esc("$controller_name/ajax_check_number_giftcard") ?>",
|
||||
type: 'POST',
|
||||
data: {
|
||||
'amount': $('#giftcard_amount').val()
|
||||
|
||||
@@ -19,7 +19,7 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<div id="title_bar" class="btn-toolbar">
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url("$controller_name/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc("$controller_name/view") ?>'
|
||||
title='<?php echo lang($controller_name . '.new') ?>'>
|
||||
<span class="glyphicon glyphicon-heart"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
</button>
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#item').autocomplete({
|
||||
source: "<?php echo site_url('items/suggest') ?>",
|
||||
source: '<?php echo "items/suggest" ?>',
|
||||
minChars: 0,
|
||||
autoFocus: false,
|
||||
delay: 10,
|
||||
@@ -253,7 +253,7 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$('#item_name').autocomplete({
|
||||
source: "<?php echo site_url('items/suggest_kits') ?>",
|
||||
source: "<?php echo 'items/suggest_kits' ?>",
|
||||
minChars: 0,
|
||||
delay: 15,
|
||||
cacheLength: 1,
|
||||
@@ -268,7 +268,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
@@ -285,7 +285,7 @@ $(document).ready(function()
|
||||
required: false,
|
||||
remote:
|
||||
{
|
||||
url: "<?php echo esc(site_url("$controller_name/check_item_number"), 'url') ?>",
|
||||
url: '<?php echo esc("$controller_name/checkItemNumber") ?>',
|
||||
type: 'POST',
|
||||
data:
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<div id="title_bar" class="btn-toolbar">
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url("$controller_name/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc("$controller_name/view") ?>'
|
||||
title='<?php echo lang($controller_name . '.new') ?>'>
|
||||
<span class="glyphicon glyphicon-tags"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
</button>
|
||||
@@ -42,7 +42,7 @@ $(document).ready(function()
|
||||
<span class="glyphicon glyphicon-trash"> </span><?php echo lang('Common.delete') ?>
|
||||
</button>
|
||||
|
||||
<button id="generate_barcodes" class="btn btn-default btn-sm" data-href='<?php echo esc(site_url("$controller_name/generate_barcodes"), 'url') ?>'>
|
||||
<button id="generate_barcodes" class="btn btn-default btn-sm" data-href='<?php echo esc("$controller_name/generate_barcodes") ?>'>
|
||||
<span class="glyphicon glyphicon-barcode"> </span><?php echo lang('Items.generate_barcodes') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#category').autocomplete({
|
||||
source: "<?php echo site_url('items/suggest_category') ?>",
|
||||
source: "<?php echo 'items/suggest_category' ?>",
|
||||
appendTo: '.modal-content',
|
||||
delay: 10
|
||||
});
|
||||
@@ -195,7 +195,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<fieldset id="item_basic_info">
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="col-xs-12">
|
||||
<a href="<?php echo site_url('items/generate_csv_file') ?>"><?php echo lang('Common.download_import_template') ?></a>
|
||||
<a href="<?php echo 'items/generate_csv_file' ?>"><?php echo lang('Common.download_import_template') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,7 @@ $(document).ready(function()
|
||||
success:function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit('<?php echo site_url('items') ?>', response);
|
||||
table_support.handle_submit('<?php echo 'items' ?>', response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -111,7 +111,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -76,7 +76,7 @@ $(document).ready(function()
|
||||
};
|
||||
|
||||
$('#supplier_name').autocomplete({
|
||||
source: "<?php echo site_url('suppliers/suggest') ?>",
|
||||
source: "<?php echo 'suppliers/suggest' ?>",
|
||||
minChars: 0,
|
||||
delay: 15,
|
||||
cacheLength: 1,
|
||||
@@ -88,7 +88,7 @@ $(document).ready(function()
|
||||
$('button#delete').click(function()
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.do_delete("<?php echo esc(site_url($controller_name), 'url') ?>", <?php echo $receiving_info['receiving_id'] ?>);
|
||||
table_support.do_delete("<?php echo esc($controller_name) ?>", <?php echo $receiving_info['receiving_id'] ?>);
|
||||
});
|
||||
|
||||
$('#receivings_edit_form').validate($.extend({
|
||||
@@ -97,7 +97,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -106,7 +106,7 @@ if (isset($success))
|
||||
<button id='new_item_button' class='btn btn-info btn-sm pull-right modal-dlg'
|
||||
data-btn-submit='<?php echo lang('Common.submit') ?>'
|
||||
data-btn-new='<?php echo lang('Common.new') ?>'
|
||||
data-href='<?php echo site_url("items/view") ?>'
|
||||
data-href='<?php echo "items/view" ?>'
|
||||
title='<?php echo lang('Sales.new_item') ?>'>
|
||||
<span class="glyphicon glyphicon-tag"> </span><?php echo lang('Sales.new_item') ?>
|
||||
</button>
|
||||
@@ -342,7 +342,7 @@ if (isset($success))
|
||||
'value' => lang('Receivings.start_typing_supplier_name')
|
||||
]) ?>
|
||||
|
||||
<button id='new_supplier_button' class='btn btn-info btn-sm modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo site_url("suppliers/view") ?>'
|
||||
<button id='new_supplier_button' class='btn btn-info btn-sm modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo "suppliers/view" ?>'
|
||||
title='<?php echo lang('Receivings.new_supplier') ?>'>
|
||||
<span class="glyphicon glyphicon-user"> </span><?php echo lang('Receivings.new_supplier') ?>
|
||||
</button>
|
||||
@@ -496,7 +496,7 @@ $(document).ready(function()
|
||||
{
|
||||
$("#item").autocomplete(
|
||||
{
|
||||
source: '<?php echo esc(site_url("$controller_name/stock_item_search"), 'url') ?>',
|
||||
source: '<?php echo esc("$controller_name/stock_item_search") ?>',
|
||||
minChars:0,
|
||||
delay:10,
|
||||
autoFocus: false,
|
||||
@@ -523,17 +523,17 @@ $(document).ready(function()
|
||||
|
||||
$('#comment').keyup(function()
|
||||
{
|
||||
$.post('<?php echo esc(site_url("$controller_name/set_comment"), 'url') ?>', {comment: $('#comment').val()});
|
||||
$.post('<?php echo esc("$controller_name/set_comment") ?>', {comment: $('#comment').val()});
|
||||
});
|
||||
|
||||
$('#recv_reference').keyup(function()
|
||||
{
|
||||
$.post('<?php echo esc(site_url("$controller_name/set_reference"), 'url') ?>', {recv_reference: $('#recv_reference').val()});
|
||||
$.post('<?php echo esc("$controller_name/set_reference") ?>', {recv_reference: $('#recv_reference').val()});
|
||||
});
|
||||
|
||||
$("#recv_print_after_sale").change(function()
|
||||
{
|
||||
$.post('<?php echo esc(site_url("$controller_name/set_print_after_sale"), 'url') ?>', {recv_print_after_sale: $(this).is(":checked")});
|
||||
$.post('<?php echo esc("$controller_name/set_print_after_sale") ?>', {recv_print_after_sale: $(this).is(":checked")});
|
||||
});
|
||||
|
||||
$('#item,#supplier').click(function()
|
||||
@@ -543,7 +543,7 @@ $(document).ready(function()
|
||||
|
||||
$("#supplier").autocomplete(
|
||||
{
|
||||
source: '<?php echo site_url("suppliers/suggest") ?>',
|
||||
source: '<?php echo "suppliers/suggest" ?>',
|
||||
minChars:0,
|
||||
delay:10,
|
||||
select: function (a, ui) {
|
||||
@@ -568,7 +568,7 @@ $(document).ready(function()
|
||||
{
|
||||
if (confirm('<?php echo lang('Receivings.confirm_cancel_receiving') ?>'))
|
||||
{
|
||||
$('#finish_receiving_form').attr('action', '<?php echo esc(site_url("$controller_name/cancel_receiving"), 'url') ?>');
|
||||
$('#finish_receiving_form').attr('action', '<?php echo esc("$controller_name/cancel_receiving") ?>');
|
||||
$('#finish_receiving_form').submit();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ $(document).ready(function()
|
||||
<?php if(!empty($sale_info['email'])): ?>
|
||||
$('#send_invoice').click(function(event) {
|
||||
if (confirm("<?php echo lang('Sales.invoice_confirm') . ' ' . $sale_info['email'] ?>")) {
|
||||
$.get("<?php echo esc(site_url("$controller_name/send_pdf/" . $sale_info['sale_id']), 'url') ?>",
|
||||
$.get("<?php echo esc("$controller_name/send_pdf/" . $sale_info['sale_id']) ?>",
|
||||
function(response) {
|
||||
BootstrapDialog.closeAll();
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
@@ -184,7 +184,7 @@ $(document).ready(function()
|
||||
};
|
||||
|
||||
$('#customer_name').autocomplete( {
|
||||
source: "<?php echo site_url('customers/suggest') ?>",
|
||||
source: "<?php echo 'customers/suggest' ?>",
|
||||
minChars: 0,
|
||||
delay: 15,
|
||||
cacheLength: 1,
|
||||
@@ -200,7 +200,7 @@ $(document).ready(function()
|
||||
};
|
||||
|
||||
$('#employee_name').autocomplete( {
|
||||
source: "<?php echo site_url('employees/suggest') ?>",
|
||||
source: "<?php echo 'employees/suggest' ?>",
|
||||
minChars: 0,
|
||||
delay: 15,
|
||||
cacheLength: 1,
|
||||
@@ -211,12 +211,12 @@ $(document).ready(function()
|
||||
|
||||
$('button#delete').click(function() {
|
||||
dialog_support.hide();
|
||||
table_support.do_delete("<?php echo esc(site_url($controller_name), 'url') ?>", <?php echo $sale_info['sale_id'] ?>);
|
||||
table_support.do_delete("<?php echo esc($controller_name); ?>", <?php echo $sale_info['sale_id'] ?>);
|
||||
});
|
||||
|
||||
$('button#restore').click(function() {
|
||||
dialog_support.hide();
|
||||
table_support.do_restore("<?php echo esc(site_url($controller_name), 'url') ?>", <?php echo $sale_info['sale_id'] ?>);
|
||||
table_support.do_restore("<?php echo esc($controller_name) ?>", <?php echo $sale_info['sale_id'] ?>);
|
||||
});
|
||||
|
||||
$('#sales_edit_form').validate($.extend( {
|
||||
@@ -225,10 +225,10 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
|
||||
const params = $.param(table_support.query_params());
|
||||
$.get("<?php echo site_url($controller_name); ?>/search?" + params, function(response) {
|
||||
$.get("<?php echo $controller_name; ?>/search?" + params, function(response) {
|
||||
$("#payment_summary").html(response.payment_summary);
|
||||
}, 'json');
|
||||
},
|
||||
@@ -244,7 +244,7 @@ $(document).ready(function()
|
||||
{
|
||||
remote:
|
||||
{
|
||||
url: "<?php echo esc(site_url("$controller_name/check_invoice_number"), 'url') ?>",
|
||||
url: "<?php echo esc("$controller_name/check_invoice_number") ?>",
|
||||
type: 'POST',
|
||||
data: {
|
||||
'sale_id': <?php echo $sale_info['sale_id'] ?>,
|
||||
|
||||
@@ -98,7 +98,7 @@ if(isset($success))
|
||||
?>
|
||||
|
||||
<li class="pull-right">
|
||||
<button class='btn btn-default btn-sm modal-dlg' id='show_suspended_sales_button' data-href="<?php echo esc(site_url("$controller_name/suspended"), 'url') ?>"
|
||||
<button class='btn btn-default btn-sm modal-dlg' id='show_suspended_sales_button' data-href="<?php echo esc("$controller_name/suspended") ?>"
|
||||
title="<?php echo lang('Sales.suspended_sales') ?>">
|
||||
<span class="glyphicon glyphicon-align-justify"> </span><?php echo lang('Sales.suspended_sales') ?>
|
||||
</button>
|
||||
|
||||
@@ -34,7 +34,7 @@ $(document).ready(function()
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?php echo esc(site_url("/sales/send_pdf/$sale_id_num"), 'url') ?>',
|
||||
$.get('<?php echo esc("/sales/send_pdf/$sale_id_num") ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
|
||||
@@ -32,7 +32,7 @@ if(isset($error_message))
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?php echo esc(site_url("/sales/send_pdf/$sale_id_num/work_order")) ?>',
|
||||
$.get('<?php echo esc("/sales/send_pdf/$sale_id_num/work_order") ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
|
||||
@@ -84,7 +84,7 @@ $(document).ready(function()
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit("<?php echo esc(site_url($controller_name), 'url') ?>", response);
|
||||
table_support.handle_submit("<?php echo esc($controller_name) ?>", response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#tax_categories").load('<?php echo esc(site_url("taxes/ajax_tax_categories"), 'url') ?>', init_add_remove_tax_categories);
|
||||
$("#tax_categories").load('<?php echo esc("taxes/ajax_tax_categories") ?>', init_add_remove_tax_categories);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#tax_codes").load('<?php echo site_url("taxes/ajax_tax_codes") ?>', init_add_remove_tax_codes);
|
||||
$("#tax_codes").load('<?php echo "taxes/ajax_tax_codes" ?>', init_add_remove_tax_codes);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#tax_jurisdictions").load('<?php echo esc(site_url("taxes/ajax_tax_jurisdictions"), 'url') ?>', init_add_remove_tax_jurisdiction);
|
||||
$("#tax_jurisdictions").load('<?php echo esc("taxes/ajax_tax_jurisdictions") ?>', init_add_remove_tax_jurisdiction);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<div id="title_bar" class="btn-toolbar">
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc(site_url("$controller_name/view"), 'url') ?>'
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo lang('Common.submit') ?>' data-href='<?php echo esc("$controller_name/view") ?>'
|
||||
title='<?php echo lang("$controller_name.new") ?>'>
|
||||
<span class="glyphicon glyphicon-usd"> </span><?php echo lang("$controller_name.new") ?>
|
||||
</button>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
$(form).ajaxSubmit({
|
||||
success: function (response) {
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit('<?php echo site_url('taxes') ?>', response);
|
||||
table_support.handle_submit('<?php echo'taxes' ?>', response);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user