sales fixes

This commit is contained in:
Joshua Fernandes
2017-04-22 12:20:32 +05:30
committed by FrancescoUK
parent 7a91388d8d
commit 6dc49ca00e

View File

@@ -195,10 +195,12 @@ class Sales extends Secure_Controller
public function add_payment()
{
$data = array();
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'trim|required|callback_numeric');
$payment_type = $this->input->post('payment_type');
if($payment_type != $this->lang->line('sales_giftcard'))
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'trim|required|callback_numeric');
else
$this->form_validation->set_rules('amount_tendered', 'lang:sales_amount_tendered', 'trim|required');
if($this->form_validation->run() == FALSE)
{
if($payment_type == $this->lang->line('sales_giftcard'))