mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-25 09:48:02 -05:00
+ Fixed multiple giftcards issue per Bug #4 reported on Sourceforge where a second giftcard added would have its balance set to $0 even if the sale did not require the total of the second giftcard to pay the remaining amount due. + Small code cleanup git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@58 c3eb156b-1dc0-44e1-88ae-e38439141b53
32 lines
731 B
PHP
32 lines
731 B
PHP
<?php
|
|
//Loads configuration from database into global CI config
|
|
function load_config()
|
|
{
|
|
$CI =& get_instance();
|
|
foreach( $CI->Appconfig->get_all()->result() as $app_config )
|
|
{
|
|
$CI->config->set_item( $app_config->key, $app_config->value );
|
|
}
|
|
|
|
if ( $CI->config->item( 'language' ) )
|
|
{
|
|
$CI->config->set_item( 'language', $CI->config->item( 'language' ) );
|
|
$loaded = $CI->lang->is_loaded;
|
|
$CI->lang->is_loaded = array();
|
|
|
|
foreach($loaded as $file)
|
|
{
|
|
$CI->lang->load( str_replace( '_lang.php', '', $file ) );
|
|
}
|
|
}
|
|
|
|
if ( $CI->config->item( 'timezone' ) )
|
|
{
|
|
date_default_timezone_set( $CI->config->item( 'timezone' ) );
|
|
}
|
|
else
|
|
{
|
|
date_default_timezone_set( 'America/New_York' );
|
|
}
|
|
}
|
|
?>
|