+ $type = get_post('PayType');
+ $bank_curr = get_bank_account_currency(get_post('bank_account'));
+ $person_curr = $type == PT_CUSTOMER ? get_customer_currency(get_post('person_id'))
+ : ($type == PT_SUPPLIER ? get_supplier_currency(get_post('person_id')) : $bank_curr);
+
+ if ($person_curr != $bank_curr)
+ {
+ $_POST['settled_amount'] =
+ price_format($order->gl_items_total() / get_exchange_rate_from_to($bank_curr, $person_curr, get_post('date_')));
+ amount_row($type == PT_CUSTOMER ? _("Settled AR Amount:") : _("Settled AP Amount:"),
+ 'settled_amount', null, null, $person_curr, user_price_dec());
+ }