function uc_taxes_update_4 in Ubercart 5
File
- uc_taxes/
uc_taxes.install, line 98
Code
function uc_taxes_update_4() {
$result = db_query("SELECT id, taxed_line_items FROM {uc_taxes} WHERE cumulative != 0");
while ($tax = db_fetch_object($result)) {
if ($taxed_line_items = unserialize($tax->taxed_line_items) && is_array($taxed_line_items)) {
$taxed_line_items['tax'] = 'tax';
db_query("UPDATE {uc_taxes} SET taxed_line_items = '%s' WHERE id = %d", serialize($taxed_line_items), $tax->id);
}
}
$ret = array();
$ret[] = update_sql("ALTER TABLE {uc_taxes} DROP cumulative");
return $ret;
}