diff options
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/IS.pm | 7 | ||||
-rwxr-xr-x | LedgerSMB/RC.pm | 4 | ||||
-rwxr-xr-x | LedgerSMB/Session/DB.pm | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index 5cc991c6..034835ff 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -913,6 +913,11 @@ sub post_invoice { my $ml; my $invoice_id; my $ndx; + for (keys %$form) { + if (UNIVERSAL::isa( $form->{$_}, 'Math::BigFloat' )){ + $form->{$_} = $form->{$_}->bstr(); + } + } foreach $i ( 1 .. $form->{rowcount} ) { $form->{"qty_$i"} = $form->parse_amount( $myconfig, $form->{"qty_$i"} ); @@ -1115,7 +1120,7 @@ sub post_invoice { $form->{paid} = 0; for $i ( 1 .. $form->{paidaccounts} ) { $form->{"paid_$i"} = - $form->parse_amount( $myconfig, $form->{"paid_$i"} ); + $form->parse_amount( $myconfig, $form->{"paid_$i"} )->bstr(); $form->{paid} += $form->{"paid_$i"}; $form->{datepaid} = $form->{"datepaid_$i"} if ( $form->{"paid_$i"} ); diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm index 6ffc16bf..63558b49 100755 --- a/LedgerSMB/RC.pm +++ b/LedgerSMB/RC.pm @@ -45,11 +45,11 @@ sub getposlines { my $dbh = $form->{dbh}; my $query = qq| - SELECT sum(amount) AS amount, source FROM acc_trans + SELECT sum(amount) AS amount, memo FROM acc_trans WHERE chart_id = (SELECT id FROM chart WHERE accno = ?) AND transdate = date 'NOW' AND cleared IS NOT TRUE - GROUP BY source|; + GROUP BY memo|; my $sth = $dbh->prepare($query); $sth->execute( $pos_config{till_accno} ) || $form->dberror($query); while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) { diff --git a/LedgerSMB/Session/DB.pm b/LedgerSMB/Session/DB.pm index 9b682e8a..c595a1c0 100755 --- a/LedgerSMB/Session/DB.pm +++ b/LedgerSMB/Session/DB.pm @@ -254,7 +254,6 @@ sub password_check { my ( $dbusername, $md5Password, $cryptPassword ) = $fetchPassword->fetchrow_array; if ( $dbusername ne $username ) { - # User data retrieved from db not for the requested user return 0; } |