label_cell($myrow["curr_abrev"]); label_cell($myrow["sales_type"]); amount_cell($myrow["price"]); amount_cell($myrow["factor"]); edit_link_cell("PriceID=" . $myrow["id"] . "&Edit=1"); delete_link_cell("PriceID=" . $myrow["id"] . "&delete=yes"); end_row(); } end_table(); //------------------------------------------------------------------------------------------------ if (db_num_rows($prices_list) == 0) { display_note(tr("There are no prices set up for this part.")); } echo "<br>"; if (isset($_GET['Edit'])) { $myrow = get_stock_price($_GET['PriceID']); hidden('PriceID', $_GET['PriceID']); $_POST['curr_abrev'] = $myrow["curr_abrev"]; $_POST['sales_type_id'] = $myrow["sales_type_id"]; $_POST['price'] = price_format($myrow["price"]); $_POST['factor'] = price_format($myrow["factor"]); } start_table($table_style2); currencies_list_row(tr("Currency:"), 'curr_abrev', null); sales_types_list_row(tr("Sales Type:"), 'sales_type_id', null); small_amount_row(tr("Price:"), 'price', null); small_amount_row(tr("Factor:"), 'factor', null); end_table(1); submit_center('updatePrice', tr("Add/Update Price")); end_form(); end_page();
edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } end_table(); if (db_num_rows($prices_list) == 0) { if (get_company_pref('add_pct') != -1) { $calculated = true; } display_note(_("There are no prices set up for this part."), 1); } div_end(); //------------------------------------------------------------------------------------------------ echo "<br>"; if ($Mode == 'Edit') { $myrow = get_stock_price($selected_id); $_POST['curr_abrev'] = $myrow["curr_abrev"]; $_POST['sales_type_id'] = $myrow["sales_type_id"]; $_POST['price'] = price_format($myrow["price"]); } hidden('selected_id', $selected_id); if (@$_GET['popup']) { hidden('_tabs_sel', get_post('_tabs_sel')); hidden('popup', @$_GET['popup']); } div_start('price_details'); start_table(TABLESTYLE2); currencies_list_row(_("Currency:"), 'curr_abrev', null, true); sales_types_list_row(_("Sales Type:"), 'sales_type_id', null, true); if (!isset($_POST['price'])) { $_POST['price'] = price_format(get_kit_price(get_post('stock_id'), get_post('curr_abrev'), get_post('sales_type_id')));