1 package SL::Controller::CsvImport::Shipto;
7 use parent qw(SL::Controller::CsvImport::Base);
9 use Rose::Object::MakeMethods::Generic
11 scalar => [ qw(table) ],
16 $self->class('SL::DB::Shipto');
22 foreach my $entry (@{ $self->controller->data }) {
23 $self->check_vc($entry, 'trans_id');
24 $entry->{object}->module('CT');
27 $self->add_info_columns({ header => $::locale->text('Customer/Vendor'), method => 'vc_name' });
30 sub get_duplicate_check_fields {
32 shiptoname_and_shiptostreet => {
33 label => $::locale->text('Name and Street'),
41 { s/[\s,\.\-]//g; $_ }
50 label => $::locale->text('Name'),
58 { s/[\s,\.\-]//g; $_ }
66 label => $::locale->text('Street'),
74 { s/[\s,\.\-]//g; $_ }
84 return ( shiptoname => 75,
85 shiptodepartment_1 => 75,
86 shiptodepartment_2 => 75,
100 my $profile = $self->SUPER::init_profile;
101 delete @{$profile}{qw(module)};
106 sub setup_displayable_columns {
109 $self->SUPER::setup_displayable_columns;
111 $self->add_displayable_columns({ name => 'shiptocity', description => $::locale->text('City') },
112 { name => 'shiptocontact', description => $::locale->text('Contact') },
113 { name => 'shiptocountry', description => $::locale->text('Country') },
114 { name => 'shiptodepartment_1', description => $::locale->text('Department 1') },
115 { name => 'shiptodepartment_2', description => $::locale->text('Department 2') },
116 { name => 'shiptoemail', description => $::locale->text('E-mail') },
117 { name => 'shiptofax', description => $::locale->text('Fax') },
118 { name => 'shiptoname', description => $::locale->text('Name') },
119 { name => 'shiptophone', description => $::locale->text('Phone') },
120 { name => 'shiptostreet', description => $::locale->text('Street') },
121 { name => 'shiptozipcode', description => $::locale->text('Zipcode') },
122 { name => 'trans_id', description => $::locale->text('Customer/Vendor (database ID)') },
123 { name => 'customer', description => $::locale->text('Customer (name)') },
124 { name => 'customernumber', description => $::locale->text('Customer Number') },
125 { name => 'vendor', description => $::locale->text('Vendor (name)') },
126 { name => 'vendornumber', description => $::locale->text('Vendor Number') },