Changed license type to GPLv3 in top of files
[fa-stable.git] / gl / includes / ui / gl_journal_ui.inc
index 0f39203bd9708157ceca236ba78b239229ccd8a4..bc68af7cfea564266eaa49dbae75cea035e75977 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 /**********************************************************************
     Copyright (C) FrontAccounting, LLC.
-       Released under the terms of the GNU Affero General Public License,
-       AGPL, as published by the Free Software Foundation, either version 
-       of the License, or (at your option) any later version.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
-    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/ui/items_cart.inc");
@@ -18,7 +18,7 @@ function display_order_header(&$Order)
 {
        global $table_style2;
 
-       $qes = has_quick_entries(-1, 0);
+       $qes = has_quick_entries(QE_JOURNAL);
 
        start_outer_table("$table_style2 width=90%");
        table_section(1);
@@ -40,9 +40,16 @@ function display_order_header(&$Order)
        {
                table_section(3, "50%");
                start_row();
-               quick_entries_list_cells(_("Quick Entry:"), 'person_id', null, -1, 0);
-               amount_cells(_("Total Amount"), 'totamount', null, null, "&nbsp;&nbsp;".submit('go', _("Go"), false, false, true));                     
+               quick_entries_list_cells(_("Quick Entry").":", 'person_id', null, QE_JOURNAL, true);
+               $qid = get_quick_entry(get_post('person_id'));
+               if (list_updated('person_id')) {
+                       unset($_POST['totamount']); // enable default
+               $Ajax->activate('totamount');
+               }
+               amount_cells($qid['base_desc'].":", 'totamount', price_format($qid['base_amount']),
+                null, "&nbsp;&nbsp;".submit('go', _("Go"), false, false, true));
                end_row();
+
        }
                
        end_outer_table(1);
@@ -180,7 +187,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
                }
                
                $skip_bank = ($_SESSION["wa_current_user"]->access != 2);
-               gl_all_accounts_list('code_id', null, $skip_bank, false, true);
+               gl_all_accounts_list('code_id', null, $skip_bank, true);
                if ($dim >= 1)
                        dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
                if ($dim > 1)