- }
- //
- // Test if patch was applied before.
- //
- function installed($pref)
- {
- $n = 2; // number of patches to be installed
- $patchcnt = 0;
-
- if (!check_table($pref, 'suppliers', 'tax_algorithm')) $patchcnt++;
- if (!check_table($pref, 'wo_costing')) $patchcnt++;
- return $n == $patchcnt ? true : ($patchcnt ? ($patchcnt.'/'. $n) : 0);
+ db_query("DROP TABLE IF EXISTS " . $pref . 'stock_fa_class');
+ db_query("DELETE FROM ".$pref."sys_prefs
+ WHERE `name` in (
+ 'gl_closing_date', 'deferred_income_act', 'no_zero_lines_amount', 'accounts_alpha',
+ 'tax_algorithm', 'grn_clearing_act', 'default_receival_required',
+ 'default_quote_valid_days', 'no_zero_lines_amount', 'show_po_item_codes', 'accounts_alpha',
+ 'loc_notification', 'print_invoice_no', 'allow_negative_prices', 'print_item_images_on_quote',
+ 'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates', 'company_logo_report',
+ 'barcodes_on_stock')");