From: Moritz Bunkus Date: Tue, 7 Jan 2014 18:09:55 +0000 (+0100) Subject: Merge branch 'sepa-fixes-2320' X-Git-Tag: release-3.1.0beta1~22^2~22^2~21 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/b021f0f5808d9a3b02ddc7f13c206ebc88387ff1?hp=d6db88a35e7253f6d9a0278141f71d7c78e1f5f8 Merge branch 'sepa-fixes-2320' Behebt #2320. --- diff --git a/SL/CT.pm b/SL/CT.pm index b7ae9a504..fa1f91477 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -308,7 +308,8 @@ sub get_bank_info { my $table = $params{vc} eq 'customer' ? 'customer' : 'vendor'; my @ids = ref $params{id} eq 'ARRAY' ? @{ $params{id} } : ($params{id}); my $placeholders = join ", ", ('?') x scalar @ids; - my $query = qq|SELECT id, name, account_number, bank, bank_code, iban, bic + my $c_mandate = $params{vc} eq 'customer' ? ', mandator_id, mandate_date_of_signature' : ''; + my $query = qq|SELECT id, name, account_number, bank, bank_code, iban, bic ${c_mandate} FROM ${table} WHERE id IN (${placeholders})|; diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index 2d5a155b9..0f523a466 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -9,52 +9,55 @@ use base qw(SL::DB::Object); __PACKAGE__->meta->table('customer'); __PACKAGE__->meta->columns( - account_number => { type => 'text' }, - bank => { type => 'text' }, - bank_code => { type => 'text' }, - bcc => { type => 'text' }, - bic => { type => 'varchar', length => 100 }, - business_id => { type => 'integer' }, - c_vendor_id => { type => 'text' }, - cc => { type => 'text' }, - city => { type => 'varchar', length => 75 }, - contact => { type => 'text' }, - country => { type => 'varchar', length => 75 }, - creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 }, - currency_id => { type => 'integer', not_null => 1 }, - customernumber => { type => 'text' }, - delivery_term_id => { type => 'integer' }, - department_1 => { type => 'varchar', length => 75 }, - department_2 => { type => 'varchar', length => 75 }, - direct_debit => { type => 'boolean', default => 'false' }, - discount => { type => 'float', precision => 4 }, - email => { type => 'text' }, - fax => { type => 'varchar', length => 30 }, - greeting => { type => 'text' }, - homepage => { type => 'text' }, - iban => { type => 'varchar', length => 100 }, - id => { type => 'integer', not_null => 1, sequence => 'id' }, - itime => { type => 'timestamp', default => 'now()' }, - klass => { type => 'integer', default => '0' }, - language => { type => 'varchar', length => 5 }, - language_id => { type => 'integer' }, - mtime => { type => 'timestamp' }, - name => { type => 'text', not_null => 1 }, - notes => { type => 'text' }, - obsolete => { type => 'boolean', default => 'false' }, - payment_id => { type => 'integer' }, - phone => { type => 'text' }, - salesman_id => { type => 'integer' }, - street => { type => 'varchar', length => 75 }, - taxincluded => { type => 'boolean' }, - taxincluded_checked => { type => 'boolean' }, - taxnumber => { type => 'text' }, - taxzone_id => { type => 'integer', default => '0', not_null => 1 }, - terms => { type => 'integer', default => '0' }, - user_password => { type => 'text' }, - username => { type => 'varchar', length => 50 }, - ustid => { type => 'text' }, - zipcode => { type => 'varchar', length => 10 }, + account_number => { type => 'text' }, + bank => { type => 'text' }, + bank_code => { type => 'text' }, + bcc => { type => 'text' }, + bic => { type => 'varchar', length => 100 }, + business_id => { type => 'integer' }, + c_vendor_id => { type => 'text' }, + cc => { type => 'text' }, + city => { type => 'varchar', length => 75 }, + contact => { type => 'text' }, + country => { type => 'varchar', length => 75 }, + creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 }, + currency_id => { type => 'integer', not_null => 1 }, + customernumber => { type => 'text' }, + delivery_term_id => { type => 'integer' }, + department_1 => { type => 'varchar', length => 75 }, + department_2 => { type => 'varchar', length => 75 }, + depositor => { type => 'text' }, + direct_debit => { type => 'boolean', default => 'false' }, + discount => { type => 'float', precision => 4 }, + email => { type => 'text' }, + fax => { type => 'varchar', length => 30 }, + greeting => { type => 'text' }, + homepage => { type => 'text' }, + iban => { type => 'varchar', length => 100 }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + itime => { type => 'timestamp', default => 'now()' }, + klass => { type => 'integer', default => '0' }, + language => { type => 'varchar', length => 5 }, + language_id => { type => 'integer' }, + mandate_date_of_signature => { type => 'date' }, + mandator_id => { type => 'text' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + notes => { type => 'text' }, + obsolete => { type => 'boolean', default => 'false' }, + payment_id => { type => 'integer' }, + phone => { type => 'text' }, + salesman_id => { type => 'integer' }, + street => { type => 'varchar', length => 75 }, + taxincluded => { type => 'boolean' }, + taxincluded_checked => { type => 'boolean' }, + taxnumber => { type => 'text' }, + taxzone_id => { type => 'integer', default => '0', not_null => 1 }, + terms => { type => 'integer', default => '0' }, + user_password => { type => 'text' }, + username => { type => 'varchar', length => 50 }, + ustid => { type => 'text' }, + zipcode => { type => 'varchar', length => 10 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); diff --git a/SL/DB/MetaSetup/SepaExportItem.pm b/SL/DB/MetaSetup/SepaExportItem.pm index 08dd06e18..f2b325d85 100644 --- a/SL/DB/MetaSetup/SepaExportItem.pm +++ b/SL/DB/MetaSetup/SepaExportItem.pm @@ -9,21 +9,25 @@ use base qw(SL::DB::Object); __PACKAGE__->meta->table('sepa_export_items'); __PACKAGE__->meta->columns( - amount => { type => 'numeric', precision => 5, scale => 25 }, - ap_id => { type => 'integer' }, - ar_id => { type => 'integer' }, - chart_id => { type => 'integer', not_null => 1 }, - end_to_end_id => { type => 'varchar', length => 35 }, - executed => { type => 'boolean', default => 'false' }, - execution_date => { type => 'date' }, - id => { type => 'integer', not_null => 1, sequence => 'id' }, - our_bic => { type => 'varchar', length => 100 }, - our_iban => { type => 'varchar', length => 100 }, - reference => { type => 'varchar', length => 35 }, - requested_execution_date => { type => 'date' }, - sepa_export_id => { type => 'integer', not_null => 1 }, - vc_bic => { type => 'varchar', length => 100 }, - vc_iban => { type => 'varchar', length => 100 }, + amount => { type => 'numeric', precision => 5, scale => 25 }, + ap_id => { type => 'integer' }, + ar_id => { type => 'integer' }, + chart_id => { type => 'integer', not_null => 1 }, + end_to_end_id => { type => 'varchar', length => 35 }, + executed => { type => 'boolean', default => 'false' }, + execution_date => { type => 'date' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + our_bic => { type => 'varchar', length => 100 }, + our_depositor => { type => 'text' }, + our_iban => { type => 'varchar', length => 100 }, + reference => { type => 'varchar', length => 35 }, + requested_execution_date => { type => 'date' }, + sepa_export_id => { type => 'integer', not_null => 1 }, + vc_bic => { type => 'varchar', length => 100 }, + vc_depositor => { type => 'text' }, + vc_iban => { type => 'varchar', length => 100 }, + vc_mandate_date_of_signature => { type => 'date' }, + vc_mandator_id => { type => 'text' }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); diff --git a/SL/DB/MetaSetup/Vendor.pm b/SL/DB/MetaSetup/Vendor.pm index f2988ad74..0493aa374 100644 --- a/SL/DB/MetaSetup/Vendor.pm +++ b/SL/DB/MetaSetup/Vendor.pm @@ -24,6 +24,7 @@ __PACKAGE__->meta->columns( delivery_term_id => { type => 'integer' }, department_1 => { type => 'varchar', length => 75 }, department_2 => { type => 'varchar', length => 75 }, + depositor => { type => 'text' }, direct_debit => { type => 'boolean', default => 'false' }, discount => { type => 'float', precision => 4 }, email => { type => 'text' }, diff --git a/SL/SEPA.pm b/SL/SEPA.pm index d31204e3b..63efe2c5a 100644 --- a/SL/SEPA.pm +++ b/SL/SEPA.pm @@ -19,12 +19,14 @@ sub retrieve_open_invoices { my $arap = $params{vc} eq 'customer' ? 'ar' : 'ap'; my $vc = $params{vc} eq 'customer' ? 'customer' : 'vendor'; + my $mandate = $params{vc} eq 'customer' ? " AND COALESCE(vc.mandator_id, '') <> '' AND vc.mandate_date_of_signature IS NOT NULL " : ''; + my $query = qq| SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice, vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${arap}.direct_debit, - COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok, + COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' ${mandate} AS vc_bank_info_ok, ${arap}.amount - ${arap}.paid - COALESCE(open_transfers.amount, 0) AS open_amount @@ -76,14 +78,16 @@ sub create_export { my $q_item_id = qq|SELECT nextval('id')|; my $h_item_id = prepare_query($form, $dbh, $q_item_id); + my $c_mandate = $params{vc} eq 'customer' ? ', vc_mandator_id, vc_mandate_date_of_signature' : ''; + my $p_mandate = $params{vc} eq 'customer' ? ', ?, ?' : ''; my $q_insert = qq|INSERT INTO sepa_export_items (id, sepa_export_id, ${arap}_id, chart_id, amount, requested_execution_date, reference, end_to_end_id, - our_iban, our_bic, vc_iban, vc_bic) + our_iban, our_bic, vc_iban, vc_bic ${c_mandate}) VALUES (?, ?, ?, ?, ?, ?, ?, ?, - ?, ?, ?, ?)|; + ?, ?, ?, ? ${p_mandate})|; my $h_insert = prepare_query($form, $dbh, $q_insert); my $q_reference = @@ -130,6 +134,8 @@ sub create_export { $transfer->{reference}, $end_to_end_id, map { my $pfx = $_; map { $transfer->{"${pfx}_${_}"} } qw(iban bic) } qw(our vc)); + push @values, $transfer->{vc_mandator_id}, conv_date($transfer->{vc_mandate_date_of_signature}) if $params{vc} eq 'customer'; + do_statement($form, $h_insert, $q_insert, @values); } @@ -177,8 +183,10 @@ sub retrieve_export { if ($export->{id}) { my ($columns, $joins); + my $mandator_id = $params{vc} eq 'customer' ? ', mandator_id, mandate_date_of_signature' : ''; + if ($params{details}) { - $columns = qq|, arap.invnumber, arap.invoice, arap.transdate AS reference_date, vc.name AS vc_name, vc.${vc}number AS vc_number, c.accno AS chart_accno, c.description AS chart_description|; + $columns = qq|, arap.invnumber, arap.invoice, arap.transdate AS reference_date, vc.name AS vc_name, vc.${vc}number AS vc_number, c.accno AS chart_accno, c.description AS chart_description ${mandator_id}|; $joins = qq|LEFT JOIN ${arap} arap ON (sei.${arap}_id = arap.id) LEFT JOIN ${vc} vc ON (arap.${vc}_id = vc.id) LEFT JOIN chart c ON (sei.chart_id = c.id)|; diff --git a/SL/SEPA/XML.pm b/SL/SEPA/XML.pm index 90c77ec3d..8ccfa8374 100644 --- a/SL/SEPA/XML.pm +++ b/SL/SEPA/XML.pm @@ -223,8 +223,8 @@ sub to_xml { $xml->startTag('DrctDbtTx'); $xml->startTag('MndtRltdInf'); - $xml->dataElement('MndtId', $self->_restricted_identification_sepa2($transaction->get('company_number'))); - $xml->dataElement('DtOfSgntr', $transaction->get('reference_date', 2010-12-02)); + $xml->dataElement('MndtId', $self->_restricted_identification_sepa2($transaction->get('mandator_id'))); + $xml->dataElement('DtOfSgntr', $self->_restricted_identification_sepa2($transaction->get('date_of_signature'))); $xml->endTag('MndtRltdInf'); $xml->startTag('CdtrSchmeId'); diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index 2850bfb14..6fb9907d2 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -1,7 +1,7 @@ use strict; use List::MoreUtils qw(any none uniq); -use List::Util qw(first); +use List::Util qw(sum first); use POSIX qw(strftime); use SL::BankAccount; @@ -105,14 +105,19 @@ sub bank_transfer_create { $form->error($locale->text('You have selected none of the invoices.')); } + my $total_trans = sum map { $_->{open_amount} } @bank_transfers; + my ($vc_bank_info); my $error_message; + my @bank_columns = qw(iban bic); + push @bank_columns, qw(mandator_id mandate_date_of_signature) if $vc eq 'customer'; + if ($form->{confirmation}) { $vc_bank_info = { map { $_->{id} => $_ } @{ $form->{vc_bank_info} || [] } }; foreach my $info (values %{ $vc_bank_info }) { - if (any { !$info->{$_} } qw(iban bic)) { + if (any { !$info->{$_} } @bank_columns) { $error_message = $locale->text('The bank information must not be empty.'); last; } @@ -136,11 +141,12 @@ sub bank_transfer_create { 'bank_account_label' => $bank_account_label_sub, 'error_message' => $error_message, 'vc' => $vc, + 'total_trans' => $total_trans, }); } else { foreach my $bank_transfer (@bank_transfers) { - foreach (qw(iban bic)) { + foreach (@bank_columns) { $bank_transfer->{"vc_${_}"} = $vc_bank_info->{ $bank_transfer->{vc_id} }->{$_}; $bank_transfer->{"our_${_}"} = $bank_account->{$_}; } @@ -493,6 +499,7 @@ sub bank_transfer_download_sepa_xml { foreach my $item (@items) { my $requested_execution_date; + my $mandator_id; if ($item->{requested_execution_date}) { my ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{requested_execution_date}); $requested_execution_date = sprintf '%04d-%02d-%02d', $yy, $mm, $dd; @@ -501,6 +508,11 @@ sub bank_transfer_download_sepa_xml { if ($vc eq 'customer') { my ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{reference_date}); $item->{reference_date} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd; + $mandator_id = $item->{mandator_id}; + if ($item->{mandate_date_of_signature}) { + ($yy, $mm, $dd) = $locale->parse_date($myconfig, $item->{mandate_date_of_signature}); + $item->{mandate_date_of_signature} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd; + } } $sepa_xml->add_transaction({ 'src_iban' => $item->{our_iban}, @@ -511,9 +523,11 @@ sub bank_transfer_download_sepa_xml { 'company_number' => $item->{vc_number}, 'amount' => $item->{amount}, 'reference' => $item->{reference}, + 'mandator_id' => $mandator_id, 'reference_date' => $item->{reference_date}, 'execution_date' => $requested_execution_date, - 'end_to_end_id' => $item->{end_to_end_id} }); + 'end_to_end_id' => $item->{end_to_end_id}, + 'date_of_signature' => $item->{mandate_date_of_signature}, }); } my $xml = $sepa_xml->to_xml(); diff --git a/locale/de/all b/locale/de/all index f4f207dc0..ddc1a1db7 100755 --- a/locale/de/all +++ b/locale/de/all @@ -278,6 +278,7 @@ $self->{texts} = { 'Bank Code Number' => 'Bankleitzahl', 'Bank Connection Tax Office' => 'Bankverbindung des Finanzamts', 'Bank Connections' => 'Bankverbindungen', + 'Bank account' => 'Bankkonto', 'Bank accounts' => 'Bankkonten', 'Bank code' => 'Bankleitzahl', 'Bank collection amount' => 'Einzugsbetrag', @@ -1286,6 +1287,8 @@ $self->{texts} = { 'Make default profile' => 'Zu Standardprofil machen', 'Manage Custom Variables' => 'Benutzerdefinierte Variablen', 'Mandantennummer' => 'Mandantennummer', + 'Mandate Date of Signature' => 'Mandat-Unterschriftsdatum', + 'Mandator ID' => 'Mandanten-ID', 'Mandatory Departments' => 'Benutzer muss Abteilungen vergeben', 'Map' => 'Karte', 'Mar' => 'März', @@ -1494,6 +1497,7 @@ $self->{texts} = { 'Outputformat' => 'Ausgabeformat', 'Overdue sales quotations and requests for quotations' => 'Überfällige Angebote und Preisanfragen', 'Override invoice language' => 'Diese Sprache verwenden', + 'Owner of account' => 'Kontoinhaber', 'PAYMENT POSTED' => 'Rechung gebucht', 'PDF' => 'PDF', 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)', @@ -2001,6 +2005,7 @@ $self->{texts} = { 'Sum Credit' => 'Summe Haben', 'Sum Debit' => 'Summe Soll', 'Sum for' => 'Summe für', + 'Sum open amount' => 'Summierter offener Betrag', 'Sum per' => 'Summe per', 'Summen- und Saldenliste' => 'Summen- und Saldenliste', 'Superuser name' => 'Datenbankadministrator', @@ -2224,6 +2229,8 @@ $self->{texts} = { 'The project type has been deleted.' => 'Der Projekttyp wurde gelöscht.', 'The project type has been saved.' => 'Der Projekttyp wurde gespeichert.', 'The project type is in use and cannot be deleted.' => 'Der Projekttyp wird verwendet und kann nicht gelöscht werden.', + 'The required information consists of the IBAN and the BIC.' => 'Die benötigten Informationen bestehen aus der IBAN und der BIC.', + 'The required information consists of the IBAN, the BIC, the mandator ID and the mandate\'s date of signature.' => 'Die benötigten Informationen bestehen aus IBAN, BIC, Mandanten-ID und dem Unterschriftsdatum des Mandates.', 'The second reason is that kivitendo allowed the user to enter the tax amount manually regardless of the taxkey used.' => 'Der zweite Grund war, dass kivitendo zuließ, dass die Benutzer beliebige, von den tatsächlichen Steuerschlüsseln unabhängige Steuerbeträge eintrugen.', 'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.', 'The selected bank account does not exist anymore.' => 'Das ausgewählte Bankkonto existiert nicht mehr.', diff --git a/sql/Pg-upgrade2/add_customer_mandator_id.sql b/sql/Pg-upgrade2/add_customer_mandator_id.sql new file mode 100644 index 000000000..99a788e92 --- /dev/null +++ b/sql/Pg-upgrade2/add_customer_mandator_id.sql @@ -0,0 +1,18 @@ +-- @tag: add_customer_mandator_id +-- @description: Einführen einer Mandanten-ID- und Signatur-Datums-Spalte bei Kunden. +-- @depends: release_3_0_0 + +ALTER TABLE customer ADD COLUMN mandator_id text; +ALTER TABLE customer ADD COLUMN mandate_date_of_signature date; +ALTER TABLE sepa_export_items ADD COLUMN vc_mandator_id text; +ALTER TABLE sepa_export_items ADD COLUMN vc_mandate_date_of_signature date; + +UPDATE sepa_export_items +SET vc_mandator_id = ( + SELECT c.customernumber + FROM ar + LEFT JOIN customer c ON (ar.customer_id = c.id) + WHERE ar.id = sepa_export_items.ar_id +), +vc_mandate_date_of_signature = '2010-01-01'::date +WHERE ar_id IS NOT NULL; diff --git a/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql b/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql new file mode 100644 index 000000000..cba51d711 --- /dev/null +++ b/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql @@ -0,0 +1,11 @@ +-- @tag: add_depositor_for_customer_vendor +-- @description: Einführen einer Depositor (Kontoinhaber) Spalte bei Customer bzw. Vendor +-- @depends: sepa + +ALTER TABLE customer ADD depositor text; +ALTER TABLE vendor ADD depositor text; +ALTER TABLE sepa_export_items ADD our_depositor text; +ALTER TABLE sepa_export_items ADD vc_depositor text; + +UPDATE customer SET depositor = name; +UPDATE vendor SET depositor = name; diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index a0d1ab951..ad2da05ab 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -16,6 +16,7 @@
[% PROCESS "customer_vendor/tabs/billing.html" %] + [% PROCESS "customer_vendor/tabs/bank.html" %] [% PROCESS "customer_vendor/tabs/shipto.html" %] [% PROCESS "customer_vendor/tabs/contacts.html" %] [% IF ( SELF.cv.id && AUTH.assert('sales_all_edit', 1) ) %] @@ -102,4 +104,3 @@ } --> - diff --git a/templates/webpages/customer_vendor/tabs/bank.html b/templates/webpages/customer_vendor/tabs/bank.html new file mode 100644 index 000000000..1f08af4b5 --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/bank.html @@ -0,0 +1,63 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] + +
+ + + + + + + [%- IF ( SELF.is_customer ) %] + + + + + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% 'Owner of account' | $T8 %] + [% L.input_tag('cv.depositor', SELF.cv.depositor, size = 20) %] + [% 'Mandator ID' | $T8 %] + [% L.input_tag('cv.mandator_id', SELF.cv.mandator_id, size = 20) %] + [% 'Mandate Date of Signature' | $T8 %] + [% L.date_tag('cv.mandate_date_of_signature', SELF.cv.mandate_date_of_signature) %] +
[% 'IBAN' | $T8 %] + [% L.input_tag('cv.iban', SELF.cv.iban, size = 34, maxlength = 100) %] + [% 'BIC' | $T8 %] + [% L.input_tag('cv.bic', SELF.cv.bic, size = 20, maxlength = 100) %] + [% 'Bank' | $T8 %] + [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %] +
[% 'Account Number' | $T8 %] + [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 20, maxlength = 100) %] + [% 'Bank Code Number' | $T8 %] + [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 20, maxlength = 100) %] +
+
diff --git a/templates/webpages/customer_vendor/tabs/billing.html b/templates/webpages/customer_vendor/tabs/billing.html index 5c036e070..c65bed08f 100644 --- a/templates/webpages/customer_vendor/tabs/billing.html +++ b/templates/webpages/customer_vendor/tabs/billing.html @@ -246,50 +246,15 @@ [%- END %] + [% IF ( SELF.all_currencies.size ) %] - [% 'Account Number' | $T8 %] - - - [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 20, maxlength = 100) %] - - - - [% 'Bank Code Number' | $T8 %] - - - [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 20, maxlength = 100) %] - - - - [% 'Bank' | $T8 %] - - - [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %] - - - - - [% 'IBAN' | $T8 %] - - - [% L.input_tag('cv.iban', SELF.cv.iban, size = 34, maxlength = 100) %] - - - - [% 'BIC' | $T8 %] - - [% L.input_tag('cv.bic', SELF.cv.bic, size = 11, maxlength = 100) %] - - - - [% 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 %] + [% END %] [% IF ( !INSTANCE_CONF.get_vertreter ) %] diff --git a/templates/webpages/sepa/bank_transfer_add.html b/templates/webpages/sepa/bank_transfer_add.html index fe2d44194..4ae82d12d 100644 --- a/templates/webpages/sepa/bank_transfer_add.html +++ b/templates/webpages/sepa/bank_transfer_add.html @@ -77,7 +77,7 @@ - + [%- END %] @@ -89,8 +89,10 @@ (1) [%- IF is_vendor %] [%- 'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' | $T8 %] + [% "The required information consists of the IBAN and the BIC." | $T8 %] [%- ELSE %] [%- 'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' | $T8 %] + [% "The required information consists of the IBAN, the BIC, the mandator ID and the mandate's date of signature." | $T8 %] [%- END %]

