Revision e2305bab
Von Philip Reetz vor mehr als 16 Jahren hinzugefügt
SL/GL.pm | ||
---|---|---|
109 | 109 |
my ($null, $department_id) = split(/--/, $form->{department}); |
110 | 110 |
$department_id *= 1; |
111 | 111 |
|
112 |
$form->{ob_transaction} *= 1; |
|
113 |
$form->{cb_transaction} *= 1; |
|
114 |
|
|
112 | 115 |
$query = |
113 | 116 |
qq|UPDATE gl SET |
114 | 117 |
reference = ?, description = ?, notes = ?, |
115 | 118 |
transdate = ?, department_id = ?, taxincluded = ?, |
116 |
storno = ?, storno_id = ? |
|
119 |
storno = ?, storno_id = ?, ob_transaction = ?, cb_transaction = ?
|
|
117 | 120 |
WHERE id = ?|; |
118 | 121 |
|
119 | 122 |
@values = ($form->{reference}, $form->{description}, $form->{notes}, |
120 | 123 |
conv_date($form->{transdate}), $department_id, $form->{taxincluded}, |
121 |
$form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), |
|
124 |
$form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f',
|
|
122 | 125 |
conv_i($form->{id})); |
123 | 126 |
do_query($form, $dbh, $query, @values); |
124 | 127 |
|
... | ... | |
153 | 156 |
if ($amount != 0) { |
154 | 157 |
$query = |
155 | 158 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, |
156 |
source, memo, project_id, taxkey) |
|
159 |
source, memo, project_id, taxkey, ob_transaction, cb_transaction)
|
|
157 | 160 |
VALUES (?, (SELECT id FROM chart WHERE accno = ?), |
158 |
?, ?, ?, ?, ?, ?)|; |
|
161 |
?, ?, ?, ?, ?, ?, ?, ?)|;
|
|
159 | 162 |
@values = (conv_i($form->{id}), $accno, $amount, conv_date($form->{transdate}), |
160 |
$form->{"source_$i"}, $form->{"memo_$i"}, $project_id, $taxkey); |
|
163 |
$form->{"source_$i"}, $form->{"memo_$i"}, $project_id, $taxkey, $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f');
|
|
161 | 164 |
do_query($form, $dbh, $query, @values); |
162 | 165 |
} |
163 | 166 |
|
... | ... | |
563 | 566 |
if ($form->{id}) { |
564 | 567 |
$query = |
565 | 568 |
qq|SELECT g.reference, g.description, g.notes, g.transdate, g.storno, g.storno_id, |
566 |
d.description AS department, e.name AS employee, g.taxincluded, g.gldate |
|
569 |
d.description AS department, e.name AS employee, g.taxincluded, g.gldate, |
|
570 |
g.ob_transaction, g.cb_transaction |
|
567 | 571 |
FROM gl g |
568 | 572 |
LEFT JOIN department d ON (d.id = g.department_id) |
569 | 573 |
LEFT JOIN employee e ON (e.id = g.employee_id) |
Auch abrufbar als: Unified diff
Markieren von Dialogbuchungen als Eroeffnungs- oder Schlussbilanzbuchungen