From: G. Richardson Date: Thu, 31 Oct 2019 13:19:36 +0000 (+0100) Subject: Dev Record - create_{ar|ap|gl}_transaction mit assign_attributes X-Git-Tag: release-3.5.6.1~395 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5a260a84c4024c4be7a29d8cfaae9f13911230b5;p=kivitendo-erp.git Dev Record - create_{ar|ap|gl}_transaction mit assign_attributes Damit kann man auch Felder setzen, die nicht explizit abgefragt und geprüft werden, z.B. itime manuell setzen. Wird für manche Tests benötigt. --- diff --git a/SL/Dev/Record.pm b/SL/Dev/Record.pm index e9bd05929..2f289d0b4 100644 --- a/SL/Dev/Record.pm +++ b/SL/Dev/Record.pm @@ -384,7 +384,8 @@ sub create_ap_transaction { type => undef, # isn't set for ap employee_id => SL::DB::Manager::Employee->current->id, ); - # $ap_transaction->assign_attributes(%params) if %params; + # assign any parameters that weren't explicitly handled above, e.g. itime + $ap_transaction->assign_attributes(%params) if %params; foreach my $booking ( @{$bookings} ) { my $chart = delete $booking->{chart}; @@ -504,7 +505,8 @@ sub create_ar_transaction { type => undef, # isn't set for ar employee_id => SL::DB::Manager::Employee->current->id, ); - # $ar_transaction->assign_attributes(%params) if %params; + # assign any parameters that weren't explicitly handled above, e.g. itime + $ar_transaction->assign_attributes(%params) if %params; foreach my $booking ( @{$bookings} ) { my $chart = delete $booking->{chart}; @@ -610,6 +612,8 @@ sub create_gl_transaction { storno_id => undef, transactions => [], ); + # assign any parameters that weren't explicitly handled above, e.g. itime + $gl_transaction->assign_attributes(%params) if %params; my @acc_trans; if ( scalar @{$bookings} ) {