[%- END %] diff --git a/templates/webpages/sepa/bank_transfer_create.html b/templates/webpages/sepa/bank_transfer_create.html index 561baec31..80af4c49d 100644 --- a/templates/webpages/sepa/bank_transfer_create.html +++ b/templates/webpages/sepa/bank_transfer_create.html @@ -47,6 +47,10 @@ [% 'IBAN' | $T8 %] [% 'BIC' | $T8 %] [% 'Bank' | $T8 %] + [% IF vc == 'customer' %] + [% 'Mandator ID' | $T8 %] + [% 'Mandate Date of Signature' | $T8 %] + [%- END %] [%- FOREACH vbi = VC_BANK_INFO %] @@ -59,6 +63,10 @@ + [% IF vc == 'customer' %] + + [% L.date_tag("vc_bank_info[].mandate_date_of_signature", vbi.mandate_date_of_signature) %] + [%- END %] [%- END %] @@ -113,6 +121,10 @@

+

+ [% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %] +

+

[%- IF is_vendor %] diff --git a/templates/webpages/sepa/bank_transfer_edit.html b/templates/webpages/sepa/bank_transfer_edit.html index b8f209d75..589b3581b 100644 --- a/templates/webpages/sepa/bank_transfer_edit.html +++ b/templates/webpages/sepa/bank_transfer_edit.html @@ -33,6 +33,9 @@ [% 'Source bank account' | $T8 %] [%- END %] [% 'Amount' | $T8 %] + [% IF vc == 'customer' %] + [% 'Mandator ID' | $T8 %] + [%- END %] [% 'Reference' | $T8 %] [% 'Requested execution date' | $T8 %] [% 'Execution date' | $T8 %] @@ -44,7 +47,7 @@ [% 'IBAN' | $T8 %] [% 'BIC' | $T8 %] [%- IF show_post_payments_button %] -   +   [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %] @@ -73,6 +76,9 @@ [% HTML.escape(item.vc_iban) %] [% HTML.escape(item.vc_bic) %] [% HTML.escape(LxERP.format_amount(item.amount, 2)) %] + [% IF vc == 'customer' %] + [% HTML.escape(item.mandator_id) %] + [%- END %] [% HTML.escape(item.reference) %] [% HTML.escape(item.requested_execution_date) %]