X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIC.pm;h=ff80d76cb237c12d964188e5ec204604f747467f;hb=4a5e3c2cddaae9021659466eb6ad152bfdcbab9b;hp=8895bf888e39e5bad0dde0360863d5df525ffb58;hpb=8470071b1eea86117e6cece01bb5952c29a0cbc6;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index 8895bf888..ff80d76cb 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -793,7 +793,7 @@ sub all_parts { my @apoe_filters = qw(transdate); my @like_filters = (@simple_filters, @invoice_oi_filters); my @all_columns = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber)); - my @simple_l_switches = (@all_columns, qw(listprice sellprice lastcost priceupdate weight unit bin rop image)); + my @simple_l_switches = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit bin rop image)); my @oe_flags = qw(bought sold onorder ordered rfq quoted); my @qsooqr_flags = qw(invnumber ordnumber quonumber trans_id name module qty); my @deliverydate_flags = qw(deliverydate); @@ -1094,7 +1094,7 @@ sub all_parts { if ($form->{searchitems} eq 'assembly' && $form->{bom}) { $query = qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand, - p.unit, p.bin, + p.unit, p.bin, p.notes, p.sellprice, p.listprice, p.lastcost, p.rop, p.weight, p.priceupdate, p.image, p.drawing, p.microfiche, @@ -1565,6 +1565,11 @@ sub retrieve_accounts { } else { $transdate = $form->{deliverydate}; } + } elsif (($form->{type} eq "credit_note") and $form->{deliverydate}) { + # if credit_note has a deliverydate, use this instead of invdate + # useful for credit_notes of invoices from an old period with different tax + # if there is no deliverydate then invdate is used, old default (see next elsif) + $transdate = $form->{deliverydate}; } elsif (($form->{type} eq "credit_note") || ($form->{script} eq 'ir.pl')) { $transdate = $form->{invdate}; } else {