Cleanup.
[fa-stable.git] / reporting / rep109.php
index 26ffb53a2a7c7828f47d21ba34dd67852b01461d..b6077b6e9838fdeafe3b3bec4a35548bae542a1c 100644 (file)
@@ -217,15 +217,7 @@ function print_sales_orders()
                $rep->Font();
                if ($email == 1)
                {
-                       $res = get_branch_contacts(branch_code, 'order', customer_id);
-                       if ($myrow['contact_email'] == '')
-                       {
-                               $myrow['contact_email'] = $branch['email'];
-                               if ($myrow['contact_email'] == '')
-                                       $myrow['contact_email'] = $myrow['master_email'];
-                               $myrow['DebtorName'] = $branch['br_name'];
-                       }
-                       //$myrow['reference'] = $i;
+                       $res = get_branch_contacts($branch['branch_code'], 'order', $branch['customer_id']);
                        $rep->End($email, $doc_Invoice_no . " " . $i, $myrow);
                }
        }