Merged changes from main CVS up to 2.1.5
[fa-stable.git] / inventory / adjustments.php
index bf3f290f7611978caf8bf8d9a4d8b2af54417d1b..5a9f95d6c2dc54005b637a31f7095efaa66b9cd4 100644 (file)
@@ -70,7 +70,7 @@ function handle_new_order()
     session_register("adj_items");
 
     $_SESSION['adj_items'] = new items_cart(systypes::inventory_adjustment());
-       $_POST['AdjDate'] = Today();
+       $_POST['AdjDate'] = new_doc_date();
        if (!is_date_in_fiscalyear($_POST['AdjDate']))
                $_POST['AdjDate'] = end_fiscalyear();
        $_SESSION['adj_items']->tran_date = $_POST['AdjDate'];  
@@ -134,7 +134,7 @@ if (isset($_POST['Process']) && can_process()){
        $trans_no = add_stock_adjustment($_SESSION['adj_items']->line_items,
                $_POST['StockLocation'], $_POST['AdjDate'],     $_POST['type'], $_POST['Increase'],
                $_POST['ref'], $_POST['memo_']);
-
+       new_doc_date($_POST['AdjDate']);
        $_SESSION['adj_items']->clear_items();
        unset($_SESSION['adj_items']);
 
@@ -217,7 +217,7 @@ if (isset($_GET['NewAdjustment']) || !isset($_SESSION['adj_items']))
 }
 
 //-----------------------------------------------------------------------------------------------
-start_form(false, true);
+start_form();
 
 display_order_header($_SESSION['adj_items']);
 
@@ -229,7 +229,7 @@ adjustment_options_controls();
 end_outer_table(1, false);
 
 submit_center_first('Update', _("Update"), '', null);
-submit_center_last('Process', _("Process Adjustment"), '', true);
+submit_center_last('Process', _("Process Adjustment"), '', 'default');
 
 end_form();
 end_page();