diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-19 02:56:07 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-19 02:56:07 +0000 |
commit | 6522290542982f7aece6a9fad9e77f868c611323 (patch) | |
tree | 495ab516e7a8912b559fdecad4ece0816cf98c77 | |
parent | d8e504cc390420e0c53e46e7f4bdc63a571ecae9 (diff) |
Correcting a double-application of a patch
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1426 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/IR.pm | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index d9da72a9..5dc1676b 100755 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -298,28 +298,6 @@ sub post_invoice { last if ( ( $totalqty -= $qty ) >= 0 ); } } else { - # start patch bug 1755355 ############################################################################### - # check for unallocated entries atthe same price to match our entry - $query = qq| - SELECT i.id, i.qty, i.allocated, a.transdate - FROM invoice i - JOIN parts p ON (p.id = i.parts_id) - JOIN ap a ON (a.id = i.trans_id) - WHERE i.parts_id = ? AND (i.qty + i.allocated) > 0 AND i.sellprice = ? - ORDER BY transdate|; - $sth = $dbh->prepare($query); - $sth->execute( $form->{"id_$i"}, $form->{"sellprice_$i"}) || $form->dberror($query); - while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) { - $form->db_parse_numeric(sth=>$sth, hashref => $ref); - my $qty = $ref->{qty} + $ref->{allocated}; - if ( ( $qty - $totalqty ) > 0 ) { $qty = $totalqty; } - # update allocated for sold item - $form->update_balance( $dbh, "invoice", "allocated", qq|id = $ref->{id}|, $qty * -1 ); - $allocated += $qty; - last if ( ( $totalqty -= $qty ) <= 0 ); - } - } else { - # start patch bug 1755355 ############################################################################### # check for unallocated entries atthe same price to match our entry $query = qq| SELECT i.id, i.qty, i.allocated, a.transdate |