diff options
Diffstat (limited to 'LedgerSMB/IR.pm')
-rw-r--r-- | LedgerSMB/IR.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index 714acf61..4812b9f8 100644 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -295,6 +295,12 @@ sub post_invoice { $project_id, $form->{"serialnumber_$i"}, $form->{"notes_$i"}, $invoice_id ) || $form->dberror($query); + if (defined $form->{approved}) { + + $query = qq| UPDATE ap SET approved = ? WHERE id = ?|; + $dbh->prepare($query)->execute($form->{approved}, $form->{id}) + || $form->dberror($query); + } if ( $form->{"inventory_accno_id_$i"} ) { |