Fixed newlines in js submit dialogs.
[fa-stable.git] / inventory / transfers.php
index b3d91338589ac6fb94e260b8d07e44f89682ae69..77fbc2f84b0d4530d5caf44623f3fb446e80955f 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="..";
+$page_security = 'SA_LOCATIONTRANSFER';
+$path_to_root = "..";
 include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
@@ -68,7 +68,7 @@ function handle_new_order()
     session_register("transfer_items");
 
        $_SESSION['transfer_items'] = new items_cart(systypes::location_transfer());
-       $_POST['AdjDate'] = Today();
+       $_POST['AdjDate'] = new_doc_date();
        if (!is_date_in_fiscalyear($_POST['AdjDate']))
                $_POST['AdjDate'] = end_fiscalyear();
        $_SESSION['transfer_items']->tran_date = $_POST['AdjDate'];     
@@ -143,7 +143,7 @@ if (isset($_POST['Process']))
        $trans_no = add_stock_transfer($_SESSION['transfer_items']->line_items,
                $_POST['FromStockLocation'], $_POST['ToStockLocation'],
                $_POST['AdjDate'], $_POST['type'], $_POST['ref'], $_POST['memo_']);
-
+       new_doc_date($_POST['AdjDate']);
        $_SESSION['transfer_items']->clear_items();
        unset($_SESSION['transfer_items']);