From da3cca7d4396168d3e14f16a2b902e5e96665ef8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 22 Mar 2022 10:57:05 +0100 Subject: [PATCH] Payment-Helper: Notes in DB-Buchung als Text speichern --- SL/DB/Helper/Payment.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index 6db8951c9..aee932097 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -19,6 +19,7 @@ use List::Util qw(sum); use SL::DATEV qw(:CONSTANTS); use SL::DB::Exchangerate; use SL::DB::Currency; +use SL::HTML::Util; use SL::Locale::String qw(t8); # @@ -622,12 +623,13 @@ sub _skonto_charts_and_tax_correction { $credit = SL::DB::Manager::Chart->find_by(id => $chart_id); $debit = SL::DB::Manager::Chart->find_by(id => $tax_chart_id); croak("No such Chart ID") unless ref $credit eq 'SL::DB::Chart' && ref $debit eq 'SL::DB::Chart'; + my $notes = SL::HTML::Util->strip($self->notes); my $current_transaction = SL::DB::GLTransaction->new( employee_id => $self->employee_id, transdate => $params{transdate_obj}, notes => $params{source} . ' ' . $params{memo}, - description => $self->notes || $self->invnumber, + description => $notes || $self->invnumber, reference => t8('Skonto Tax Correction for') . " " . $tax->rate * 100 . '% ' . $self->invnumber, department_id => $self->department_id ? $self->department_id : undef, imported => 0, # not imported -- 2.20.1