";
+ global $table_style2, $Ajax;
+ echo " ";
- if (!isset($_POST['CreditType']) || $_POST['CreditType'] == "Return") {
+if (isset($_POST['_CreditType_update']))
+ $Ajax->activate('options');
- /*if the credit note is a return of goods then need to know which location to receive them into */
- if (!isset($_POST['Location'])) {
- $_POST['Location'] = $_SESSION['Items']->Location;
- }
+ div_start('options');
+ start_table("$table_style2");
- locations_list_row(_("Items Returned to Inventory Location"), 'Location', $_POST['Location']);
- } else { /* the goods are to be written off to somewhere */
- gl_all_accounts_list_row(_("Write Off the Cost of the Items to"), 'WriteOffGLCode', $_POST['WriteOffGLCode']);
- }
- textarea_row(_("Memo"), "CreditText", null, 45, 3);
- end_table();
+ credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true);
+
+ if ($_POST['CreditType'] == "Return")
+ {
+
+ /*if the credit note is a return of goods then need to know which location to receive them into */
+ if (!isset($_POST['Location']))
+ $_POST['Location'] = $_SESSION['Items']->Location;
+ locations_list_row(_("Items Returned to Location"), 'Location', $_POST['Location']);
+ }
+ else
+ {
+ /* the goods are to be written off to somewhere */
+ gl_all_accounts_list_row(_("Write off the cost of the items to"), 'WriteOffGLCode', null);
+ }
+
+ textarea_row(_("Memo"), "CreditText", null, 51, 3);
+ echo "";
+ div_end();
}
+//-----------------------------------------------------------------------------
+if (get_post('Update'))
+{
+ $Ajax->activate('credit_items');
+}
//-----------------------------------------------------------------------------
display_credit_items();
display_credit_options();
echo "