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

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



Revision: 1889
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1889&view=rev
Author:   einhverfr
Date:     2007-11-21 19:59:09 -0800 (Wed, 21 Nov 2007)

Log Message:
-----------
More customer fixes

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Customer.pm
    trunk/UI/Customer/customer.html
    trunk/sql/modules/Customer.sql

Modified: trunk/LedgerSMB/DBObject/Customer.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Customer.pm	2007-11-22 03:31:05 UTC (rev 1888)
+++ trunk/LedgerSMB/DBObject/Customer.pm	2007-11-22 03:59:09 UTC (rev 1889)
@@ -35,6 +35,8 @@
     $self->{entity_class} = $CUSTOMER_ENTITY_CLASS;
     $self->{country_id} = $self->{country};
     $self->exec_method(funcname => 'customer_location_save');
+
+    $self->{dbh}->commit;
 }
 
 sub save_contact {
@@ -45,7 +47,8 @@
 
 sub get {
     my $self = shift @_;
-    $self->merge(shift @{$self->exec_method(funcname => 'customer__retrieve')});
+    ($ref) = $self->exec_method(funcname => 'customer__retrieve');
+    $self->merge($ref);
 
     $self->{name} = $self->{legal_name};
 
@@ -56,7 +59,7 @@
 		funcname => 'company__list_contacts');
 
     @{$self->{contacts}} = $self->exec_method(
-		funcname => 'company__list_bank_accounts');
+		funcname => 'company__list_bank_account');
 
     @{$self->{notes}} = $self->exec_method(
 		funcname => 'company__list_notes');

Modified: trunk/UI/Customer/customer.html
===================================================================
--- trunk/UI/Customer/customer.html	2007-11-22 03:31:05 UTC (rev 1888)
+++ trunk/UI/Customer/customer.html	2007-11-22 03:59:09 UTC (rev 1889)
@@ -180,7 +180,7 @@
     </tr>
 	<?lsmb FOREACH loc = locations ?>
     <tr>
-	<td class="type"><?lsmb loc.type ?></td>
+	<td class="type"><?lsmb loc.class ?></td>
 	<td class="line_one"><?lsmb loc.line_one ?></td>
 	<td class="city"><?lsmb loc.city ?></td>
 	<td class="state"><?lsmb loc.state ?></td>
@@ -198,7 +198,7 @@
     </table>
 	<div> 
 		<label for="loc_type"><?lsmb text('Type:') ?></label>
-		<select name='loc_type'>
+		<select id='loc_type' name="location_class">
 		<?lsmb FOREACH lc = location_class ?>
 		<option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
 		<?lsmb END ?>

Modified: trunk/sql/modules/Customer.sql
===================================================================
--- trunk/sql/modules/Customer.sql	2007-11-22 03:31:05 UTC (rev 1888)
+++ trunk/sql/modules/Customer.sql	2007-11-22 03:59:09 UTC (rev 1889)
@@ -22,7 +22,7 @@
         taxincluded bool,
         creditlimit numeric,
         terms int2,
-        customernumber int,
+        customernumber text,
         business_id int,
         language_code text,
         pricegroup_id int,
@@ -222,7 +222,7 @@
 	FOR out_row IN
 		SELECT * from entity_bank_account where entity_id = in_entity_id
 	LOOP
-		RETURN NEXT;
+		RETURN NEXT out_row;
 	END LOOP;
 END;
 $$ LANGUAGE PLPGSQL;


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