mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-03 13:23:00 -04:00
fixed issues with enable reward points
This commit is contained in:
@@ -245,7 +245,7 @@ class Sales extends Secure_Controller
|
||||
|
||||
if(($cur_rewards_value - $current_payments_with_rewards) <= 0)
|
||||
{
|
||||
$data['error'] = $this->lang->line('rewards_remaining_balance', to_currency($cur_rewards_value));
|
||||
$data['error'] = $this->lang->line('rewards_remaining_balance'). to_currency($cur_rewards_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -253,7 +253,7 @@ class Sales extends Secure_Controller
|
||||
$new_reward_value = $new_reward_value >= 0 ? $new_reward_value : 0;
|
||||
$this->sale_lib->set_rewards_remainder($new_reward_value);
|
||||
$new_reward_value = str_replace('$', '\$', to_currency($new_reward_value));
|
||||
$data['warning'] = $this->lang->line('rewards_remaining_balance', $new_reward_value);
|
||||
$data['warning'] = $this->lang->line('rewards_remaining_balance'). $new_reward_value;
|
||||
$amount_tendered = min($this->sale_lib->get_amount_due(), $points);
|
||||
|
||||
$this->sale_lib->add_payment($payment_type, $amount_tendered);
|
||||
@@ -878,7 +878,7 @@ class Sales extends Secure_Controller
|
||||
$data['payments_total'] = $this->sale_lib->get_payments_total();
|
||||
$data['amount_due'] = $this->sale_lib->get_amount_due();
|
||||
$data['payments'] = $this->sale_lib->get_payments();
|
||||
if($customer_info)
|
||||
if($customer_info && $this->config->item('customer_reward_enable') == TRUE)
|
||||
$data['payment_options'] = $this->Sale->get_payment_options(TRUE,TRUE);
|
||||
else
|
||||
$data['payment_options'] = $this->Sale->get_payment_options();
|
||||
|
||||
@@ -136,4 +136,4 @@ $lang["rewards_package"] = "Rewards";
|
||||
$lang["customers_available_points"] = "Available Points";
|
||||
$lang["sales_rewards"] = "Reward Points";
|
||||
$lang["sales_rewards_balance"] = "Reward Points Balance";
|
||||
$lang["rewards_remaining_balance"] = "Reward Points remaining value is %1!";
|
||||
$lang["rewards_remaining_balance"] = "Reward Points remaining value is ";
|
||||
@@ -536,7 +536,7 @@ class Sale extends CI_Model
|
||||
$total_amount = floatval($total_amount) + floatval($payment['payment_amount']);
|
||||
}
|
||||
|
||||
if(isset($customer_id) && $customer_id!= NULL){
|
||||
if(isset($customer_id) && $customer_id!= NULL && $this->config->item('customer_reward_enable') == TRUE){
|
||||
$package_id = $this->Customer->get_info($customer_id)->package_id;
|
||||
if(isset($package_id) && $package_id!=NULL){
|
||||
$points_percent = $this->Customer_rewards->get_points_percent($package_id);
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($this->config->item('customer_reward_enable') == TRUE): ?>
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('rewards_package'), 'rewards', array('class'=>'control-label col-xs-3')); ?>
|
||||
<div class='col-xs-8'>
|
||||
@@ -84,7 +84,7 @@
|
||||
);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('customers_taxable'), 'taxable', array('class' => 'control-label col-xs-3')); ?>
|
||||
<div class='col-xs-1'>
|
||||
|
||||
@@ -290,6 +290,7 @@ if (isset($success))
|
||||
<th style='width: 55%;'><?php echo $this->lang->line("sales_customer_discount"); ?></th>
|
||||
<th style="width: 45%; text-align: right;"><?php echo $customer_discount_percent . ' %'; ?></th>
|
||||
</tr>
|
||||
<?php if($this->config->item('customer_reward_enable') == TRUE): ?>
|
||||
<?php
|
||||
if(!empty($customer_rewards) && isset($customer_rewards))
|
||||
{
|
||||
@@ -305,6 +306,7 @@ if (isset($success))
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th style='width: 55%;'><?php echo $this->lang->line("sales_customer_total"); ?></th>
|
||||
<th style="width: 45%; text-align: right;"><?php echo to_currency($customer_total); ?></th>
|
||||
|
||||
Reference in New Issue
Block a user