delete $form->{currency} unless $form->{defaultcurrency};
($null, $form->{department_id}) = split(/--/, $form->{department});
- $form->{department_id} *= 1;
if ($form->{currency} eq $form->{defaultcurrency}) {
$form->{exchangerate} = 1;
# update department
($null, $form->{department_id}) = split(/--/, $form->{department});
- $form->{department_id} *= 1;
# amount for AR account
$form->{receivables} = $form->round_amount($form->{amount}, 2) * -1;
}
my ($null, $department_id) = split(/--/, $form->{department});
- $department_id *= 1;
$form->{ob_transaction} *= 1;
$form->{cb_transaction} *= 1;
WHERE id = ?|;
@values = ($form->{reference}, $form->{description}, $form->{notes},
- conv_date($form->{transdate}), $department_id, $form->{taxincluded} ? 't' : 'f',
+ conv_date($form->{transdate}), conv_i($department_id), $form->{taxincluded} ? 't' : 'f',
$form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f',
conv_i($form->{id}));
do_query($form, $dbh, $query, @values);