X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fprices.php;h=7a8e53e1121bc67e53dff882284339644386120c;hb=412b79dc32855f813d03a8a6dd9debd45bb308f5;hp=64371bbe82840e02403978b46de087d090b0fd98;hpb=6183e9450dcd7e4c747889c10903f6ff1b0add33;p=fa-stable.git diff --git a/inventory/prices.php b/inventory/prices.php index 64371bbe..7a8e53e1 100644 --- a/inventory/prices.php +++ b/inventory/prices.php @@ -44,10 +44,10 @@ if (!isset($_POST['stock_id'])) echo "
" . _("Item:"). " "; stock_items_list('stock_id', $_POST['stock_id'], false, true); -echo "
"; +echo "
"; // if stock sel has changed, clear the form -if ($_POST['stock_id'] != get_global_stock_item()) +if ($_POST['stock_id'] != get_global_stock_item()) { clear_data(); } @@ -64,10 +64,10 @@ function clear_data() //---------------------------------------------------------------------------------------------------- -if (isset($_POST['updatePrice'])) +if (isset($_POST['updatePrice'])) { - if (!check_num('price', 0)) + if (!check_num('price', 0)) { $input_error = 1; display_error( _("The price entered must be numeric.")); @@ -77,18 +77,18 @@ if (isset($_POST['updatePrice'])) if ($input_error != 1) { - if (isset($_POST['PriceID'])) + if (isset($_POST['PriceID'])) { //editing an existing price - update_item_price($_POST['PriceID'], $_POST['sales_type_id'], + update_item_price($_POST['PriceID'], $_POST['sales_type_id'], $_POST['curr_abrev'], input_num('price')); $msg = _("This price has been updated."); - } - elseif ($input_error !=1) + } + elseif ($input_error !=1) { - add_item_price($_POST['stock_id'], $_POST['sales_type_id'], + add_item_price($_POST['stock_id'], $_POST['sales_type_id'], $_POST['curr_abrev'], input_num('price')); display_note(_("The new price has been added.")); @@ -100,7 +100,7 @@ if (isset($_POST['updatePrice'])) //------------------------------------------------------------------------------------------------------ -if (isset($_GET['delete'])) +if (isset($_GET['delete'])) { //the link to delete a selected record was clicked @@ -108,20 +108,22 @@ if (isset($_GET['delete'])) echo _("The selected price has been deleted."); } - +if (isset($_POST['_stock_id_update'])) + $Ajax->activate('price_table'); //--------------------------------------------------------------------------------------------------- $mb_flag = get_mb_flag($_POST['stock_id']); $prices_list = get_prices($_POST['stock_id']); +div_start('price_table'); start_table("$table_style width=30%"); $th = array(_("Currency"), _("Sales Type"), _("Price"), "", ""); table_header($th); $k = 0; //row colour counter -while ($myrow = db_fetch($prices_list)) +while ($myrow = db_fetch($prices_list)) { alt_table_row_color($k); @@ -135,10 +137,10 @@ while ($myrow = db_fetch($prices_list)) } end_table(); - +div_end(); //------------------------------------------------------------------------------------------------ -if (db_num_rows($prices_list) == 0) +if (db_num_rows($prices_list) == 0) { display_note(_("There are no prices set up for this part.")); }