do_query($form, $dbh, $query, @values);
$query =
- qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate) | .
- qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?)|;
+ qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id) | .
+ qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?)|;
@values = ($form->{id}, $form->{AP}, $amount,
- conv_date($form->{"datepaid_$i"}));
+ conv_date($form->{"datepaid_$i"}),
+ conv_i($form->{"paid_project_id_$i"}));
do_query($form, $dbh, $query, @values);
$query =
do_query($form, $dbh, $query, @values);
$query =
- qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo) | .
- qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?, ?)|;
+ qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo, project_id) | .
+ qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?, ?, ?)|;
@values = ($form->{id}, $accno, $form->{"paid_$i"},
$form->{"datepaid_$i"},
- $form->{"source_$i"}, $form->{"memo_$i"});
+ $form->{"source_$i"}, $form->{"memo_$i"},
+ conv_i($form->{"paid_project_id_$i"}));
do_query($form, $dbh, $query, @values);
# gain/loss