diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 382ff7c2d..87431cb7c 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -837,6 +837,7 @@ class Sales extends Secure_Controller if($customer_id != -1) { $customer_info = $this->Customer->get_info($customer_id); + $data['customer_id'] = $customer_id; if(isset($customer_info->company_name)) { $data['customer'] = $customer_info->company_name; @@ -865,7 +866,7 @@ class Sales extends Secure_Controller $package_name = $this->Customer_rewards->get_name($package_id); $points = $this->Customer->get_info($customer_id)->points; $data['customer_rewards']['package_id'] = $package_id; - $data['customer_rewards']['points'] = ($points==NULL ? 0 : $points); + $data['customer_rewards']['points'] = empty($points) ? 0 : $points; $data['customer_rewards']['package_name'] = $package_name; } diff --git a/application/views/people/manage.php b/application/views/people/manage.php index cb00e0730..6c577912c 100644 --- a/application/views/people/manage.php +++ b/application/views/people/manage.php @@ -17,7 +17,7 @@ $(document).ready(function() } }); - $("#email").click(function(evvent) + $("#email").click(function(event) { var recipients = $.map($("tr.selected a[href^='mailto:']"), function(element) { diff --git a/application/views/sales/register.php b/application/views/sales/register.php index daae35f1b..58bed9894 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -38,7 +38,7 @@ if(isset($success))
  • - "$('#mode_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?> + "$('#mode_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?>
  • - - - - - - - + 'select_customer_form', 'class'=>'form-horizontal')); ?> + +
    lang->line("sales_customer"); ?>
    - - + + - - + + + + + + + + + + + + + + + + + + - - + + - - + config->item('customer_reward_enable') == TRUE): ?> + + + + + + + + + + + - - + + - - - - - - config->item('customer_reward_enable') == TRUE): ?> - - - - - - - - - - - - - - - - - - - - - -
    lang->line("sales_customer_email"); ?>lang->line("sales_customer"); ?> 'modal-dlg', 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('customers_update'))); ?>
    lang->line("sales_customer_email"); ?>
    lang->line("sales_customer_address"); ?>
    lang->line("sales_customer_location"); ?>
    lang->line("sales_customer_address"); ?>lang->line("sales_customer_discount"); ?>
    lang->line("rewards_package"); ?>
    lang->line("customers_available_points"); ?>
    lang->line("sales_customer_location"); ?>lang->line("sales_customer_total"); ?>
    lang->line("sales_customer_discount"); ?>
    lang->line("rewards_package"); ?>
    lang->line("customers_available_points"); ?>
    lang->line("sales_customer_total"); ?>
    lang->line("sales_customer_mailchimp_status"); ?>
    + + + lang->line("sales_customer_mailchimp_status"); ?> + + + + -  ' . $this->lang->line('common_remove').' '.$this->lang->line('customers_customer'), +  ' . $this->lang->line('common_remove').' '.$this->lang->line('customers_customer'), array('class'=>'btn btn-danger btn-sm', 'id'=>'remove_customer_button', 'title'=>$this->lang->line('common_remove').' '.$this->lang->line('customers_customer'))); ?> - - 'select_customer_form', 'class'=>'form-horizontal')); ?> +
    - + 'customer', 'id'=>'customer', 'class'=>'form-control input-sm', 'value'=>$this->lang->line('sales_start_typing_customer_name')));?>
    - - + + @@ -512,7 +512,6 @@ if(isset($success)) - lang->line('sales_start_typing_customer_name'); ?>"); + }); + $(".giftcard-input").autocomplete( { source: '', @@ -659,16 +668,6 @@ $(document).ready(function() } }); - $('#item, #customer').click(clear_fields).dblclick(function(event) - { - $(this).autocomplete("search"); - }); - - $('#customer').blur(function() - { - $(this).val("lang->line('sales_start_typing_customer_name'); ?>"); - }); - $('#comment').keyup(function() { $.post('', {comment: $('#comment').val()}); @@ -778,6 +777,8 @@ $(document).ready(function() table_support.handle_submit = function(resource, response, stay_open) { + $.notify(response.message, { type: response.success ? 'success' : 'danger'} ); + if(response.success) { if(resource.match(/customers$/)) @@ -805,7 +806,6 @@ $(document).ready(function() $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"],[name="discounted_total"]').change(function() { $(this).parents("tr").prevAll("form:first").submit() }); - }); function check_payment_type() @@ -841,7 +841,6 @@ function check_payment_type() $(".non-giftcard-input").attr('disabled', false); } } - load->view("partial/footer"); ?>