var $payment;
var $payment_terms; // cached payment terms
var $credit;
-
+ var $ex_rate;
+
//-------------------------------------------------------------------------
//
// $trans_no==0 => open new/direct document
$company_data = get_company_prefs();
$branch_data = get_branch_accounts($credit_note->Branch);
+ add_new_exchange_rate(get_customer_currency($credit_note->customer_id), $credit_date, $credit_note->ex_rate);
+
$credit_note_total = $credit_note->get_items_total_dispatch();
$freight_tax = $credit_note->get_shipping_tax();
hook_db_prewrite($delivery, ST_CUSTDELIVERY);
$customer = get_customer($delivery->customer_id);
+
+ add_new_exchange_rate($customer['curr_code'], $delivery->document_date, $delivery->ex_rate);
+
$delivery_items_total = $delivery->get_items_total_dispatch();
$freight_tax = $delivery->get_shipping_tax();
$customer = get_customer($invoice->customer_id);
+ add_new_exchange_rate($customer['curr_code'], $date_, $invoice->ex_rate);
+
// offer price values without freight costs
$items_total = $invoice->get_items_total_dispatch();
$freight_tax = $invoice->get_shipping_tax();
$row = get_customer_to_order($_POST['customer_id']);
if ($row['dissallow_invoices'] == 1)
$customer_error = _("The selected customer account is currently on hold. Please contact the credit control personnel to discuss.");
-
}
}
table_section(2);
- if (!is_company_currency($order->customer_currency))
+ if (!is_company_currency($order->customer_currency) && in_array($order->trans_type, array(ST_SALESINVOICE, ST_CUSTDELIVERY)))
{
label_row(_("Customer Currency:"), $order->customer_currency);
exchange_rate_display($order->customer_currency, get_company_currency(),
$cart->dimension_id = $_POST['dimension_id'];
$cart->dimension2_id = $_POST['dimension2_id'];
}
+ $cart->ex_rate = input_num('_ex_rate', null);
}
//-----------------------------------------------------------------------------
if ($cart->trans_type!=ST_SALESORDER && $cart->trans_type!=ST_SALESQUOTE) { // 2008-11-12 Joe Hunt
$_POST['dimension_id'] = $cart->dimension_id;
$_POST['dimension2_id'] = $cart->dimension2_id;
- }
+ }
$_POST['cart_id'] = $cart->cart_id;
-
+ $_POST['_ex_rate'] = $cart->ex_rate;
}
//--------------------------------------------------------------------------------