X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Finquiry%2Fpo_search_completed.php;h=7e2f7f61a652086816a4448665881540b1789f96;hb=8a53629bf51fc682489f6692ff4d6558a976c22c;hp=160763db78d09d01b3da590b099e5ac10f90155c;hpb=d67d5295b9342c011697ce4df325197e29898588;p=fa-stable.git diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index 160763db..7e2f7f61 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -18,13 +18,36 @@ if (isset($_GET['order_number'])) $order_number = $_GET['order_number']; } +//----------------------------------------------------------------------------------- +// Ajax updates +// +if (get_post('SearchOrders')) +{ + $Ajax->activate('orders_tbl'); +} elseif (get_post('_order_number_changed')) +{ + $disable = get_post('order_number') !== ''; + + $Ajax->addDisable(true, 'OrdersAfterDate', $disable); + $Ajax->addDisable(true, 'OrdersToDate', $disable); + $Ajax->addDisable(true, 'StockLocation', $disable); + $Ajax->addDisable(true, '_SelectStockFromList_edit', $disable); + $Ajax->addDisable(true, 'SelectStockFromList', $disable); + + if ($disable) { + $Ajax->addFocus(true, 'order_number'); + } else + $Ajax->addFocus(true, 'OrdersAfterDate'); + + $Ajax->activate('orders_tbl'); +} //--------------------------------------------------------------------------------------------- start_form(false, true); start_table("class='tablestyle_noborder'"); start_row(); -ref_cells(_("#:"), 'order_number'); +ref_cells(_("#:"), 'order_number', '',null, '', true); date_cells(_("from:"), 'OrdersAfterDate', '', null, -30); date_cells(_("to:"), 'OrdersToDate'); @@ -33,7 +56,7 @@ locations_list_cells(_("into location:"), 'StockLocation', null, true); stock_items_list_cells(_("for item:"), 'SelectStockFromList', null, true); -submit_cells('SearchOrders', _("Search")); +submit_cells('SearchOrders', _("Search"),'',_('Select documents'), true); end_row(); end_table(); @@ -97,6 +120,7 @@ $result = db_query($sql,"No orders were returned"); print_hidden_script(18); +div_start('orders_tbl'); start_table("$table_style colspan=7 width=80%"); if (isset($_POST['StockLocation']) && $_POST['StockLocation'] == reserved_words::get_all()) @@ -138,7 +162,7 @@ while ($myrow = db_fetch($result)) } end_table(2); - +div_end(); //--------------------------------------------------------------------------------------------------- end_page();