projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 76093 - Added ability to charge a processing fee when taking a payment on the...
[freeside.git]
/
FS
/
FS
/
contact.pm
diff --git
a/FS/FS/contact.pm
b/FS/FS/contact.pm
index
44c5388
..
d6869ab
100644
(file)
--- a/
FS/FS/contact.pm
+++ b/
FS/FS/contact.pm
@@
-155,7
+155,7
@@
sub insert {
$self->custnum('');
my %link_hash = ();
$self->custnum('');
my %link_hash = ();
- for (qw( classnum comment selfservice_access invoice_dest )) {
+ for (qw( classnum comment selfservice_access invoice_dest
message_dest
)) {
$link_hash{$_} = $self->get($_);
$self->$_('');
}
$link_hash{$_} = $self->get($_);
$self->$_('');
}
@@
-199,8
+199,6
@@
sub insert {
}
}
- $error ||= $self->insert_password_history;
-
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
@@
-302,6
+300,15
@@
sub insert {
}
}
}
}
+ if ( $self->get('password') ) {
+ my $error = $self->is_password_allowed($self->get('password'))
+ || $self->change_password($self->get('password'));
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
@@
-427,11
+434,12
@@
sub replace {
my $prospectnum = $self->prospectnum;
$self->prospectnum('');
my $custnum = $self->custnum;
my $prospectnum = $self->prospectnum;
$self->prospectnum('');
my $custnum = $self->custnum;
- $self->custnum('');
+ $self->custnum('');
$old->custnum(''); # remove because now stored cust_contact
my %link_hash = ();
my %link_hash = ();
- for (qw( classnum comment selfservice_access invoice_dest )) {
+ for (qw( classnum comment selfservice_access invoice_dest
message_dest
)) {
$link_hash{$_} = $self->get($_);
$link_hash{$_} = $self->get($_);
+ $old->$_(''); ##remove values from old record, causes problem with history
$self->$_('');
}
$self->$_('');
}
@@
-811,7
+819,7
@@
sub authenticate_password {
$hash eq $check_hash;
$hash eq $check_hash;
- } else {
+ } else {
return 0 if $self->_password eq '';
return 0 if $self->_password eq '';
@@
-955,7
+963,7
@@
sub cgi_contact_fields {
my @contact_fields = qw(
classnum first last title comment emailaddress selfservice_access
my @contact_fields = qw(
classnum first last title comment emailaddress selfservice_access
- invoice_dest password
+ invoice_dest
message_dest
password
);
push @contact_fields, 'phonetypenum'. $_->phonetypenum
);
push @contact_fields, 'phonetypenum'. $_->phonetypenum
@@
-1028,4
+1036,3
@@
L<FS::Record>, schema.html from the base documentation.
=cut
1;
=cut
1;
-