my $exchangerate = 0;
$form->{defaultcurrency} = $form->get_default_currency($myconfig);
- delete $form->{currency} unless $form->{defaultcurrency};
($null, $form->{department_id}) = split(/--/, $form->{department});
$query = qq|UPDATE ap SET
invnumber = ?, transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
amount = ?, duedate = ?, paid = ?, netamount = ?,
- curr = ?, notes = ?, department_id = ?, storno = ?, storno_id = ?,
+ currency_id = (SELECT id FROM currencies WHERE name = ?), notes = ?, department_id = ?, storno = ?, storno_id = ?,
globalproject_id = ?, direct_debit = ?
WHERE id = ?|;
@values = ($form->{invnumber}, conv_date($form->{transdate}),
$form->{exchangerate} = $form->format_amount($myconfig, $form->{exchangerate});
$form->{defaultcurrency} = $form->get_default_currency($myconfig);
- delete $form->{currency} unless $form->{defaultcurrency};
# Get the AP accno.
$query =