Changed naming convention in purchase order class (orig_order_date ->tran_date)
[fa-stable.git] / purchasing / po_receive_items.php
index 2850496dca12f55cadc6c2fe25ae69ed52beeca6..5d3bff5d6c1f7b3ff61305dd63849618f3ae6f47 100644 (file)
@@ -202,15 +202,15 @@ function can_process()
        return false;
        }
 
-       if (!is_date($_POST['DefaultReceivedDate']))
+       if (!is_date($_POST['tran_date']))
        {
                display_error(_("The entered date is invalid."));
-               set_focus('DefaultReceivedDate');
+               set_focus('tran_date');
                return false;
        }
-       if (!is_date_in_fiscalyear($_POST['DefaultReceivedDate'])) {
+       if (!is_date_in_fiscalyear($_POST['tran_date'])) {
                display_error(_("The entered date is out of fiscal year or is closed for further data entry."));
-               set_focus('DefaultReceivedDate');
+               set_focus('tran_date');
                return false;
        }
 
@@ -291,7 +291,7 @@ function process_receive_po()
        }
        
        $grn = &$_SESSION['PO'];
-       $grn->orig_order_date = $_POST['DefaultReceivedDate'];
+       $grn->tran_date = $_POST['tran_date'];
        $grn->reference = $_POST['ref'];
        $grn->Location = $_POST['Location'];
        $grn->ex_rate = input_num('_ex_rate', null);
@@ -299,7 +299,7 @@ function process_receive_po()
        $trans_no = write_grn($grn);
        $new = $grn->grn_id == 0;
 
-       new_doc_date($_POST['DefaultReceivedDate']);
+       new_doc_date($_POST['tran_date']);
        unset($_SESSION['PO']->line_items);
        unset($_SESSION['PO']);
 
@@ -322,8 +322,8 @@ if (isset($_POST['Update']) || isset($_POST['ProcessGoodsReceived']))
                if (!check_num($line->line_no))
                        $_POST[$line->line_no] = number_format2(0, get_qty_dec($line->stock_id));
 
-               if (!isset($_POST['DefaultReceivedDate']) || $_POST['DefaultReceivedDate'] == "")
-                       $_POST['DefaultReceivedDate'] = new_doc_date();
+               if (!isset($_POST['tran_date']) || $_POST['tran_date'] == "")
+                       $_POST['tran_date'] = new_doc_date();
 
                $_SESSION['PO']->line_items[$line->line_no]->quantity = input_num($line->line_no);