-start_table(TABLESTYLE2, "width=90%", 10);
-start_row();
-echo "<td>";
-display_gl_items(_("Rows"), $_SESSION['journal_items']);
-gl_options_controls();
-echo "</td>";
-end_row();
-end_table(1);
-
-submit_center('Process', _("Process Journal Entry"), true ,
- _('Process journal entry only if debits equal to credits'), 'default');
+tabbed_content_start('tabs', array(
+ 'gl' => array(_('&GL postings'), true),
+ 'tax' => array(_('&Tax register'), check_value('taxable_trans')),
+ ));
+
+ switch (get_post('_tabs_sel')) {
+ default:
+ case 'gl':
+ start_table(TABLESTYLE2, "width='90%'", 10);
+ start_row();
+ echo "<td>";
+ display_gl_items(_("Rows"), $_SESSION['journal_items']);
+ gl_options_controls();
+ echo "</td>";
+ end_row();
+ end_table(1);
+ break;
+
+ case 'tax':
+ update_tax_info();
+ br();
+ display_heading(_("Tax register record"));
+ br();
+ start_table(TABLESTYLE2, "width=40%");
+ date_row(_("VAT date:"), 'tax_date', '', "colspan='3'");
+ //tax_groups_list_row(_("Tax group:"), 'tax_group');
+ end_table(1);
+
+ start_table(TABLESTYLE2, "width=60%");
+ table_header(array(_('Name'), _('Input Tax'), _('Output Tax'), _('Net amount')));
+ $taxes = get_all_tax_types();
+ while ($tax = db_fetch($taxes))
+ {
+ start_row();
+ label_cell($tax['name'].' '.$tax['rate'].'%');
+ amount_cell(input_num('tax_in_'.$tax['id']));
+ amount_cell(input_num('tax_out_'.$tax['id']));
+
+ amount_cells(null, 'net_amount_'.$tax['id']);
+ end_row();
+ }
+ end_table(1);
+ break;
+ };
+ submit_center('Process', _("Process Journal Entry"), true ,
+ _('Process journal entry only if debits equal to credits'), 'default');
+br();
+tabbed_content_end();