- //
- // Test if patch was applied before.
- //
- function installed($pref) {
- $n = 4; // number of features to be installed
- if (!check_table($pref, 'item_codes')) $n--;
-// if (!check_table($pref, 'company', 'foreign_codes')) $n--;
- if (!check_table($pref, 'suppliers', 'credit_limit')) $n--;
- if (!check_table($pref, 'bank_trans', 'reconciled',
- array('Type'=>'date'))) $n--;
- if (!check_table($pref, 'trans_tax_details')) $n--;
- return $n == 0 ? true : 5 - $n;
- }