mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-25 11:27:21 -05:00
Fix register functionality
Fix controller method names
This commit is contained in:
@@ -14,20 +14,6 @@ $routes->post('login', 'Login::index');
|
||||
$routes->add('no_access/index/(:segment)', 'No_access::index/$1');
|
||||
$routes->add('no_access/index/(:segment)/(:segment)', 'No_access::index/$1/$2');
|
||||
|
||||
$routes->add('sales/index/(:any)', 'Sales::manage/$1');
|
||||
$routes->add('sales/index/(:any)/(:any)', 'Sales::manage/$1/$2');
|
||||
$routes->add('sales/index/(:any)/(:any)/(:any)', 'Sales::manage/$1/$2/$3');
|
||||
|
||||
$routes->add('sales/receipt/(:num)', 'Sales::receipt/$1');
|
||||
$routes->add('sales/invoice/(:num)', 'Sales::invoice/$1');
|
||||
$routes->add('sales/edit/(:num)', 'Sales::edit/$1');
|
||||
$routes->add('sales/sales_keyboard_help', 'Sales::sales_keyboard_help');
|
||||
|
||||
$routes->add('items/save_inventory/(:num)', 'Items::save_inventory/$1');
|
||||
|
||||
$routes->add('receivings/edit/(:num)', 'Receivings::edit/$1');
|
||||
$routes->add('receivings/receipt/(:num)', 'Receivings::receipt/$1');
|
||||
|
||||
$routes->add('reports/summary_(:any)/(:any)/(:any)', 'Reports::Summary_$1/$2/$3/$4');
|
||||
$routes->add('reports/summary_expenses_categories', 'Reports::date_input_only');
|
||||
$routes->add('reports/summary_payments', 'Reports::date_input_only');
|
||||
|
||||
@@ -897,7 +897,7 @@ class Items extends Secure_Controller
|
||||
* @throws ReflectionException
|
||||
* @noinspection PhpUnused
|
||||
*/
|
||||
public function save_inventory($item_id = NEW_ENTRY): void
|
||||
public function postSaveInventory($item_id = NEW_ENTRY): void
|
||||
{
|
||||
$employee_id = $this->employee->get_logged_in_employee_info()->person_id;
|
||||
$cur_item_info = $this->item->get_info($item_id);
|
||||
|
||||
@@ -80,7 +80,7 @@ class Receivings extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function postSelect_supplier(): void
|
||||
public function postSelectSupplier(): void
|
||||
{
|
||||
$supplier_id = $this->request->getPost('supplier', FILTER_SANITIZE_NUMBER_INT);
|
||||
if($this->supplier->exists($supplier_id))
|
||||
@@ -118,7 +118,7 @@ class Receivings extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function set_comment(): void
|
||||
public function postSetComment(): void
|
||||
{
|
||||
$this->receiving_lib->set_comment($this->request->getPost('comment', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class Receivings extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function set_print_after_sale(): void
|
||||
public function postSetPrintAfterSale(): void
|
||||
{
|
||||
$this->receiving_lib->set_print_after_sale($this->request->getPost('recv_print_after_sale') != null);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ class Receivings extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function set_reference(): void
|
||||
public function postSetReference(): void
|
||||
{
|
||||
$this->receiving_lib->set_reference($this->request->getPost('recv_reference', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
}
|
||||
@@ -219,7 +219,7 @@ class Receivings extends Secure_Controller
|
||||
* @param $receiving_id
|
||||
* @return void
|
||||
*/
|
||||
public function edit($receiving_id): void
|
||||
public function getEdit($receiving_id): void
|
||||
{
|
||||
$data = [];
|
||||
|
||||
@@ -281,7 +281,7 @@ class Receivings extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function remove_supplier(): void
|
||||
public function getRemoveSupplier(): void
|
||||
{
|
||||
$this->receiving_lib->clear_reference();
|
||||
$this->receiving_lib->remove_supplier();
|
||||
@@ -359,7 +359,7 @@ class Receivings extends Secure_Controller
|
||||
*
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function requisition_complete(): void
|
||||
public function postRequisitionComplete(): void
|
||||
{
|
||||
if($this->receiving_lib->get_stock_source() != $this->receiving_lib->get_stock_destination())
|
||||
{
|
||||
@@ -384,7 +384,7 @@ class Receivings extends Secure_Controller
|
||||
* @param $receiving_id
|
||||
* @return void
|
||||
*/
|
||||
public function receipt($receiving_id): void
|
||||
public function getReceipt($receiving_id): void
|
||||
{
|
||||
$receiving_info = $this->receiving->get_info($receiving_id)->getRowArray();
|
||||
$this->receiving_lib->copy_entire_receiving($receiving_id);
|
||||
@@ -516,7 +516,7 @@ class Receivings extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function cancel_receiving(): void
|
||||
public function postCancelReceiving(): void
|
||||
{
|
||||
$this->receiving_lib->clear_all();
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postSelect_customer(): void
|
||||
public function postSelectCustomer(): void
|
||||
{
|
||||
$customer_id = (int)$this->request->getPost('customer', FILTER_SANITIZE_NUMBER_INT);
|
||||
if($this->customer->exists($customer_id))
|
||||
@@ -298,7 +298,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function set_comment(): void
|
||||
public function postSetComment(): void
|
||||
{
|
||||
$this->sale_lib->set_comment($this->request->getPost('comment', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class Sales extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function set_invoice_number(): void
|
||||
public function postSetInvoiceNumber(): void
|
||||
{
|
||||
$this->sale_lib->set_invoice_number($this->request->getPost('sales_invoice_number', FILTER_SANITIZE_NUMBER_INT));
|
||||
}
|
||||
@@ -315,7 +315,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function set_payment_type(): void //TODO: This function does not appear to be called anywhere in the code.
|
||||
public function postSetPaymentType(): void //TODO: This function does not appear to be called anywhere in the code.
|
||||
{
|
||||
$this->sale_lib->set_payment_type($this->request->getPost('selected_payment_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
$this->_reload(); //TODO: Hungarian notation.
|
||||
@@ -325,7 +325,7 @@ class Sales extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function set_print_after_sale(): void
|
||||
public function postSetPrintAfterSale(): void
|
||||
{
|
||||
$this->sale_lib->set_print_after_sale($this->request->getPost('sales_print_after_sale') != null);
|
||||
}
|
||||
@@ -333,7 +333,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function set_price_work_orders(): void
|
||||
public function postSetPriceWorkOrders(): void
|
||||
{
|
||||
$price_work_orders = prepare_decimal($this->request->getPost('price_work_orders'));
|
||||
$this->sale_lib->set_price_work_orders(filter_var($price_work_orders, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION));
|
||||
@@ -343,7 +343,7 @@ class Sales extends Secure_Controller
|
||||
* Called in the view.
|
||||
* @return void
|
||||
*/
|
||||
public function set_email_receipt(): void
|
||||
public function postSetEmailReceipt(): void
|
||||
{
|
||||
$this->sale_lib->set_email_receipt($this->request->getPost('email_receipt', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
}
|
||||
@@ -925,7 +925,7 @@ class Sales extends Secure_Controller
|
||||
* @param string $type
|
||||
* @return bool
|
||||
*/
|
||||
public function send_pdf(int $sale_id, string $type = 'invoice'): bool
|
||||
public function getSendPdf(int $sale_id, string $type = 'invoice'): bool
|
||||
{
|
||||
$sale_data = $this->_load_sale_data($sale_id);
|
||||
|
||||
@@ -973,7 +973,7 @@ class Sales extends Secure_Controller
|
||||
* @param int $sale_id
|
||||
* @return bool
|
||||
*/
|
||||
public function send_receipt(int $sale_id): bool
|
||||
public function getSendReceipt(int $sale_id): bool
|
||||
{
|
||||
$sale_data = $this->_load_sale_data($sale_id);
|
||||
|
||||
@@ -1325,7 +1325,7 @@ class Sales extends Secure_Controller
|
||||
* @param int $sale_id
|
||||
* @return void
|
||||
*/
|
||||
public function receipt(int $sale_id): void
|
||||
public function getReceipt(int $sale_id): void
|
||||
{
|
||||
$data = $this->_load_sale_data($sale_id);
|
||||
echo view('sales/receipt', $data);
|
||||
@@ -1336,7 +1336,7 @@ class Sales extends Secure_Controller
|
||||
* @param int $sale_id
|
||||
* @return void
|
||||
*/
|
||||
public function invoice(int $sale_id): void
|
||||
public function getInvoice(int $sale_id): void
|
||||
{
|
||||
$data = $this->_load_sale_data($sale_id);
|
||||
|
||||
@@ -1348,7 +1348,7 @@ class Sales extends Secure_Controller
|
||||
* @param int $sale_id
|
||||
* @return void
|
||||
*/
|
||||
public function edit(int $sale_id): void
|
||||
public function getEdit(int $sale_id): void
|
||||
{
|
||||
$data = [];
|
||||
|
||||
@@ -1614,7 +1614,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function discard_suspended_sale(): void
|
||||
public function discardSuspendedSale(): void
|
||||
{
|
||||
$suspended_id = $this->sale_lib->get_suspended_id();
|
||||
$this->sale_lib->clear_all();
|
||||
@@ -1700,7 +1700,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function sales_keyboard_help() : void
|
||||
public function getSalesKeyboardHelp() : void
|
||||
{
|
||||
echo view('sales/help');
|
||||
}
|
||||
@@ -1708,7 +1708,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function check_invoice_number(): void
|
||||
public function postCheckInvoiceNumber(): void
|
||||
{
|
||||
$sale_id = $this->request->getPost('sale_id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$invoice_number = $this->request->getPost('invoice_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
@@ -1742,7 +1742,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function change_item_number(): void
|
||||
public function postChangeItemNumber(): void
|
||||
{
|
||||
$item_id = $this->request->getPost('item_id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$item_number = $this->request->getPost('item_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
@@ -1759,7 +1759,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function change_item_name(): void
|
||||
public function postChangeItemName(): void
|
||||
{
|
||||
$item_id = $this->request->getPost('item_id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$name = $this->request->getPost('item_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
@@ -1780,7 +1780,7 @@ class Sales extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function change_item_description(): void
|
||||
public function postChangeItemDescription(): void
|
||||
{
|
||||
$item_id = $this->request->getPost('item_id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$description = $this->request->getPost('item_description', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<ul id="error_message_box" class="error_message_box"></ul>
|
||||
|
||||
<?= form_open("items/save_inventory/$item_info->item_id", ['id' => 'item_form', 'class' => 'form-horizontal']) ?>
|
||||
<?= form_open("items/saveInventory/$item_info->item_id", ['id' => 'item_form', 'class' => 'form-horizontal']) ?>
|
||||
<fieldset id="inv_item_basic_info">
|
||||
<div class="form-group form-group-sm">
|
||||
<?= form_label(lang('Items.item_number'), 'name', ['class' => 'control-label col-xs-3']) ?>
|
||||
|
||||
@@ -82,7 +82,7 @@ if($print_after_sale)
|
||||
setTimeout(function () {
|
||||
window.location.href = "<?= site_url('sales') ?>";
|
||||
}, <?= $config['print_delay_autoreturn'] * 1000 ?>);
|
||||
});
|
||||
}));
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ if (isset($success))
|
||||
</table>
|
||||
|
||||
<?= anchor(
|
||||
"$controller_name/remove_supplier",
|
||||
"$controller_name/removeSupplier",
|
||||
'<span class="glyphicon glyphicon-remove"> </span>' . lang('Common.remove').' '.lang('Suppliers.supplier'),
|
||||
[
|
||||
'class' => 'btn btn-danger btn-sm',
|
||||
@@ -333,7 +333,7 @@ if (isset($success))
|
||||
else
|
||||
{
|
||||
?>
|
||||
<?= form_open("$controller_name/select_supplier", ['id' => 'select_supplier_form', 'class' => 'form-horizontal']) ?>
|
||||
<?= form_open("$controller_name/selectSupplier", ['id' => 'select_supplier_form', 'class' => 'form-horizontal']) ?>
|
||||
<div class="form-group" id="select_customer">
|
||||
<label id="supplier_label" for="supplier" class="control-label" style="margin-bottom: 1em; margin-top: -1em;"><?= lang(ucfirst($controller_name) .'.select_supplier') ?></label>
|
||||
<?= form_input ([
|
||||
@@ -384,7 +384,7 @@ if (isset($success))
|
||||
if($mode == 'requisition')
|
||||
{
|
||||
?>
|
||||
<?= form_open("$controller_name/requisition_complete", ['id' => 'finish_receiving_form', 'class' => 'form-horizontal']) ?>
|
||||
<?= form_open("$controller_name/requisitionComplete", ['id' => 'finish_receiving_form', 'class' => 'form-horizontal']) ?>
|
||||
<div class="form-group form-group-sm">
|
||||
<label id="comment_label" for="comment"><?= lang('Common.comments') ?></label>
|
||||
<?= form_textarea ([
|
||||
@@ -524,17 +524,17 @@ $(document).ready(function()
|
||||
|
||||
$('#comment').keyup(function()
|
||||
{
|
||||
$.post('<?= esc("$controller_name/set_comment") ?>', {comment: $('#comment').val()});
|
||||
$.post('<?= esc("$controller_name/setComment") ?>', {comment: $('#comment').val()});
|
||||
});
|
||||
|
||||
$('#recv_reference').keyup(function()
|
||||
{
|
||||
$.post('<?= esc("$controller_name/set_reference") ?>', {recv_reference: $('#recv_reference').val()});
|
||||
$.post('<?= esc("$controller_name/setReference") ?>', {recv_reference: $('#recv_reference').val()});
|
||||
});
|
||||
|
||||
$("#recv_print_after_sale").change(function()
|
||||
{
|
||||
$.post('<?= esc("$controller_name/set_print_after_sale") ?>', {recv_print_after_sale: $(this).is(":checked")});
|
||||
$.post('<?= esc("$controller_name/setPrintAfterSale") ?>', {recv_print_after_sale: $(this).is(":checked")});
|
||||
});
|
||||
|
||||
$('#item,#supplier').click(function()
|
||||
@@ -569,7 +569,7 @@ $(document).ready(function()
|
||||
{
|
||||
if (confirm('<?= lang(ucfirst($controller_name) .'.confirm_cancel_receiving') ?>'))
|
||||
{
|
||||
$('#finish_receiving_form').attr('action', '<?= esc("$controller_name/cancel_receiving") ?>');
|
||||
$('#finish_receiving_form').attr('action', '<?= esc("$controller_name/cancelReceiving") ?>');
|
||||
$('#finish_receiving_form').submit();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -166,7 +166,7 @@ $(document).ready(function()
|
||||
<?php if(!empty($sale_info['email'])): ?>
|
||||
$('#send_invoice').click(function(event) {
|
||||
if (confirm("<?= lang('Sales.invoice_confirm') . ' ' . $sale_info['email'] ?>")) {
|
||||
$.get("<?= esc("$controller_name/send_pdf/" . $sale_info['sale_id']) ?>",
|
||||
$.get("<?= esc("$controller_name/sendPdf/" . $sale_info['sale_id']) ?>",
|
||||
function(response) {
|
||||
BootstrapDialog.closeAll();
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
@@ -245,7 +245,7 @@ $(document).ready(function()
|
||||
{
|
||||
remote:
|
||||
{
|
||||
url: "<?= esc("$controller_name/check_invoice_number") ?>",
|
||||
url: "<?= esc("$controller_name/checkInvoiceNumber") ?>",
|
||||
type: 'POST',
|
||||
data: {
|
||||
'sale_id': <?= $sale_info['sale_id'] ?>,
|
||||
|
||||
@@ -35,7 +35,7 @@ $(document).ready(function()
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?= site_url() . "sales/send_pdf/$sale_id_num" ?>',
|
||||
$.get('<?= site_url() . "sales/sendPdf/$sale_id_num" ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
|
||||
@@ -31,7 +31,7 @@ if (isset($error_message))
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?= site_url() . esc("/sales/send_pdf/$sale_id_num/quote") ?>',
|
||||
$.get('<?= site_url() . esc("/sales/sendPdf/$sale_id_num/quote") ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
@@ -57,7 +57,7 @@ if (isset($error_message))
|
||||
<a href="javascript:void(0);"><div class="btn btn-info btn-sm" id="show_email_button"><?= '<span class="glyphicon glyphicon-envelope"> </span>' . lang('Sales.send_quote') ?></div></a>
|
||||
<?php endif; ?>
|
||||
<?= anchor('sales', '<span class=\'glyphicon glyphicon-shopping-cart\'> </span>' . lang('Sales.register'), ['class' => 'btn btn-info btn-sm', 'id' => 'show_sales_button']) ?>
|
||||
<?= anchor('sales/discard_suspended_sale', '<span class="glyphicon glyphicon-remove"> </span>' . lang('Sales.discard'), ['class' => 'btn btn-danger btn-sm', 'id' => 'discard_quote_button']) ?>
|
||||
<?= anchor('sales/getDiscardSuspendedSale', '<span class="glyphicon glyphicon-remove"> </span>' . lang('Sales.discard'), ['class' => 'btn btn-danger btn-sm', 'id' => 'discard_quote_button']) ?>
|
||||
</div>
|
||||
|
||||
<div id="page-wrap">
|
||||
|
||||
@@ -24,7 +24,7 @@ if (isset($error_message))
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?= site_url() . esc("/sales/send_receipt/$sale_id_num", 'url') ?>',
|
||||
$.get('<?= site_url() . esc("/sales/sendReceipt/$sale_id_num", 'url') ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
|
||||
@@ -345,7 +345,7 @@ if(isset($success))
|
||||
|
||||
<div id="overall_sale" class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<?= form_open("$controller_name/select_customer", ['id' => 'select_customer_form', 'class' => 'form-horizontal']) ?>
|
||||
<?= form_open("$controller_name/selectCustomer", ['id' => 'select_customer_form', 'class' => 'form-horizontal']) ?>
|
||||
<?php
|
||||
if(isset($customer))
|
||||
{
|
||||
@@ -445,7 +445,7 @@ if(isset($success))
|
||||
title="<?= lang(ucfirst($controller_name) .".new_customer") ?>">
|
||||
<span class="glyphicon glyphicon-user"> </span><?= lang(ucfirst($controller_name) .".new_customer") ?>
|
||||
</button>
|
||||
<button class='btn btn-default btn-sm modal-dlg' id='show_keyboard_help' data-href="<?= esc("$controller_name/sales_keyboard_help") ?>"
|
||||
<button class='btn btn-default btn-sm modal-dlg' id='show_keyboard_help' data-href="<?= esc("$controller_name/salesKeyboardHelp") ?>"
|
||||
title="<?= lang(ucfirst($controller_name) .'.key_title') ?>">
|
||||
<span class="glyphicon glyphicon-share-alt"> </span><?= lang(ucfirst($controller_name) .'.key_help') ?>
|
||||
</button>
|
||||
@@ -737,7 +737,7 @@ $(document).ready(function()
|
||||
var item_id = $(this).parents('tr').find("input[name='item_id']").val();
|
||||
var item_number = $(this).val();
|
||||
$.ajax({
|
||||
url: "<?= site_url('sales/change_item_number') ?>",
|
||||
url: "<?= site_url('sales/changeItemNumber') ?>",
|
||||
method: 'post',
|
||||
data: {
|
||||
'item_id': item_id,
|
||||
@@ -751,7 +751,7 @@ $(document).ready(function()
|
||||
var item_id = $(this).parents('tr').find("input[name='item_id']").val();
|
||||
var item_name = $(this).val();
|
||||
$.ajax({
|
||||
url: "<?= site_url('sales/change_item_name') ?>",
|
||||
url: "<?= site_url('sales/changeItemName') ?>",
|
||||
method: 'post',
|
||||
data: {
|
||||
'item_id': item_id,
|
||||
@@ -765,7 +765,7 @@ $(document).ready(function()
|
||||
var item_id = $(this).parents('tr').find("input[name='item_id']").val();
|
||||
var item_description = $(this).val();
|
||||
$.ajax({
|
||||
url: "<?= site_url('sales/change_item_description') ?>",
|
||||
url: "<?= site_url('sales/changeItemDescription') ?>",
|
||||
method: 'post',
|
||||
data: {
|
||||
'item_id': item_id,
|
||||
@@ -845,7 +845,7 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
$('#comment').keyup(function() {
|
||||
$.post("<?= esc(site_url("$controller_name/set_comment"), 'url') ?>", {comment: $('#comment').val()});
|
||||
$.post("<?= esc(site_url("$controller_name/setComment")) ?>", {comment: $('#comment').val()});
|
||||
});
|
||||
|
||||
<?php
|
||||
@@ -853,7 +853,7 @@ $(document).ready(function()
|
||||
{
|
||||
?>
|
||||
$('#sales_invoice_number').keyup(function() {
|
||||
$.post("<?= esc(site_url("$controller_name/set_invoice_number"), 'url') ?>", {sales_invoice_number: $('#sales_invoice_number').val()});
|
||||
$.post("<?= esc(site_url("$controller_name/setInvoiceNumber")) ?>", {sales_invoice_number: $('#sales_invoice_number').val()});
|
||||
});
|
||||
|
||||
<?php
|
||||
@@ -861,15 +861,15 @@ $(document).ready(function()
|
||||
?>
|
||||
|
||||
$('#sales_print_after_sale').change(function() {
|
||||
$.post("<?= esc(site_url("$controller_name/set_print_after_sale"), 'url') ?>", {sales_print_after_sale: $(this).is(':checked')});
|
||||
$.post("<?= esc(site_url("$controller_name/setPrintAfterSale")) ?>", {sales_print_after_sale: $(this).is(':checked')});
|
||||
});
|
||||
|
||||
$('#price_work_orders').change(function() {
|
||||
$.post("<?= esc(site_url("$controller_name/set_price_work_orders"), 'url') ?>", {price_work_orders: $(this).is(':checked')});
|
||||
$.post("<?= esc(site_url("$controller_name/setPriceWorkOrders")) ?>", {price_work_orders: $(this).is(':checked')});
|
||||
});
|
||||
|
||||
$('#email_receipt').change(function() {
|
||||
$.post("<?= esc(site_url("$controller_name/set_email_receipt"), 'url') ?>", {email_receipt: $(this).is(':checked')});
|
||||
$.post("<?= esc(site_url("$controller_name/setEmailReceipt")) ?>", {email_receipt: $(this).is(':checked')});
|
||||
});
|
||||
|
||||
$('#finish_sale_button').click(function() {
|
||||
|
||||
@@ -35,7 +35,7 @@ $(document).ready(function()
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?= esc("/sales/send_pdf/$sale_id_num") ?>',
|
||||
$.get('<?= esc("/sales/sendPdf/$sale_id_num") ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
|
||||
@@ -33,7 +33,7 @@ if(isset($error_message))
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?= esc("/sales/send_pdf/$sale_id_num/work_order") ?>',
|
||||
$.get('<?= esc("/sales/sendPdf/$sale_id_num/work_order") ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify( { message: response.message }, { type: response.success ? 'success' : 'danger'} )
|
||||
|
||||
Reference in New Issue
Block a user