Diese werden im Bericht EK-Rechnungen schon aus den DB-Daten der Rechnung
angezeigt und nicht aus den Lieferanten-Stammdaten. Die Zahlungsbedingungen
können ja durchaus mal von denen abweichen, die in den Lieferanten-Stammdaten
hinterlegt sind.
Zudem ist es dann gleich dem Verhalten im Verkauf.
Behebt #35 (redmine)
Refs #36 (redmine)
invoice = ?, taxzone_id = ?, notes = ?, taxincluded = ?,
intnotes = ?, storno_id = ?, storno = ?,
cp_id = ?, employee_id = ?, department_id = ?, delivery_term_id = ?,
invoice = ?, taxzone_id = ?, notes = ?, taxincluded = ?,
intnotes = ?, storno_id = ?, storno = ?,
cp_id = ?, employee_id = ?, department_id = ?, delivery_term_id = ?,
currency_id = (SELECT id FROM currencies WHERE name = ?),
globalproject_id = ?, direct_debit = ?
WHERE id = ?|;
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_i($form->{cp_id}), conv_i($form->{employee_id}), conv_i($form->{department_id}), conv_i($form->{delivery_term_id}),
'1', $taxzone_id, $restricter->process($form->{notes}), $form->{taxincluded} ? 't' : 'f',
$form->{intnotes}, conv_i($form->{storno_id}), $form->{storno} ? 't' : 'f',
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}),
$form->{"currency"},
conv_i($form->{globalproject_id}),
$form->{direct_debit} ? 't' : 'f',
$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,
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
FROM ap
WHERE id = ?|;
$ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{id}));
FROM ap
WHERE id = ?|;
$ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{id}));
+ <tr>
+ <th align="right">[% 'Payment Terms' | $T8 %]</th>
+ <td>[% L.select_tag('payment_id', payment_terms, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]
+ <script type='text/javascript'>$('#payment_id').change(function(){ kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate"); })</script>
+ </td>
+ </tr>
<tr>
<th align="right">[% 'Delivery Terms' | $T8 %] </th>
<td>
<tr>
<th align="right">[% 'Delivery Terms' | $T8 %] </th>
<td>