# safety check datev export
if ($::instance_conf->get_datev_check_on_purchase_invoice) {
+ # if we need department for kostenstelle in DATEV check
+ $form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id};
my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
$transdate ||= DateTime->today;
qq|SELECT
p.id, p.partnumber, p.description, p.lastcost AS sellprice, p.listprice,
p.unit, p.assembly, p.onhand, p.formel,
- p.notes AS partnotes, p.notes AS longdescription, p.not_discountable,
+ p.not_discountable,
p.inventory_accno_id, p.price_factor_id,
- p.ean,
+ p.ean, p.notes,
pfac.factor AS price_factor,