Fixed 0000097,0000098 and view of credit notes with empty lines.
[fa-stable.git] / sales / inquiry / sales_deliveries_view.php
index 98d17a7490b51efce0f4fcec9d66a4bfb859e2e2..0bae13e7b037b0a06df878b647b67e833e395669 100644 (file)
@@ -259,7 +259,10 @@ if ($result)
                {
                $modify_page = $path_to_root . "/sales/customer_delivery.php?" . SID . "ModifyDelivery=" . $myrow["trans_no"];
                $invoice_page = $path_to_root . "/sales/customer_invoice.php?" . SID . "DeliveryNumber=" .$myrow["trans_no"];
-               label_cell("<a href='$modify_page'>" . _("Edit") . "</a>");
+               if (get_voided_entry(13, $myrow["trans_no"]) === false)
+                       label_cell("<a href='$modify_page'>" . _("Edit") . "</a>");
+               else
+                       label_cell("");
                        label_cell(print_document_link($myrow['trans_no'], _("Print")));
 
                label_cell($not_closed ? "<a href='$invoice_page'>" . _("Invoice") . "</a>" : '');