mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-27 10:31:50 -04:00
Ternary operator instead of if clause to keep consistency
This commit is contained in:
committed by
FrancescoUK
parent
5650a26381
commit
f96f5efe48
@@ -128,7 +128,7 @@ class Expenses extends Secure_Controller
|
||||
|
||||
$expense_data = array(
|
||||
'date' => $date_formatter->format('Y-m-d H:i:s'),
|
||||
'supplier_id' => $this->input->post('supplier_id'),
|
||||
'supplier_id' => $this->input->post('supplier_id') == '' ? NULL : $this->input->post('supplier_id'),
|
||||
'supplier_tax_code' => $this->input->post('supplier_tax_code'),
|
||||
'amount' => parse_decimals($this->input->post('amount')),
|
||||
'tax_amount' => parse_decimals($this->input->post('tax_amount')),
|
||||
@@ -139,10 +139,6 @@ class Expenses extends Secure_Controller
|
||||
'deleted' => $this->input->post('deleted') != NULL
|
||||
);
|
||||
|
||||
if($expense_data['supplier_id'] == '') {
|
||||
$expense_data['supplier_id'] = NULL;
|
||||
}
|
||||
|
||||
if($this->Expense->save($expense_data, $expense_id))
|
||||
{
|
||||
$expense_data = $this->xss_clean($expense_data);
|
||||
|
||||
Reference in New Issue
Block a user