Transaction references extended with parametrized patterns, added check_reference...
[fa-stable.git] / manufacturing / includes / work_order_issue_ui.inc
index d5e8eb806ddae899dd65ca18757f0b634c8ae23c..540a57b88fe805a0841bb64b05476fb923fa15fa 100644 (file)
@@ -160,7 +160,11 @@ function issue_options_controls()
 
        echo "<br>";
        start_table();
-    ref_row(_("Reference:"), 'ref', '', $Refs->get_next(28));
+       date_row(_("Issue Date:"), 'date_');
+       locations_list_row(_("From Location:"), 'Location');
+       workcenter_list_row(_("To Work Centre:"), 'WorkCentre');
+
+    ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_MANUISSUE, null, array('date'=> get_post('date_'), 'location' => get_post('Location'));
  
        if (!isset($_POST['IssueType']))
                $_POST['IssueType'] = 0;
@@ -168,10 +172,7 @@ function issue_options_controls()
        yesno_list_row(_("Type:"), 'IssueType', $_POST['IssueType'],
                _("Return Items to Location"), _("Issue Items to Work order"));
  
-       locations_list_row(_("From Location:"), 'Location');
-       workcenter_list_row(_("To Work Centre:"), 'WorkCentre');
  
-       date_row(_("Issue Date:"), 'date_');
 
        textarea_row(_("Memo"), 'memo_', null, 50, 3);