Global variabel, $def_print_destination, config.php can be set to 0 or 1
[fa-stable.git] / purchasing / includes / ui / grn_ui.inc
index 4a5835ee79140fad706b5b59d22c93c1eafecded..a0fdae4bdc981f0c88f405a7bccee431893473cc 100644 (file)
@@ -1,10 +1,19 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       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/gpl-3.0.html>.
+***********************************************************************/
 //---------------------------------------------------------------------------------------------------
 
 function display_grn_summary(&$po, $editable=false)
 {
-       global $table_style2;
+       global $table_style2, $Refs;
     start_table("$table_style2 width=90%");
     
     start_row();
@@ -13,7 +22,7 @@ function display_grn_summary(&$po, $editable=false)
     if (!is_company_currency($po->curr_code))
        label_cells(_("Order Currency"), $po->curr_code, "class='tableheader2'");
     
-    label_cells(_("For Purchase Order"), get_trans_view_str(systypes::po(), $po->order_no),
+    label_cells(_("For Purchase Order"), get_trans_view_str(ST_PURCHORDER, $po->order_no),
        "class='tableheader2'");
     
        label_cells(_("Ordered On"), $po->orig_order_date, "class='tableheader2'");
@@ -24,8 +33,8 @@ function display_grn_summary(&$po, $editable=false)
     if ($editable) 
     {
        if (!isset($_POST['ref']))
-           $_POST['ref'] = references::get_next(25);
-       ref_cells(_("Reference"), 'ref', null, "class='tableheader2'");
+           $_POST['ref'] = $Refs->get_next(ST_SUPPRECEIVE);
+       ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'");
                
         if (!isset($_POST['Location']))
                $_POST['Location'] = $po->Location;
@@ -33,9 +42,9 @@ function display_grn_summary(&$po, $editable=false)
         locations_list_cells(null, "Location", $_POST['Location']);
         
        if (!isset($_POST['DefaultReceivedDate']))
-               $_POST['DefaultReceivedDate'] = Today();
+               $_POST['DefaultReceivedDate'] = new_doc_date();
        
-       date_cells(_("Date Items Received"), 'DefaultReceivedDate', null, 0, 0, 0, "class='tableheader2'");    
+       date_cells(_("Date Items Received"), 'DefaultReceivedDate', '', true, 0, 0, 0, "class='tableheader2'");    
         
     } 
     else