sub check_objects {
my ($self) = @_;
+ $self->controller->track_progress(phase => 'building data', progress => 0);
+
+ my $i;
+ my $num_data = scalar @{ $self->controller->data };
foreach my $entry (@{ $self->controller->data }) {
+ $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
+
$self->check_name($entry);
$self->check_vc($entry, 'cp_cv_id');
$self->check_gender($entry);
$self->handle_cvars($entry);
+ } continue {
+ $i++;
}
$self->add_info_columns({ header => $::locale->text('Customer/Vendor'), method => 'vc_name' });
);
}
-1;
\ No newline at end of file
+1;
sub check_objects {
my ($self) = @_;
+ $self->controller->track_progress(phase => 'building data', progress => 0);
+
my $numbercolumn = $self->controller->profile->get('table') . "number";
my %vcs_by_number = map { ( $_->$numbercolumn => 1 ) } @{ $self->existing_objects };
+ my $i;
+ my $num_data = scalar @{ $self->controller->data };
foreach my $entry (@{ $self->controller->data }) {
+ $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
my $object = $entry->{object};
$self->check_name($entry);
} else {
$vcs_by_number{ $object->$numbercolumn } = $object;
}
+ } continue {
+ $i++;
}
$self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw(language business payment));
# TODO:
# salesman_id -- Kunden mit Typ 'Verkäufer', falls Vertreter-Modus an ist, ansonsten Employees
-1;
\ No newline at end of file
+1;
sub check_objects {
my ($self) = @_;
+ $self->controller->track_progress(phase => 'building data', progress => 0);
+
+ my $i;
+ my $num_data = scalar @{ $self->controller->data };
foreach my $entry (@{ $self->controller->data }) {
+ $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
+
$self->handle_cvars($entry);
+ } continue {
+ $i++;
}
$self->add_cvar_raw_data_columns;
);
}
-1;
\ No newline at end of file
+1;
sub check_objects {
my ($self) = @_;
+ $self->controller->track_progress(phase => 'building data', progress => 0);
+
+ my $i;
+ my $num_data = scalar @{ $self->controller->data };
foreach my $entry (@{ $self->controller->data }) {
+ $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
+
$self->check_vc($entry, 'trans_id');
$entry->{object}->module('CT');
+ } continue {
+ $i++;
}
$self->add_info_columns({ header => $::locale->text('Customer/Vendor'), method => 'vc_name' });
);
}
-1;
\ No newline at end of file
+1;