[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5593] trunk



Revision: 5593
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5593&view=rev
Author:   einhverfr
Date:     2013-01-16 09:06:21 +0000 (Wed, 16 Jan 2013)
Log Message:
-----------
fixing contact info workflow for contacts

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Entity/Contact.pm
    trunk/LedgerSMB/Scripts/contact.pm
    trunk/UI/Contact/divs/credit.html

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-01-16 08:39:21 UTC (rev 5592)
+++ trunk/Changelog	2013-01-16 09:06:21 UTC (rev 5593)
@@ -96,6 +96,10 @@
 * Fixed cash/receipt and payment screen calculating to pay wrong (Chris T,
 3599995)
 * Fixed net-0 transactions not showing up on search (Chris T, 3600700)
+* Fixed incorrect recommendation in Makefile.PL (Chris T, h.t Havard S and
+Robert C)
+* Fixed contact info addition workflow.  Now entering multiple contact records 
+is not a total pain(Chris T)
 
 Changelog for 1.3.28
 * Added db list to setup.pl when no db is entered and credentials allow login

Modified: trunk/LedgerSMB/Entity/Contact.pm
===================================================================
--- trunk/LedgerSMB/Entity/Contact.pm	2013-01-16 08:39:21 UTC (rev 5592)
+++ trunk/LedgerSMB/Entity/Contact.pm	2013-01-16 09:06:21 UTC (rev 5593)
@@ -164,7 +164,7 @@
         die $LedgerSMB::App_State::Locale->text('Must have credit or entity id');
     }
     $self->prepare_dbhash($ref);
-    return $self->new($ref);
+    return $ref;
 }
 
 =item delete()

Modified: trunk/LedgerSMB/Scripts/contact.pm
===================================================================
--- trunk/LedgerSMB/Scripts/contact.pm	2013-01-16 08:39:21 UTC (rev 5592)
+++ trunk/LedgerSMB/Scripts/contact.pm	2013-01-16 09:06:21 UTC (rev 5593)
@@ -588,13 +588,17 @@
 
 sub save_contact {
     my ($request) = @_;
-    my $contact = LedgerSMB::Entity::Contact->new(%$request);
+    my $credit_id = $request->{credit_id};
     if ($request->{attach_to} == 1){
-       $contact->credit_id(undef);
+       delete $request->{credit_id};
     }
+    my $contact = LedgerSMB::Entity::Contact->new(%$request);
+    $request->{credit_id} = $credit_id;
     $contact->save;
     $request->{target_div} = 'address_div';
     $request->{target_div} = 'contact_info_div';
+    delete $request->{description};
+    delete $request->{contact};
     get($request);
 } 
 

Modified: trunk/UI/Contact/divs/credit.html
===================================================================
--- trunk/UI/Contact/divs/credit.html	2013-01-16 08:39:21 UTC (rev 5592)
+++ trunk/UI/Contact/divs/credit.html	2013-01-16 09:06:21 UTC (rev 5593)
@@ -336,7 +336,6 @@
                 <?lsmb END ?>
 	
     </form>
-</div>
 <?lsmb IF credit_act.id ?>
 <div class="listtop"><?lsmb text('Profit and Loss') ?></div>
 <form action="pnl.pl" method="GET"?>
@@ -363,5 +362,7 @@
 };
 ?>
 </div>
+</div>
 </form>
+</div>
 <?lsmb END # IF credit_act.id ?>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.