From f24cf1f5ab8428ced545a382d0f0179ae6f40a81 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 26 Nov 2020 11:52:01 +0100 Subject: [PATCH] =?utf8?q?Factur-X/ZUGFeRD:=20neues=20Feld=20=C2=BBUnsere?= =?utf8?q?=20Leitweg-ID=20beim=20Kunden=C2=AB=20in=20Kundenstammdaten?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Wird für XRechnungs-Profil von ZUGFeRD benötigt. --- SL/DB/Helper/FlattenToForm.pm | 2 +- SL/DB/MetaSetup/Customer.pm | 1 + locale/de/all | 1 + .../customer_vendor_routing_id.sql | 5 +++ .../customer_vendor/tabs/billing.html | 38 ++++++++++--------- 5 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 sql/Pg-upgrade2/customer_vendor_routing_id.sql diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 7c001af88..85591c07d 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -39,7 +39,7 @@ sub flatten_to_form { department_1 department_2 discount email fax gln greeting homepage iban language name natural_person phone street taxnumber ustid zipcode), "${vc}number", - ($vc eq 'customer')? 'c_vendor_id': 'v_customer_id'); + ($vc eq 'customer')? qw(c_vendor_id c_vendor_routing_id): 'v_customer_id'); my @vc_prefixed_fields = qw(email fax notes number phone); _copy($self, $form, '', '', 1, qw(amount netamount marge_total marge_percent container_remaining_weight container_remaining_volume paid exchangerate)); diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index d0e1b1414..1daa719e9 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -16,6 +16,7 @@ __PACKAGE__->meta->columns( bic => { type => 'text' }, business_id => { type => 'integer' }, c_vendor_id => { type => 'text' }, + c_vendor_routing_id => { type => 'text' }, cc => { type => 'text' }, city => { type => 'text' }, commercial_court => { type => 'text' }, diff --git a/locale/de/all b/locale/de/all index b0954aa52..789c953ca 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2253,6 +2253,7 @@ $self->{texts} = { 'Others' => 'Andere', 'Otherwise the variable is only available for printing.' => 'Andernfalls steht die Variable nur beim Ausdruck zur Verfügung.', 'Otherwise you can simply check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => 'Andernfalls einfach "Automatisches Zuweisen der Lagerplätze" anhaken und einen Namen für das Lager vergeben, bzw. per Auswahl auswählen (Lagerplätze werden dann automatisch hinzugefügt) danach auf weiter', + 'Our routing id at customer' => 'Unsere Leitweg-ID beim Kunden', 'Out of balance transaction!' => 'Buchung ist nicht ausgeglichen!', 'Out of balance!' => 'Summen stimmen nicht überein!', 'Output Number Format' => 'Zahlenformat (Ausgabe)', diff --git a/sql/Pg-upgrade2/customer_vendor_routing_id.sql b/sql/Pg-upgrade2/customer_vendor_routing_id.sql new file mode 100644 index 000000000..9c868c40f --- /dev/null +++ b/sql/Pg-upgrade2/customer_vendor_routing_id.sql @@ -0,0 +1,5 @@ +-- @tag: customer_vendor_routing_id +-- @description: Kundenstammdaten: Feld »Unsere Leitweg-ID beim Kunden« +-- @depends: release_3_5_6 +ALTER TABLE customer +ADD COLUMN c_vendor_routing_id TEXT; diff --git a/templates/webpages/customer_vendor/tabs/billing.html b/templates/webpages/customer_vendor/tabs/billing.html index 21697713a..861298aa6 100644 --- a/templates/webpages/customer_vendor/tabs/billing.html +++ b/templates/webpages/customer_vendor/tabs/billing.html @@ -242,6 +242,13 @@ + [% IF ( SELF.all_currencies.size ) %] + [% 'Currency' | $T8 %] + + [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id) %] + + [% END %] + [% 'Tax Number / SSN' | $T8 %] @@ -255,34 +262,31 @@ [% L.input_tag('cv.ustid', SELF.cv.ustid, size = 20 ) %] + - - [%- IF ( SELF.is_vendor() ) %] - [% 'Customer Number' | $T8 %] + + [% IF ( SELF.is_customer() ) %] + [% 'Commercial court' | $T8 %] - [% L.input_tag('cv.v_customer_id', SELF.cv.v_customer_id, size = 10) %] + [% L.input_tag('cv.commercial_court', SELF.cv.commercial_court, size = 20) %] - [%- ELSE %] + [% 'our vendor number at customer' | $T8 %] - [% L.input_tag('cv.c_vendor_id', SELF.cv.c_vendor_id, size = 10) %] + [% L.input_tag('cv.c_vendor_id', SELF.cv.c_vendor_id, size = 20) %] - [%- END %] - - - [% IF ( SELF.is_customer() ) %] - [% 'Commercial court' | $T8 %] + [% 'Our routing id at customer' | $T8 %] - [% L.input_tag('cv.commercial_court', SELF.cv.commercial_court, size = 20) %] + [% L.input_tag('cv.c_vendor_routing_id', SELF.cv.c_vendor_routing_id, size = 20) %] - [% END %] - [% IF ( SELF.all_currencies.size ) %] - [% 'Currency' | $T8 %] + + [%- ELSE %] + [% 'Customer Number' | $T8 %] - [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id) %] + [% L.input_tag('cv.v_customer_id', SELF.cv.v_customer_id, size = 20) %] - [% END %] + [%- END %] [% IF ( !INSTANCE_CONF.get_vertreter ) %] -- 2.20.1