[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3181] trunk/LedgerSMB/DBObject/Company.pm
- Subject: SF.net SVN: ledger-smb:[3181] trunk/LedgerSMB/DBObject/Company.pm
- From: ..hidden..
- Date: Thu, 26 May 2011 06:36:15 +0000
Revision: 3181
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3181&view=rev
Author: einhverfr
Date: 2011-05-26 06:36:15 +0000 (Thu, 26 May 2011)
Log Message:
-----------
Committing patch 2953428, for improved handling in Company.pm
Modified Paths:
--------------
trunk/LedgerSMB/DBObject/Company.pm
Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm 2011-05-25 04:47:51 UTC (rev 3180)
+++ trunk/LedgerSMB/DBObject/Company.pm 2011-05-26 06:36:15 UTC (rev 3181)
@@ -51,6 +51,14 @@
sub save {
my $self = shift @_;
$self->set_entity_class();
+ unless($self->{control_code}) {
+ $self->{notice} = "You must set the Control Code";
+ return;
+ }
+ unless($self->{name}) {
+ $self->{notice} = "You must set the Name";
+ return;
+ }
my ($ref) = $self->exec_method(funcname => 'company_save');
$self->{entity_id} = (values %$ref)[0];
$self->get;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.