summaryrefslogtreecommitdiff
path: root/LedgerSMB/CT.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-09 23:09:45 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-09 23:09:45 +0000
commit8b040e5df9af9de3d01e3451b56ae37c90df1a4d (patch)
tree9e39ca28325ff4a195ad174585d61562169fcede /LedgerSMB/CT.pm
parent4de76bf567a88296a96401168516f6fc2e90996e (diff)
Fixing bug 1748255
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1361 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/CT.pm')
-rwxr-xr-xLedgerSMB/CT.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/CT.pm b/LedgerSMB/CT.pm
index e40b3336..636d645f 100755
--- a/LedgerSMB/CT.pm
+++ b/LedgerSMB/CT.pm
@@ -208,6 +208,9 @@ sub save_customer {
my $sth;
my $null;
+ $form->{customernumber} =
+ $form->update_defaults( $myconfig, "customernumber", $dbh )
+ if !$form->{customernumber};
# remove double spaces
$form->{name} =~ s/ / /g;
@@ -301,9 +304,6 @@ sub save_customer {
my $language_code;
( $null, $language_code ) = split /--/, $form->{language};
- $form->{customernumber} =
- $form->update_defaults( $myconfig, "customernumber", $dbh )
- if !$form->{customernumber};
$query = qq|
UPDATE customer
@@ -388,6 +388,9 @@ sub save_vendor {
# connect to database
my $dbh = $form->{dbh};
+ $form->{vendornumber} =
+ $form->update_defaults( $myconfig, "vendornumber", $dbh )
+ if !$form->{vendornumber};
my $query;
my $sth;
@@ -476,9 +479,6 @@ sub save_vendor {
my $language_code;
( $null, $language_code ) = split /--/, $form->{language};
- $form->{vendornumber} =
- $form->update_defaults( $myconfig, "vendornumber", $dbh )
- if !$form->{vendornumber};
$form->{startdate} = undef unless $form->{startdate};
$form->{enddate} = undef unless $form->{enddate};