qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | .
qq| a.ordnumber, v.name, a.invoice, a.netamount, a.datepaid, a.notes, | .
qq| a.globalproject_id, a.storno, a.storno_id, a.direct_debit, | .
+ qq| a.transaction_description, | .
qq| pr.projectnumber AS globalprojectnumber, | .
qq| e.name AS employee, | .
qq| v.vendornumber, v.country, v.ustid, | .
$where .= " AND a.ordnumber ILIKE ?";
push(@values, like($form->{ordnumber}));
}
+ if ($form->{transaction_description}) {
+ $where .= " AND a.transaction_description ILIKE ?";
+ push(@values, like($form->{transaction_description}));
+ }
if ($form->{notes}) {
$where .= " AND lower(a.notes) LIKE ?";
push(@values, like($form->{notes}));
invoice = ?, taxzone_id = ?, notes = ?, taxincluded = ?,
intnotes = ?, storno_id = ?, storno = ?, tax_point = ?,
cp_id = ?, employee_id = ?, department_id = ?, delivery_term_id = ?,
- payment_id = ?,
+ payment_id = ?, transaction_description = ?,
currency_id = (SELECT id FROM currencies WHERE name = ?),
globalproject_id = ?, direct_debit = ?
WHERE id = ?|;
'1', $taxzone_id, $restricter->process($form->{notes}), $form->{taxincluded} ? 't' : 'f',
$form->{intnotes}, conv_i($form->{storno_id}), $form->{storno} ? 't' : 'f', conv_date($form->{tax_point}),
conv_i($form->{cp_id}), conv_i($form->{employee_id}), conv_i($form->{department_id}), conv_i($form->{delivery_term_id}),
- conv_i($form->{payment_id}),
+ conv_i($form->{payment_id}), $form->{transaction_description},
$form->{"currency"},
conv_i($form->{globalproject_id}),
$form->{direct_debit} ? 't' : 'f',
ordnumber, quonumber, paid, taxincluded, notes, taxzone_id, storno, gldate,
mtime, itime,
intnotes, (SELECT cu.name FROM currencies cu WHERE cu.id=ap.currency_id) AS currency, direct_debit,
- payment_id, delivery_term_id
+ payment_id, delivery_term_id, transaction_description
FROM ap
WHERE id = ?|;
$ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{id}));
<th align=right nowrap>[% 'Order Number' | $T8 %]</th>
<td>[% L.input_tag("ordnumber", "", style=style) %]</td>
</tr>
+ <tr>
+ <th align="right" nowrap>[% 'Transaction description' | $T8 %]</th>
+ <td>[% L.input_tag("transaction_description", "", style=style) %]</td>
<tr>
<th align=right nowrap>[% 'Notes' | $T8 %]</th>
<td>[% L.input_tag("notes", "", style=style) %]</td>
<td nowrap>[% 'Subtotal' | $T8 %]</td>
<td align=right><input name="l_globalprojectnumber" class=checkbox type=checkbox value=Y></td>
<td nowrap>[% 'Document Project Number' | $T8 %]</td>
+ <td align="right"><input name="l_transaction_description" id="l_transaction_description" class=checkbox type=checkbox value=Y[% IF INSTANCE_CONF.get_require_transaction_description_ps %] checked[% END %]></td>
+ <td nowrap>[% 'Transaction description' | $T8 %]</td>
</tr>
<tr>
<td align=right><input name="l_taxzone" class=checkbox type=checkbox value=Y></td>
</td>
</tr>
[%- END %]
+ <tr>
+ <th align="right">[% 'Transaction description' | $T8 %]</th>
+ <td colspan="3">[% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '') %]</td>
+ </tr>
</table>
</td>
<td align="right" valign="top">