X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_quick_entries.php;h=d314b6902db0a5174f96acd3094654899f0962ad;hb=6ae59a0b8741ce89f30b64c2d0f376835eb0a778;hp=2e1797b9467c658a82ae5290e3765a3a3e379139;hpb=18cae2a229d38f91668328d8ec943366510cefb9;p=fa-stable.git diff --git a/gl/manage/gl_quick_entries.php b/gl/manage/gl_quick_entries.php index 2e1797b9..d314b690 100644 --- a/gl/manage/gl_quick_entries.php +++ b/gl/manage/gl_quick_entries.php @@ -102,13 +102,13 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($selected_id != -1) { update_quick_entry($selected_id, $_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc'], get_post('bal_type')); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0)); display_notification(_('Selected quick entry has been updated')); } else { add_quick_entry($_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc'], get_post('bal_type')); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0)); display_notification(_('New quick entry has been added')); } $Mode = 'RESET'; @@ -214,8 +214,9 @@ if ($selected_id != -1) $_POST['description'] = $myrow["description"]; $_POST['type'] = $myrow["type"]; $_POST['base_desc'] = $myrow["base_desc"]; - $_POST['base_amount'] = price_format($myrow["base_amount"]); $_POST['bal_type'] = $myrow["bal_type"]; + $_POST['base_amount'] = $myrow["bal_type"] ? + $myrow["base_amount"] : price_format($myrow["base_amount"]); } hidden('selected_id', $selected_id); } @@ -241,8 +242,7 @@ if (get_post('type') == QE_JOURNAL && get_post('bal_type') == 1) } else { - $_POST['base_desc'] = _("Base Amount"); - text_row_ex(_("Base Amount Description").':', 'base_desc', 50, 60, '',_('Base Amount')); + text_row_ex(_("Base Amount Description").':', 'base_desc', 50, 60, ''); amount_row(_("Default Base Amount").':', 'base_amount', price_format(0)); } end_table(1); @@ -362,4 +362,3 @@ end_form(); end_page(); -?> \ No newline at end of file