Smaller technical fixes.
[fa-stable.git] / sales / includes / sales_db.inc
index 3638ae0f4a0a560fe8292480e726e50fab78932a..0503abd3c2a94e3a321800c14fc20814c2bf1ea6 100644 (file)
@@ -238,13 +238,6 @@ function set_document_parent($cart)
        return 0; // batch or complete invoice
 }
 
-//--------------------------------------------------------------------------------------------------
-function get_parent_type($type)
-{
-       $parent_types = array( ST_CUSTCREDIT => ST_SALESINVOICE, ST_SALESINVOICE => ST_CUSTDELIVERY, ST_CUSTDELIVERY => ST_SALESORDER );
-       return isset($parent_types[$type]) ?  $parent_types[$type] : 0;
-}
-
 //--------------------------------------------------------------------------------------------------
 function update_parent_line($doc_type, $line_id, $qty_dispatched, $auto=false)
 {
@@ -317,7 +310,7 @@ function read_sales_trans($doc_type, $trans_no, &$cart)
                        $myrow["curr_code"], $myrow["discount"], $myrow["payment_terms"]);
 
                $cart->set_branch($myrow["branch_code"], $myrow["tax_group_id"],
-                       $myrow["tax_group_name"],       $myrow["phone"], $myrow["email"]);
+                       $myrow["tax_group_name"]);
 
                $cart->reference = $myrow["reference"];
                $cart->order_no = $myrow["order_"];