diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-10 19:27:48 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-07-10 19:27:48 +0000 |
commit | edf62911e889cf7a6189aafd49f66b2aa396a0c8 (patch) | |
tree | f6af57eae4eae187e2e8a2fcc22556dda14dcfa2 /LedgerSMB | |
parent | 8fc414c2b89f2b4b14d889d84f199ac557ade62b (diff) |
Removing old menu.ini
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1370 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/IR.pm | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index f3008ef3..25b305a7 100644 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -406,8 +406,6 @@ sub post_invoice { $form->update_balance( $dbh, "invoice", "allocated", qq|id = $ref->{id}|, $qty * -1 ); - $form->update_balance( $dbh, "invoice", "allocated", - qq|id =$invoice_id|,$qty); $allocated += $qty; @@ -432,6 +430,33 @@ sub post_invoice { }; } + $query = qq| + UPDATE invoice + SET trans_id = ?, + parts_id = ?, + description = ?, + qty = ?, + sellprice = ?, + fxsellprice = ?, + discount = ?, + allocated = ?, + unit = ?, + deliverydate = ?, + project_id = ?, + serialnumber = ?, + notes = ? + WHERE id = ?|; + $sth = $dbh->prepare($query); + $sth->execute( + $form->{id}, $form->{"id_$i"}, + $form->{"description_$i"}, $form->{"qty_$i"} * -1, + $form->{"sellprice_$i"}, $fxsellprice, + $form->{"discount_$i"}, $allocated, + $form->{"unit_$i"}, $form->{"deliverydate_$i"}, + $project_id, $form->{"serialnumber_$i"}, + $form->{"notes_$i"}, $invoice_id + ) || $form->dberror($query); + } } |