[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [938] trunk



Revision: 938
          http://svn.sourceforge.net/ledger-smb/?rev=938&view=rev
Author:   einhverfr
Date:     2007-03-17 16:09:08 -0700 (Sat, 17 Mar 2007)

Log Message:
-----------
Fixing bug 1682775

Modified Paths:
--------------
    trunk/LedgerSMB/PE.pm
    trunk/bin/pe.pl

Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm	2007-03-17 23:06:29 UTC (rev 937)
+++ trunk/LedgerSMB/PE.pm	2007-03-17 23:09:08 UTC (rev 938)
@@ -1431,7 +1431,18 @@
 
 }
 
+sub timecard_get_currency {
+	my $self = shift @_;
+	my $form = shift @_;
+	my $dbh = $form->{dbh};
+	my $query = qq|SELECT curr FROM customer WHERE id = ?|;
+        my $sth = $dbh->prepare($query);
+	$sth->execute($form->{customer_id});
+	my ($curr) = $sth->fetchrow_array;
+	$form->{currency} = $curr;
+}
 
+
 sub project_sales_order {
    my ($self, $myconfig, $form) = @_;
   

Modified: trunk/bin/pe.pl
===================================================================
--- trunk/bin/pe.pl	2007-03-17 23:06:29 UTC (rev 937)
+++ trunk/bin/pe.pl	2007-03-17 23:09:08 UTC (rev 938)
@@ -2551,6 +2551,8 @@
     
     for (qw(intnotes employee employee_id)) { delete $order->{$_} }
 
+    PE->timecard_get_currency(\%$order);
+    
     if (OE->save(\%myconfig, \%$order)) {
       if (! PE->allocate_projectitems(\%myconfig, \%$order)) {
 	OE->delete(\%myconfig, \%$order, ${LedgerSMB::Sysconfig::spool});


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.