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';
$_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);
}
}
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);
end_page();
-?>
\ No newline at end of file