function display_gl_items(&$supp_trans, $mode=0)
{
- global $table_style, $path_to_root;
+ global $table_style, $path_to_root, $Ajax;
// if displaying in form, and no items, exit
if (($mode == 2 || $mode == 3) && count($supp_trans->gl_codes) == 0)
if ($mode == 1)
{
- $qes = has_quick_entries(-1, 0);
+ $qes = has_quick_entries(QE_SUPPINV);
if ($qes !== false)
{
echo "<div style='float:right;'>";
echo _("Quick Entry:")." ";
- quick_entries_list('qid', null, 0, 1);
- echo " "._("Amount")." ";
- $amount = input_num('totamount');
+ quick_entries_list('qid', null, QE_SUPPINV, true);
+ $qid = get_quick_entry(get_post('qid'));
+ if (list_updated('qid')) {
+ unset($_POST['totamount']); // enable default
+ $Ajax->activate('totamount');
+ }
+ echo " ".$qid['base_desc'].":"." ";
+
+ $amount = input_num('totamount', $qid['base_amount']);
$dec = user_price_dec();
echo "<input class='amount' type='text' name='totamount' size='7' maxlength='12' dec='$dec' value='$amount'> ";
submit('go', _("Go"), true, false, true);
echo "</div>";
+
}
}
display_heading($heading);