diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-03-17 23:06:29 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-03-17 23:06:29 +0000 |
commit | 47c66435de7d251558c613300988067baf722306 (patch) | |
tree | 74aef9238fc966e5d0b427e0a4eb14694642bcab /LedgerSMB | |
parent | 1d323f4d638f01dbf20a0f8151322ea611a8dd1b (diff) |
Fixing bug 1682775
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@937 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/PE.pm | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/LedgerSMB/PE.pm b/LedgerSMB/PE.pm index 58d7a6cf..7fc00012 100755 --- a/LedgerSMB/PE.pm +++ b/LedgerSMB/PE.pm @@ -1431,23 +1431,33 @@ sub delete_translation { } +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) = @_; + my ($self, $myconfig, $form) = @_; - # connect to database - my $dbh = $form->{dbh}; + # connect to database + my $dbh = $form->{dbh}; - my $query = qq|SELECT current_date|; - my ($transdate) = $dbh->selectrow_array($query); + my $query = qq|SELECT current_date|; + my ($transdate) = $dbh->selectrow_array($query); - $form->all_years($myconfig, $dbh); + $form->all_years($myconfig, $dbh); - $form->all_projects($myconfig, $dbh, $transdate); + $form->all_projects($myconfig, $dbh, $transdate); - $form->all_employees($myconfig, $dbh, $transdate); + $form->all_employees($myconfig, $dbh, $transdate); - $dbh->commit; + $dbh->commit; } |