Recurrent Invoices: fixed buggy call to non existing function and payment terms type...
[fa-stable.git] / manufacturing / work_order_entry.php
index aa13e8d5a145150765c775b812b617f918404179..b420087122be79b0c132ff8f8205d63fb6dd8df6 100644 (file)
@@ -316,9 +316,9 @@ $existing_comments = "";
 $dec = 0;
 if (isset($selected_id))
 {
-       $myrow = get_work_order($selected_id);
+       $myrow = get_work_order($selected_id, true);
 
-       if (strlen($myrow[0]) == 0)
+       if ($myrow === false)
        {
                echo _("The order number sent is not valid.");
                safe_exit();
@@ -344,7 +344,6 @@ if (isset($selected_id))
        $_POST['RequDate'] = sql2date($myrow["required_by"]);
        $_POST['released_date'] = sql2date($myrow["released_date"]);
        $_POST['units_issued'] = $myrow["units_issued"];
-       $_POST['Costs'] = price_format($myrow["additional_costs"]);
 
        $_POST['memo_'] = get_comments_string(ST_WORKORDER, $selected_id);