From 4111a678b93c0e0989d8f5b0a72b7b901d9d6c31 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 17 Jul 2007 02:33:57 +0000 Subject: Fixing another cogs bug (1753360) Previously committed fix for user@company login sessions continuing to time out git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1413 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/IR.pm | 6 +++--- LedgerSMB/IS.pm | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index 2f799975..7dd38c3e 100755 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -333,7 +333,7 @@ sub post_invoice { WHERE i.parts_id = ? AND (i.qty + i.allocated) > 0 ORDER BY transdate|; - $sth = $dbh->prepare($query); + my $sth = $dbh->prepare($query); $sth->execute( $form->{"id_$i"} ) || $form->dberror($query); @@ -363,7 +363,7 @@ sub post_invoice { VALUES (?, ?, ?, ?, ?, ?)|; - $sth = $dbh->prepare($query); + my $sth = $dbh->prepare($query); $sth->execute( $ref->{trans_id}, $ref->{inventory_accno_id}, $linetotal, $ref->{transdate}, @@ -385,7 +385,7 @@ sub post_invoice { $sth->execute( $ref->{trans_id}, $ref->{expense_accno_id}, $linetotal * -1, $ref->{transdate}, - $ref->{project_id}, $invoice_id + $:ref->{project_id}, $invoice_id ) || $form->dberror($query); } diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index 0a47cc9d..50931446 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -1057,6 +1057,7 @@ sub post_invoice { &cogs( $dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"}, $project_id ); } else { + my $total_inventory = 0; $query = qq| SELECT i.id, i.qty, i.allocated, a.transdate FROM invoice i -- cgit v1.2.3