From: Janusz Dobrowolski Date: Sun, 13 Feb 2011 08:52:27 +0000 (+0000) Subject: [0000536] Fixed phone/email branch retrieval. X-Git-Tag: 2.3-final~802 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=63e50e05e74af913ebc840fc13bd317937a7dcb2;p=fa-stable.git [0000536] Fixed phone/email branch retrieval. --- diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index fbb669fd..7ececedb 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -108,9 +108,8 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) // FIX - implement editable contact selector in sales order $contact = get_branch_contacts($branch_id, 'order', $customer_id); - $order->set_branch($branch_id, $myrow["tax_group_id"], - $myrow["tax_group_name"], @$contact[0]["phone"], @$contact[0]["email"]); + $myrow["tax_group_name"], @$contact["phone"], @$contact["email"]); $address = trim($myrow["br_post_address"]) != '' ? $myrow["br_post_address"] : (trim($myrow["br_address"]) != '' ? $myrow["br_address"]:$deliver); @@ -394,8 +393,6 @@ function display_order_header(&$order, $editable, $date_text) $order->payment_terms = get_payment_terms($order->payment); $order->due_date = get_invoice_duedate($order->payment, $order->document_date); if ($order->payment_terms['cash_sale']) { - $order->cash_account = $order->pos['pos_account']; - $order->account_name = $order->pos['bank_account_name']; $_POST['Location'] = $order->Location = $order->pos['pos_location']; $order->location_name = $order->pos['location_name']; } @@ -586,7 +583,7 @@ function display_delivery_details(&$order) start_table(TABLESTYLE2, "width=60%"); locations_list_row(_("Deliver from Location:"), 'Location', null, false, true); - label_row(_("Cash account:"), $order->account_name); + label_row(_("Cash account:"), $order->pos['bank_account_name']); textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5); end_table(); } else {