- my $dbh = C4::Context->dbh;
- my $query = qq|
- UPDATE aqbudgets
- SET budget_code = ?,
- budget_period_id = ?,
- budget_parent_id = ?,
- budget_name = ?,
- budget_branchcode = ?,
- budget_amount = ?,
- budget_amount_sublevel = ?,
- budget_encumb = ?,
- budget_expend = ?,
- budget_notes = ?,
- sort1_authcat = ?,
- sort2_authcat = ?,
- budget_owner_id = ?,
- budget_permission = ?
- WHERE budget_id = ?
- |;
-
- my $sth = $dbh->prepare($query);
- $sth->execute(
- $budget->{'budget_code'} ? $budget->{'budget_code'} : undef,
- $budget->{'budget_period_id'} ? $budget->{'budget_period_id'} : undef,
- $budget->{'budget_parent_id'} ? $budget->{'budget_parent_id'} : undef,
- $budget->{'budget_name'} ? $budget->{'budget_name'} : undef,
- $budget->{'budget_branchcode'} ? $budget->{'budget_branchcode'} : undef,
- $budget->{'budget_amount'} ? $budget->{'budget_amount'} : undef,
- $budget->{'budget_amount_sublevel'} ? $budget->{'budget_amount_sublevel'} : undef,
- $budget->{'budget_encumb'} ? $budget->{'budget_encumb'} : undef,
- $budget->{'budget_expend'} ? $budget->{'budget_expend'} : undef,
- $budget->{'budget_notes'} ? $budget->{'budget_notes'} : undef,
- $budget->{'sort1_authcat'} ? $budget->{'sort1_authcat'} : undef,
- $budget->{'sort2_authcat'} ? $budget->{'sort2_authcat'} : undef,
- $budget->{'budget_owner_id'} ? $budget->{'budget_owner_id'} : undef,
- $budget->{'budget_permission'} ? $budget->{'budget_permission'} : undef,
- $budget->{'budget_id'},
- );
- $sth->finish;