Revision ee2b1ef3
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
158 | 158 |
invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?, |
159 | 159 |
taxincluded = ?, amount = ?, duedate = ?, paid = ?, |
160 | 160 |
netamount = ?, curr = ?, notes = ?, department_id = ?, |
161 |
employee_id = ?, storno = ?, storno_id = ?, globalproject_id = ? |
|
161 |
employee_id = ?, storno = ?, storno_id = ?, globalproject_id = ?, |
|
162 |
direct_debit = ? |
|
162 | 163 |
WHERE id = ?|; |
163 | 164 |
my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount}, |
164 | 165 |
conv_date($form->{duedate}), $form->{paid}, $form->{netamount}, $form->{currency}, $form->{notes}, conv_i($form->{department_id}), |
165 | 166 |
conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id}, |
166 |
conv_i($form->{globalproject_id}), conv_i($form->{id})); |
|
167 |
conv_i($form->{globalproject_id}), $form->{direct_debit} ? 't' : 'f', conv_i($form->{id}));
|
|
167 | 168 |
do_query($form, $dbh, $query, @values); |
168 | 169 |
|
169 | 170 |
# add individual transactions for AR, amount and taxes |
SL/Form.pm | ||
---|---|---|
2736 | 2736 |
$self->{TAX} = selectall_hashref_query($self, $dbh, $query); |
2737 | 2737 |
} |
2738 | 2738 |
|
2739 |
my $extra_columns = ''; |
|
2740 |
$extra_columns .= 'a.direct_debit, ' if $module eq 'AR'; |
|
2741 |
|
|
2739 | 2742 |
if ($self->{id}) { |
2740 | 2743 |
$query = |
2741 | 2744 |
qq|SELECT |
... | ... | |
2743 | 2746 |
a.duedate, a.ordnumber, a.taxincluded, a.curr AS currency, a.notes, |
2744 | 2747 |
a.intnotes, a.department_id, a.amount AS oldinvtotal, |
2745 | 2748 |
a.paid AS oldtotalpaid, a.employee_id, a.gldate, a.type, |
2746 |
a.globalproject_id, |
|
2749 |
a.globalproject_id, ${extra_columns}
|
|
2747 | 2750 |
c.name AS $table, |
2748 | 2751 |
d.description AS department, |
2749 | 2752 |
e.name AS employee |
bin/mozilla/ar.pl | ||
---|---|---|
146 | 146 |
my $form = $main::form; |
147 | 147 |
my %myconfig = %main::myconfig; |
148 | 148 |
|
149 |
my ($duedate, $taxincluded); |
|
150 |
|
|
151 | 149 |
$form->create_links("AR", \%myconfig, "customer"); |
152 |
$duedate = $form->{duedate}; |
|
153 | 150 |
|
154 |
$taxincluded = $form->{taxincluded};
|
|
155 |
my $id = $form->{id}; |
|
151 |
my %saved = map { ($_ => $form->{$_}) } qw(direct_debit duedate id taxincluded);
|
|
152 |
|
|
156 | 153 |
IS->get_customer(\%myconfig, \%$form); |
157 |
$form->{taxincluded} = $taxincluded; |
|
158 |
$form->{id} = $id; |
|
159 | 154 |
|
160 |
$form->{duedate} = $duedate if $duedate;
|
|
155 |
$form->{$_} = $saved{$_} for keys %saved;
|
|
161 | 156 |
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; |
162 | 157 |
$form->{rowcount} = 1; |
163 | 158 |
|
templates/webpages/ar/form_header.html | ||
---|---|---|
80 | 80 |
[%- END %] |
81 | 81 |
<tr> |
82 | 82 |
<td align=right>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td> |
83 |
<th align=left nowrap>[% 'Tax Included' | $T8 %]</th> |
|
83 |
<th align="left" nowrap><label for="taxincluded">[% 'Tax Included' | $T8 %]</label></th> |
|
84 |
</tr> |
|
85 |
<tr> |
|
86 |
<td align="right">[% L.checkbox_tag('direct_debit', checked=direct_debit) %]</td> |
|
87 |
<th align="left" nowrap><label for="direct_debit">[% 'direct debit' | $T8 %]</label></th> |
|
84 | 88 |
</tr> |
85 | 89 |
</table> |
86 | 90 |
</td> |
Auch abrufbar als: Unified diff
Debitorenbuchungen: Checkbox für "Lastschrifteinzug"; Vorbelegung aus Stammdaten