Revision 1ac4c07d
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/DB/Helper/ALL.pm | ||
---|---|---|
103 | 103 |
use SL::DB::SchemaInfo; |
104 | 104 |
use SL::DB::SepaExport; |
105 | 105 |
use SL::DB::SepaExportItem; |
106 |
use SL::DB::SepaExportMessageId; |
|
106 | 107 |
use SL::DB::Shipto; |
107 | 108 |
use SL::DB::Status; |
108 | 109 |
use SL::DB::Tax; |
SL/DB/Helper/Mappings.pm | ||
---|---|---|
182 | 182 |
requirement_specs => 'RequirementSpec', |
183 | 183 |
sepa_export => 'sepa_export', |
184 | 184 |
sepa_export_items => 'sepa_export_item', |
185 |
sepa_export_message_ids => 'SepaExportMessageId', |
|
185 | 186 |
schema_info => 'schema_info', |
186 | 187 |
shipto => 'shipto', |
187 | 188 |
status => 'status', |
SL/DB/Manager/SepaExportMessageId.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::Manager::SepaExportMessageId; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use parent qw(SL::DB::Helper::Manager); |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::SepaExportMessageId' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
1; |
SL/DB/MetaSetup/SepaExportMessageId.pm | ||
---|---|---|
1 |
# This file has been auto-generated. Do not modify it; it will be overwritten |
|
2 |
# by rose_auto_create_model.pl automatically. |
|
3 |
package SL::DB::SepaExportMessageId; |
|
4 |
|
|
5 |
use strict; |
|
6 |
|
|
7 |
use parent qw(SL::DB::Object); |
|
8 |
|
|
9 |
__PACKAGE__->meta->table('sepa_export_message_ids'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
message_id => { type => 'text', not_null => 1 }, |
|
14 |
sepa_export_id => { type => 'integer', not_null => 1 }, |
|
15 |
); |
|
16 |
|
|
17 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
18 |
|
|
19 |
__PACKAGE__->meta->foreign_keys( |
|
20 |
sepa_export => { |
|
21 |
class => 'SL::DB::SepaExport', |
|
22 |
key_columns => { sepa_export_id => 'id' }, |
|
23 |
}, |
|
24 |
); |
|
25 |
|
|
26 |
1; |
|
27 |
; |
SL/DB/SepaExport.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::SepaExport; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
8 | 5 |
use SL::DB::MetaSetup::SepaExport; |
9 | 6 |
|
7 |
__PACKAGE__->meta->add_relationship( |
|
8 |
message_ids => { |
|
9 |
type => 'one to many', |
|
10 |
class => 'SL::DB::SepaExportMessageId', |
|
11 |
column_map => { id => 'sepa_export_id' }, |
|
12 |
}, |
|
13 |
); |
|
14 |
|
|
10 | 15 |
__PACKAGE__->meta->initialize; |
11 | 16 |
|
12 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
13 | 17 |
__PACKAGE__->meta->make_manager_class; |
14 | 18 |
|
15 | 19 |
1; |
SL/DB/SepaExportMessageId.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::SepaExportMessageId; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::SepaExportMessageId; |
|
9 |
use SL::DB::Manager::SepaExportMessageId; |
|
10 |
|
|
11 |
__PACKAGE__->meta->initialize; |
|
12 |
|
|
13 |
1; |
bin/mozilla/sepa.pl | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use Data::Dumper; |
8 | 8 |
use SL::DB::BankAccount; |
9 |
use SL::DB::SepaExport; |
|
9 | 10 |
use SL::Chart; |
10 | 11 |
use SL::CT; |
11 | 12 |
use SL::Form; |
... | ... | |
546 | 547 |
'date_of_signature' => $item->{mandate_date_of_signature}, }); |
547 | 548 |
} |
548 | 549 |
|
550 |
# Store the message ID used in each of the entries in order to |
|
551 |
# facilitate finding them by looking at bank statements. |
|
552 |
foreach my $id (@ids) { |
|
553 |
SL::DB::SepaExportMessageId->new( |
|
554 |
sepa_export_id => $id, |
|
555 |
message_id => $message_id, |
|
556 |
)->save; |
|
557 |
} |
|
558 |
|
|
549 | 559 |
my $xml = $sepa_xml->to_xml(); |
550 | 560 |
|
551 | 561 |
print $cgi->header('-type' => 'application/octet-stream', |
sql/Pg-upgrade2/sepa_contained_in_message_ids.sql | ||
---|---|---|
1 |
-- @tag: sepa_contained_in_message_ids |
|
2 |
-- @description: SEPA: Feld zum Merken, in welchen XML-Dokumenten (MsgId) ein Export vorkam |
|
3 |
-- @depends: release_3_3_0 |
|
4 |
CREATE TABLE sepa_export_message_ids ( |
|
5 |
id SERIAL, |
|
6 |
sepa_export_id INTEGER NOT NULL, |
|
7 |
message_id TEXT NOT NULL, |
|
8 |
|
|
9 |
PRIMARY KEY (id), |
|
10 |
FOREIGN KEY (sepa_export_id) REFERENCES sepa_export (id) ON DELETE CASCADE |
|
11 |
); |
Auch abrufbar als: Unified diff
SEPA: speichern, in welchen Nachrichten-IDs (MsgId) Exporte verwendet wurden
Manche Banken zeigen in ihren Auszügen nur die MsgId an, und es gibt
keine Möglichkeit, die darin enthaltenen einzelnen Überweisungen
angezeigt zu bekommen.
Diese MsgId muss allerdings bei jeder eingereichten Nachricht eindeutig
sein. Daher wird sie bei jedem Download zufällig erzeugt. Weiterhin kann
jeder Download eine beliebige Kombination von Exporten beinhalten.
Um eine einfacherer Nachverfolgbarkeit für solche Fälle zu ermöglichen,
wird nun bei jedem Download die dort verwendete MsgId bei allen
beteiligten Exporten gespeichert.