mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-03 21:33:15 -04:00
Formatting fixes
- Removed TODOs - String Interpolation - Changed quotes in html to match the rest of code
This commit is contained in:
@@ -478,9 +478,8 @@ function get_item_data_row(object $item): array
|
||||
: glob("./uploads/item_pics/$item->pic_filename");
|
||||
|
||||
if(sizeof($images) > 0)
|
||||
{//TODO: alt text needs to be localized instead of English hardcoded
|
||||
//TODO: this is resulting in the html being displayed to the screen rather than the thumbnail. Something is broken.
|
||||
$image .= '<a class=\'rollover\' href=\''. base_url($images[0]) .'\'><img alt=\'Image thumbnail\' src=\'' . site_url('items/PicThumb/' . pathinfo($images[0], PATHINFO_BASENAME)) . '\'></a>';
|
||||
{
|
||||
$image .= '<a class="rollover" href="' . base_url($images[0]) . '"><img alt="Image thumbnail" src="' . site_url('items/PicThumb/' . pathinfo($images[0], PATHINFO_BASENAME)) . '"></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ function get_tax_code_data_row($tax_code_row): array
|
||||
'city' => $tax_code_row->city,
|
||||
'state' => $tax_code_row->state,
|
||||
'edit' => anchor(
|
||||
$controller_name."/view_tax_codes/$tax_code_row->tax_code", //TODO: String interpolation
|
||||
"$controller_name/view_tax_codes/$tax_code_row->tax_code",
|
||||
'<span class="glyphicon glyphicon-edit"></span>',
|
||||
[
|
||||
'class' => 'modal-dlg',
|
||||
'data-btn-submit' => lang('Common.submit'),
|
||||
'title'=>lang($controller_name . '.update_tax_codes') //TODO: String interpolation
|
||||
'title'=>lang("$controller_name.update_tax_codes")
|
||||
]
|
||||
)
|
||||
];
|
||||
@@ -73,12 +73,12 @@ function get_tax_categories_data_row($tax_categories_row): array
|
||||
'tax_category_code' => $tax_categories_row->tax_category_code,
|
||||
'tax_group_sequence' => $tax_categories_row->tax_group_sequence,
|
||||
'edit' => anchor(
|
||||
$controller_name."/view/$tax_categories_row->tax_category_id", //TODO: String interpolation
|
||||
"$controller_name/view/$tax_categories_row->tax_category_id",
|
||||
'<span class="glyphicon glyphicon-edit"></span>',
|
||||
[
|
||||
'class' => 'modal-dlg',
|
||||
'data-btn-submit' => lang('Common.submit'),
|
||||
'title'=>lang($controller_name . '.update') //TODO: String interpolation
|
||||
'title'=>lang("$controller_name.update")
|
||||
]
|
||||
)
|
||||
];
|
||||
@@ -110,12 +110,12 @@ function get_tax_jurisdictions_data_row($tax_jurisdiction_row): array
|
||||
'jurisdiction_name' => $tax_jurisdiction_row->jurisdiction_name,
|
||||
'reporting_authority' => $tax_jurisdiction_row->reporting_authority,
|
||||
'edit' => anchor(
|
||||
$controller_name."/view/$tax_jurisdiction_row->jurisdiction_id", //TODO: String interpolation
|
||||
"$controller_name/view/$tax_jurisdiction_row->jurisdiction_id",
|
||||
'<span class="glyphicon glyphicon-edit"></span>',
|
||||
[
|
||||
'class' => 'modal-dlg',
|
||||
'data-btn-submit' => lang('Common.submit'),
|
||||
'title'=>lang($controller_name . '.update') //TODO: String interpolation
|
||||
'title'=>lang("$controller_name.update")
|
||||
]
|
||||
)
|
||||
];
|
||||
@@ -156,13 +156,13 @@ function get_tax_rates_data_row($tax_rates_row): array
|
||||
'tax_rounding_code' =>$tax_rates_row->tax_rounding_code,
|
||||
'rounding_code_name' => Rounding_mode::get_rounding_code_name($tax_rates_row->tax_rounding_code),
|
||||
'edit' => anchor(
|
||||
$controller_name."/view/$tax_rates_row->tax_rate_id", //TODO: String interpolation
|
||||
"$controller_name/view/$tax_rates_row->tax_rate_id",
|
||||
'<span class="glyphicon glyphicon-edit"></span>',
|
||||
[
|
||||
'class' => 'modal-dlg',
|
||||
'data-btn-submit' => lang('Common.submit'),
|
||||
'title'=>lang($controller_name . '.update') //TODO: String interpolation
|
||||
'title'=>lang("$controller_name.update")
|
||||
]
|
||||
)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
<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($controller_name."/view") ?>'
|
||||
title='<?php echo lang($controller_name . '.new') ?>'>
|
||||
<span class="glyphicon glyphicon-star"> </span><?php echo lang($controller_name . '.new') ?>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ $(document).ready(function()
|
||||
'_blank' // <- This is what makes it open in a new window.
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
// when any filter is clicked and the dropdown window is closed
|
||||
$('#filters').on('hidden.bs.select', function(e)
|
||||
{
|
||||
@@ -71,7 +71,6 @@ $(document).ready(function()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<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 "$controller_name/csvImport" ?>'
|
||||
title='<?php echo lang('Items.import_items_csv') ?>'>
|
||||
|
||||
@@ -49,7 +49,7 @@ if (isset($success))
|
||||
<?php echo form_dropdown('mode', $modes, $mode, ['onchange'=>"$('#mode_form').submit();", 'class' => 'selectpicker show-menu-arrow', 'data-style' => 'btn-default btn-sm', 'data-width' => 'fit']) ?>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if ($show_stock_locations)
|
||||
{
|
||||
?>
|
||||
@@ -59,7 +59,7 @@ if (isset($success))
|
||||
<li class="pull-left">
|
||||
<?php echo form_dropdown('stock_source', $stock_locations, $stock_source, ['onchange'=>"$('#mode_form').submit();", 'class' => 'selectpicker show-menu-arrow', 'data-style' => 'btn-default btn-sm', 'data-width' => 'fit']) ?>
|
||||
</li>
|
||||
|
||||
|
||||
<?php
|
||||
if($mode=='requisition')
|
||||
{
|
||||
@@ -78,7 +78,7 @@ if (isset($success))
|
||||
</div>
|
||||
<?php echo form_close() ?>
|
||||
|
||||
<?php echo form_open($controller_name."/add", ['id' => 'add_item_form', 'class' => 'form-horizontal panel panel-default']) ?>
|
||||
<?php echo form_open("$controller_name/add", ['id' => 'add_item_form', 'class' => 'form-horizontal panel panel-default']) ?>
|
||||
<div class="panel-body form-group">
|
||||
<ul>
|
||||
<li class="pull-left first_li">
|
||||
@@ -96,7 +96,7 @@ if (isset($success))
|
||||
<?php echo lang('Receivings.find_or_scan_item_or_receipt') ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</label>
|
||||
</li>
|
||||
<li class="pull-left">
|
||||
@@ -114,7 +114,7 @@ if (isset($success))
|
||||
</ul>
|
||||
</div>
|
||||
<?php echo form_close() ?>
|
||||
|
||||
|
||||
<!-- Receiving Items List -->
|
||||
|
||||
<table class="sales_table_100" id="register">
|
||||
@@ -158,7 +158,7 @@ if (isset($success))
|
||||
<?php echo form_hidden('location', $item['item_location']) ?>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if ($items_module_allowed && $mode != 'requisition')
|
||||
{
|
||||
?>
|
||||
@@ -180,7 +180,7 @@ if (isset($success))
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td><?php echo form_input (['name' => 'quantity', 'class' => 'form-control input-sm', 'value' => to_quantity_decimals($item['quantity']),'onClick' => 'this.select();']) ?></td>
|
||||
<td><?php echo form_dropdown(
|
||||
'receiving_quantity',
|
||||
@@ -189,7 +189,7 @@ if (isset($success))
|
||||
['class' => 'form-control input-sm']
|
||||
) ?></td>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if ($items_module_allowed && $mode != 'requisition')
|
||||
{
|
||||
?>
|
||||
@@ -210,7 +210,7 @@ if (isset($success))
|
||||
'checked' => $item['discount_type'] == 1
|
||||
]) ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
@@ -227,13 +227,13 @@ if (isset($success))
|
||||
<td><a href="javascript:$('#<?php echo esc("cart_$line", 'js') ?>').submit();" title=<?php echo lang('Receivings.update') ?> ><span class="glyphicon glyphicon-refresh"></span></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
<?php
|
||||
if($item['allow_alt_description'] == 1) //TODO: ===?
|
||||
{
|
||||
?>
|
||||
<td style="color: #2F4F4F;"><?php echo lang('Sales.description_abbrv').':' ?></td>
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td colspan='2' style="text-align: left;">
|
||||
<?php
|
||||
@@ -318,7 +318,7 @@ if (isset($success))
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
<?php echo anchor(
|
||||
"$controller_name/remove_supplier",
|
||||
'<span class="glyphicon glyphicon-remove"> </span>' . lang('Common.remove').' '.lang('Suppliers.supplier'),
|
||||
@@ -361,14 +361,14 @@ if (isset($success))
|
||||
?>
|
||||
<th style="width: 55%;"><?php echo lang('Sales.total') ?></th>
|
||||
<th style="width: 45%; text-align: right;"><?php echo to_currency($total) ?></th>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<th style="width: 55%;"></th>
|
||||
<th style="width: 45%; text-align: right;"></th>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
@@ -395,7 +395,7 @@ if (isset($success))
|
||||
]) ?>
|
||||
|
||||
<div class="btn btn-sm btn-danger pull-left" id='cancel_receiving_button'><span class="glyphicon glyphicon-remove"> </span><?php echo lang('Receivings.cancel_receiving') ?></div>
|
||||
|
||||
|
||||
<div class="btn btn-sm btn-success pull-right" id='finish_receiving_button'><span class="glyphicon glyphicon-ok"> </span><?php echo lang('Receivings.complete_receiving') ?></div>
|
||||
</div>
|
||||
<?php echo form_close() ?>
|
||||
@@ -404,7 +404,7 @@ if (isset($success))
|
||||
else
|
||||
{
|
||||
?>
|
||||
<?php echo form_open($controller_name."/complete", ['id' => 'finish_receiving_form', 'class' => 'form-horizontal']) ?>
|
||||
<?php echo form_open("$controller_name/complete", ['id' => 'finish_receiving_form', 'class' => 'form-horizontal']) ?>
|
||||
<div class="form-group form-group-sm">
|
||||
<label id="comment_label" for="comment"><?php echo lang('Common.comments') ?></label>
|
||||
<?php echo form_textarea ([
|
||||
@@ -477,7 +477,7 @@ if (isset($success))
|
||||
</div>
|
||||
|
||||
<div class='btn btn-sm btn-danger pull-left' id='cancel_receiving_button'><span class="glyphicon glyphicon-remove"> </span><?php echo lang('Receivings.cancel_receiving') ?></div>
|
||||
|
||||
|
||||
<div class='btn btn-sm btn-success pull-right' id='finish_receiving_button'><span class="glyphicon glyphicon-ok"> </span><?php echo lang('Receivings.complete_receiving') ?></div>
|
||||
</div>
|
||||
<?php echo form_close() ?>
|
||||
@@ -521,12 +521,12 @@ $(document).ready(function()
|
||||
$(this).attr('value',"<?php echo lang('Sales.start_typing_item_name') ?>");
|
||||
});
|
||||
|
||||
$('#comment').keyup(function()
|
||||
$('#comment').keyup(function()
|
||||
{
|
||||
$.post('<?php echo esc("$controller_name/set_comment") ?>', {comment: $('#comment').val()});
|
||||
});
|
||||
|
||||
$('#recv_reference').keyup(function()
|
||||
$('#recv_reference').keyup(function()
|
||||
{
|
||||
$.post('<?php echo esc("$controller_name/set_reference") ?>', {recv_reference: $('#recv_reference').val()});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user