invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?,
taxincluded = ?, amount = ?, duedate = ?, paid = ?, datepaid = ?,
netamount = ?, curr = ?, notes = ?, department_id = ?,
- employee_id = ?
+ employee_id = ?, storno = ?, storno_id = ?
WHERE id = ?|;
my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount},
conv_date($form->{duedate}), $form->{paid}, conv_date($datepaid), $form->{netamount}, $form->{currency}, $form->{notes}, conv_i($form->{department_id}),
- conv_i($form->{employee_id}), conv_i($form->{id}));
+ conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id}, conv_i($form->{id}));
do_query($form, $dbh, $query, @values);
# amount for AR account
qq| a.duedate, a.netamount, a.amount, a.paid, | .
qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | .
qq| a.shippingpoint, a.storno, a.globalproject_id, | .
+ qq| a.transaction_description, | .
qq| pr.projectnumber AS globalprojectnumber, | .
qq| c.name, | .
qq| e.name AS employee | .
$where .= " AND a.department_id = ?";
push(@values, $department_id);
}
- foreach my $column (qw(invnumber ordnumber notes)) {
+ foreach my $column (qw(invnumber ordnumber notes transaction_description)) {
if ($form->{$column}) {
$where .= " AND a.$column ILIKE ?";
push(@values, $form->like($form->{$column}));