+if (isset($_POST['_stock_id_update'])) {
+ $Ajax->activate('price_table');
+ $Ajax->activate('price_details');
+}
+if (isset($_POST['_stock_id_update']) || isset($_POST['_sales_type_id_update'])
+ || isset($_POST['_curr_abrev_update']) ) {
+ // after change of stock, currency or salestype selector
+ // display default calculated price for new settings.
+ // If we have this price already in db it is overwritten later.
+ $_POST['price'] = price_format(get_price(get_post('stock_id'),
+ get_post('curr_abrev'), get_post('sales_type_id')));
+ $Ajax->activate('price_details');
+}