Пример #1
0
    case 'go_previous':
        $_GET['page']--;
        break;
    case 'go_next':
        $_GET['page']++;
        break;
    case 'go_last':
        $_GET['page'] = 99999;
        break;
    case 'search':
    case 'search_reset':
    case 'go_page':
        break;
    default:
        // check to see if the field list is sync'd with the field properties, on first entry
        inv_sync_inv_field_list();
}
/*****************   prepare to display templates  *************************/
// prepare category drop-down
$category_array = inv_get_field_categories();
$include_header = true;
$include_footer = true;
$include_tabs = false;
$include_calendar = false;
switch ($action) {
    case 'edit':
    case 'update':
    case 'new':
        $include_template = 'template_detail.php';
        // include display template (required)
        define('PAGE_TITLE', INV_FIELD_HEADING_TITLE);
Пример #2
0
    case 'go_previous':
        $_GET['page']--;
        break;
    case 'go_next':
        $_GET['page']++;
        break;
    case 'go_last':
        $_GET['page'] = 99999;
        break;
    case 'search':
    case 'search_reset':
    case 'go_page':
        break;
    default:
        // check to see if the field list is sync'd with the field properties, on first entry
        inv_sync_inv_field_list(TABLE_ASSETS, TABLE_ASSETS_FIELDS);
}
/*****************   prepare to display templates  *************************/
// prepare category drop-down
$category_array = inv_get_field_categories(TABLE_ASSETS_TABS);
$include_header = true;
// include header flag
$include_footer = true;
// include footer flag
$include_tabs = false;
$include_calendar = false;
switch ($action) {
    case 'edit':
    case 'update':
    case 'new':
        $include_template = 'template_detail.php';
Пример #3
0
function load_startup_table_data($language = 'en_us')
{
    global $db;
    // set current status to intial levels
    $db->Execute("INSERT INTO " . TABLE_CURRENT_STATUS . " VALUES (1, 5000, '10000', 20000, 100, '1', 1, 'CM1000', 'VCM1000', 'RFQ1000', 'QU1000', 'C10000', 'V10000')");
    // set the project db version
    require_once DIR_FS_INCLUDES . 'version.php';
    $db->Execute("INSERT INTO " . TABLE_PROJECT_VERSION . " VALUES (1, 'PhreeBooks Database', '" . PROJECT_VERSION_MAJOR . "', '" . PROJECT_VERSION_MINOR . "', 'Fresh Installation', '" . date('Y-m-d H:i:s', time()) . "');");
    // load the configuration values (config_data.php)
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/config_data.php';
    require_once DIR_FS_MODULES . 'install/includes/config_data.php';
    foreach ($config_data as $entry) {
        db_perform(TABLE_CONFIGURATION, $entry, 'insert');
    }
    // TBD -  set the accounting period and period start and end dates
    // load the chart_of_accounts_types_list
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/chart_of_accounts_types_list.php';
    foreach ($chart_of_accounts_types_list as $entry) {
        db_perform(TABLE_CHART_OF_ACCOUNTS_TYPES, $entry, 'insert');
    }
    // load the countries_list
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/countries_list.php';
    foreach ($countries_list as $entry) {
        db_perform(TABLE_COUNTRIES, $entry, 'insert');
    }
    // load the currencies_list
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/currencies_list.php';
    foreach ($currencies_list as $entry) {
        db_perform(TABLE_CURRENCIES, $entry, 'insert');
    }
    // load the import_export_list
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/import_export_list.php';
    foreach ($import_export_list as $entry) {
        db_perform(TABLE_IMPORT_EXPORT, $entry, 'insert');
    }
    // load the state_province_list
    require_once DIR_FS_MODULES . 'install/language/' . $language . '/state_province_list.php';
    foreach ($state_province_list as $entry) {
        db_perform(TABLE_ZONES, $entry, 'insert');
    }
    // load the reports and forms (import from my_files);
    require_once DIR_FS_MODULES . 'reportwriter/functions/builder_functions.php';
    require_once DIR_FS_MODULES . 'reportwriter/language/' . $language . '/language.php';
    require_once DIR_FS_MODULES . 'install/report_list.php';
    define('DIR_FS_REPORTS', '../../my_files/reports/');
    foreach ($report_list as $report) {
        $_POST['RptFileName'] = $report;
        // to fake out the import function to load report from my_files
        if (file_exists(DIR_FS_REPORTS . $report)) {
            ImportReport($RptName = '');
        }
    }
    // synchronize the inventory fields before any customization is done to them
    require DIR_FS_MODULES . 'inventory/functions/inventory.php';
    inv_sync_inv_field_list();
    return true;
}