mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-14 12:02:37 -04:00
Fix temporal dependency in migration
This commit is contained in:
@@ -36,9 +36,9 @@ class Migration_Sales_Tax_Data extends CI_Migration
|
||||
private function upgrade_tax_history_for_sale($sale_id)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$tax_decimals = $CI->config->config['tax_decimals'];
|
||||
$tax_included = $CI->config->config['tax_included'];
|
||||
$customer_sales_tax_support = $CI->config->config['customer_sales_tax_support'];
|
||||
$tax_decimals = $CI->Appconfig->get('tax_decimals', 2);
|
||||
$tax_included = $CI->Appconfig->get('tax_included', 0);
|
||||
$customer_sales_tax_support = $CI->Appconfig->get('customer_sales_tax_support', 0);
|
||||
|
||||
if($tax_included)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ class Appconfig extends CI_Model
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
public function get($key)
|
||||
public function get($key, $default = '')
|
||||
{
|
||||
$query = $this->db->get_where('app_config', array('key' => $key), 1);
|
||||
|
||||
@@ -31,7 +31,7 @@ class Appconfig extends CI_Model
|
||||
return $query->row()->value;
|
||||
}
|
||||
|
||||
return '';
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function save($key, $value)
|
||||
|
||||
Reference in New Issue
Block a user