X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d416d4c43db74a0812d74834d078df9e0d2921a6..5b47ed3efe5f4ef0810096b0f4849047cee54690:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index 3ebae9653..2077e6b0e 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -35,6 +35,7 @@ package IR; use SL::AM; +use SL::DBUtils; sub post_invoice { $main::lxdebug->enter_sub(); @@ -112,7 +113,7 @@ sub post_invoice { $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"}; } - if ($form->{"qty_$i"} != 0) { + if ($form->{"id_$i"}) { # get item baseunit $query = qq|SELECT p.unit @@ -624,6 +625,8 @@ sub post_invoice { ordnumber = '$form->{ordnumber}', quonumber = '$form->{quonumber}', transdate = '$form->{invdate}', + orddate = | . conv_dateq($form->{"orddate"}) . qq|, + quodate = | . conv_dateq($form->{"quodate"}) . qq|, vendor_id = $form->{vendor_id}, amount = $amount, netamount = $netamount, @@ -845,6 +848,7 @@ sub retrieve_invoice { # retrieve invoice $query = qq|SELECT a.cp_id, a.invnumber, a.transdate AS invdate, a.duedate, + a.orddate, a.quodate, a.ordnumber, a.quonumber, a.paid, a.taxincluded, a.notes, a.taxzone_id, a.storno, a.gldate, a.intnotes, a.curr AS currency FROM ap a