- do_query($form, $dbh, $query, $form->{"fxoid_$i"});
+ do_query($form, $dbh, $query, $form->{"oid_$i"});
+
+ # clear fx_transaction
+ if ($form->{"fxoid_$i"}) {
+ $query =
+ qq|UPDATE acc_trans SET cleared = '1' | .
+ qq|WHERE acc_trans_id = ?|;
+ do_query($form, $dbh, $query, $form->{"fxoid_$i"});
+ }