[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4293] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4293] branches/1.3
- From: ..hidden..
- Date: Tue, 07 Feb 2012 13:50:14 +0000
Revision: 4293
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4293&view=rev
Author: einhverfr
Date: 2012-02-07 13:50:13 +0000 (Tue, 07 Feb 2012)
Log Message:
-----------
Correcting a few UI issues with batch payment multicurrency handling
Modified Paths:
--------------
branches/1.3/UI/payments/payments_detail.html
branches/1.3/UI/payments/search.html
branches/1.3/scripts/payment.pl
Modified: branches/1.3/UI/payments/payments_detail.html
===================================================================
--- branches/1.3/UI/payments/payments_detail.html 2012-02-07 07:08:04 UTC (rev 4292)
+++ branches/1.3/UI/payments/payments_detail.html 2012-02-07 13:50:13 UTC (rev 4293)
@@ -148,14 +148,24 @@
</div>
<?lsmb IF default_currency != currency ?>
<div class="info" id="exrate_row">
- <?lsmb PROCESS input element_data= {
+ <?lsmb IF fx_from_db ?>
+ <label><?lsmb text('Exchange Rate') ?>:</label> <?lsmb exchangerate ?>
+ <?lsmb PROCESS input element_data = {
+ name = 'exchangerate'
+ value = exchangerate
+ type = 'hidden'
+ };
+ ELSE ;
+
+ PROCESS input element_data= {
label = text('Exchange Rate') #'
type = 'text'
class = "numeric"
name = 'exchangerate'
value = exchangerate
size = 20
- } ?>
+ };
+ END ?>
</div>
<?lsmb END ?>
<?lsmb IF business ?>
Modified: branches/1.3/UI/payments/search.html
===================================================================
--- branches/1.3/UI/payments/search.html 2012-02-07 07:08:04 UTC (rev 4292)
+++ branches/1.3/UI/payments/search.html 2012-02-07 13:50:13 UTC (rev 4293)
@@ -106,6 +106,8 @@
<?lsmb INCLUDE select element_data = {
name = 'currency'
options = currencies
+ text_attr = 'payments_get_open_currencies'
+ value_attr = 'payments_get_open_currencies'
default_optiopns = [default_currency]
label = text('Currency')
} ?>
Modified: branches/1.3/scripts/payment.pl
===================================================================
--- branches/1.3/scripts/payment.pl 2012-02-07 07:08:04 UTC (rev 4292)
+++ branches/1.3/scripts/payment.pl 2012-02-07 13:50:13 UTC (rev 4293)
@@ -119,6 +119,7 @@
if ($payment->{batch_id} && $payment->{batch_date}){
$payment->{date_reversed} = $payment->{batch_date};
}
+ @{$payment->{currencies}} = $payment->get_open_currencies();
my $template = LedgerSMB::Template->new(
user => $request->{_user},
locale => $request->{_locale},
@@ -565,6 +566,14 @@
$payment->get_payment_detail_data();
$payment->open_form();
$payment->{dbh}->commit;
+ my $db_fx = $payment->get_exchange_rate($payment->{currency},
+ $payment->{batch_date});
+ if ($db_fx){
+ $payment->{exchangerate} = $db_fx->bstr;
+ $payment->{fx_from_db} = 1;
+ } else {
+ $payment->{exchangerate} = undef;
+ }
$payment->{grand_total} = 0;
for (@{$payment->{contact_invoices}}){
my $contact_total = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.