Revision 346be50e
Von Bernd Blessmann vor mehr als 12 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
9 | 9 |
use SL::DB::Language; |
10 | 10 |
use SL::DB::PaymentTerm; |
11 | 11 |
use SL::DB::Vendor; |
12 |
use SL::DB::Contact; |
|
12 | 13 |
|
13 | 14 |
use parent qw(Rose::Object); |
14 | 15 |
|
SL/Controller/CsvImport/Contact.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::Helper::Csv; |
6 |
use SL::DB::CustomVariable; |
|
7 |
use SL::DB::CustomVariableConfig; |
|
6 | 8 |
|
7 | 9 |
use parent qw(SL::Controller::CsvImport::Base); |
8 | 10 |
|
... | ... | |
16 | 18 |
$self->class('SL::DB::Contact'); |
17 | 19 |
} |
18 | 20 |
|
21 |
sub init_all_cvar_configs { |
|
22 |
my ($self) = @_; |
|
23 |
|
|
24 |
return SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'Contacts' ]); |
|
25 |
} |
|
26 |
|
|
19 | 27 |
sub check_objects { |
20 | 28 |
my ($self) = @_; |
21 | 29 |
|
... | ... | |
23 | 31 |
$self->check_name($entry); |
24 | 32 |
$self->check_vc($entry, 'cp_cv_id'); |
25 | 33 |
$self->check_gender($entry); |
34 |
$self->handle_cvars($entry); |
|
26 | 35 |
} |
27 | 36 |
|
28 | 37 |
$self->add_info_columns({ header => $::locale->text('Customer/Vendor'), method => 'vc_name' }); |
38 |
$self->add_cvar_raw_data_columns; |
|
29 | 39 |
} |
30 | 40 |
|
31 | 41 |
sub check_name { |
... | ... | |
87 | 97 |
my ($self) = @_; |
88 | 98 |
|
89 | 99 |
$self->SUPER::setup_displayable_columns; |
100 |
$self->add_cvar_columns_to_displayable_columns; |
|
90 | 101 |
|
91 | 102 |
$self->add_displayable_columns({ name => 'cp_abteilung', description => $::locale->text('Department') }, |
92 | 103 |
{ name => 'cp_birthday', description => $::locale->text('Birthday') }, |
Auch abrufbar als: Unified diff
Benutzerdefinierte Variablen bei Ansprechpartnern über CSV importierbar machen.