Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1a5eedd6

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 1a5eedd682e8711d89b8341231db41483671fcc1
  • Vorgänger 79ae46a4
  • Nachfolger 768b390e

Einkaufsrechnung buchen bei Bestandsmethode: falsche Spaltennamen/-anzahl gefixt

Unterschiede anzeigen:

SL/IR.pm
269 269

  
270 270
            # allocated >= 0
271 271
            # add entry for inventory, this one is for the sold item
272
            $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id) VALUES (?, ?, ?, ?,
272
            $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id, chart_link) VALUES (?, ?, ?, ?,
273 273
                               (SELECT taxkey_id
274 274
                                FROM taxkeys
275 275
                                WHERE chart_id= ?
......
280 280
                                WHERE chart_id= ?
281 281
                                AND startdate <= ?
282 282
                                ORDER BY startdate DESC LIMIT 1),
283
                               (SELECT chart_link FROM chart WHERE id = ?))|;
283
                               (SELECT link FROM chart WHERE id = ?))|;
284 284
            @values = ($ref->{trans_id},  $ref->{inventory_accno_id}, $linetotal, $ref->{transdate}, $ref->{inventory_accno_id}, $ref->{transdate}, $ref->{inventory_accno_id}, $ref->{transdate},
285 285
                       $ref->{inventory_accno_id});
286 286
            do_query($form, $dbh, $query, @values);
287 287

  
288 288
# add expense
289
            $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id) VALUES (?, ?, ?, ?,
289
            $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id, chart_link) VALUES (?, ?, ?, ?,
290 290
                                (SELECT taxkey_id
291 291
                                 FROM taxkeys
292 292
                                 WHERE chart_id= ?
......
297 297
                                 WHERE chart_id= ?
298 298
                                 AND startdate <= ?
299 299
                                 ORDER BY startdate DESC LIMIT 1),
300
                                (SELECT chart_link FROM chart WHERE id = ?))|;
300
                                (SELECT link FROM chart WHERE id = ?))|;
301 301
            @values = ($ref->{trans_id},  $ref->{expense_accno_id}, ($linetotal * -1), $ref->{transdate}, $ref->{expense_accno_id}, $ref->{transdate}, $ref->{expense_accno_id}, $ref->{transdate},
302 302
                       $ref->{expense_accno_id});
303 303
            do_query($form, $dbh, $query, @values);

Auch abrufbar als: Unified diff