X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FFlattenToForm.pm;h=95152593bd3b94ca0a4256b33f76fb7221430d8f;hb=e112111e80aafcd8f3c86b4ba2a5c5fe3db4b5c2;hp=d593d693505f57b6e14912536f02a8e69fafae12;hpb=6cdf91d333da67f1ad46b101eecf6ab953cecf73;p=kivitendo-erp.git diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index d593d6935..95152593b 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -29,8 +29,9 @@ sub flatten_to_form { $form->{vc} = $vc if ref($self) =~ /^SL::DB::.*Invoice/; - my @vc_fields = (qw(account_number bank bank_code bic business city contact country creditlimit discount - email fax homepage iban language name payment_terms phone street taxnumber zipcode), + my @vc_fields = (qw(account_number bank bank_code bic business city contact country creditlimit + department_1 department_2 discount email fax homepage iban language name + payment_terms phone street taxnumber ustid zipcode), "${vc}number", ($vc eq 'customer')? 'c_vendor_id': 'v_customer_id'); my @vc_prefixed_fields = qw(email fax notes number phone); @@ -58,9 +59,9 @@ sub flatten_to_form { $idx++; - $form->{"id_${idx}"} = $item->parts_id; - $form->{"partnumber_${idx}"} = $item->part->partnumber; - $form->{"weight_${idx}"} = $item->part->weight; + $form->{"partsgroup_${idx}"} = $item->part->partsgroup->partsgroup if _has($item->part, 'partsgroup_id'); + _copy($item->part, $form, '', "_${idx}", 0, qw(id partnumber weight)); + _copy($item->part, $form, '', "_${idx}", $format_amounts, qw(listprice)); _copy($item, $form, '', "_${idx}", 0, qw(description project_id ship serialnumber pricegroup_id ordnumber cusordnumber unit subtotal longdescription price_factor_id marge_price_factor approved_sellprice reqdate transdate)); _copy($item, $form, '', "_${idx}", $format_amounts, qw(qty sellprice marge_total marge_percent lastcost));