Transaction references extended with parametrized patterns, added check_reference...
[fa-stable.git] / inventory / includes / stock_transfers_ui.inc
index 14deebb26b3711d8fc889f8be4f85ff7a3756ce3..3fd5110a2f839afdcacdfb265354cd5c17fc7a48 100644 (file)
@@ -28,22 +28,19 @@ function display_order_header(&$order)
 {
        global $Refs;
 
-       start_outer_table(TABLESTYLE, "width=70%");
+       start_outer_table(TABLESTYLE, "width='70%'");
 
        table_section(1);
        
        locations_list_row(_("From Location:"), 'FromStockLocation', null);
        locations_list_row(_("To Location:"), 'ToStockLocation', null);
 
-       table_section(2, "33%");
-
-       ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_LOCTRANSFER));
+       table_section(2, "50%");
 
     date_row(_("Date:"), 'AdjDate', '', true);
 
-       table_section(3, "33%");
-
-    movement_types_list_row(_("Transfer Type:"), 'type', null);
+       ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_LOCTRANSFER, null, array('date'=>get_post('Adjdate'), 'location'=> get_post('FromStockLocation'))),
+                false, ST_LOCTRANSFER);
 
        end_outer_table(1); // outer table
 }
@@ -56,7 +53,7 @@ function display_transfer_items($title, &$order)
 
        display_heading($title);
     div_start('items_table');
-       start_table(TABLESTYLE, "width=80%");
+       start_table(TABLESTYLE, "width='80%'");
        $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), '');
        if ( count($order->line_items)) $th[] = '';
        table_header($th);