[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2635] trunk
- Subject: SF.net SVN: ledger-smb:[2635] trunk
- From: ..hidden..
- Date: Tue, 09 Jun 2009 16:02:27 +0000
Revision: 2635
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2635&view=rev
Author: einhverfr
Date: 2009-06-09 16:02:26 +0000 (Tue, 09 Jun 2009)
Log Message:
-----------
Re-appying project schema change
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
trunk/UI/Admin/edit_user.html
trunk/scripts/admin.pl
trunk/sql/Pg-database.sql
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2009-06-08 18:05:57 UTC (rev 2634)
+++ trunk/LedgerSMB/Form.pm 2009-06-09 16:02:26 UTC (rev 2635)
@@ -2038,7 +2038,7 @@
$query=qq|SELECT pr.*, e.name AS customer
FROM project pr
- LEFT JOIN entity_credit_account c ON (c.id = pr.customer_id)
+ LEFT JOIN entity_credit_account c ON (c.id = pr.credit_id)
left join entity e on(e.id=c.entity_id)
|;
my $sth = $dbh->prepare($query);
Modified: trunk/UI/Admin/edit_user.html
===================================================================
--- trunk/UI/Admin/edit_user.html 2009-06-08 18:05:57 UTC (rev 2634)
+++ trunk/UI/Admin/edit_user.html 2009-06-09 16:02:26 UTC (rev 2635)
@@ -12,7 +12,7 @@
</font>
<form method="POST" action="admin.pl">
- <input type="hidden" name="action" value="<?lsmb IF user.user.username?>edit_user<?lsmb ELSE?>new_user<?lsmb END?>"/>
+ <input type="hidden" name="action" value="<?lsmb IF user.user.username?>edit_user<?lsmb ELSE?>save_user<?lsmb END?>"/>
<table>
<?lsmb UNLESS user.user.username?>
Modified: trunk/scripts/admin.pl
===================================================================
--- trunk/scripts/admin.pl 2009-06-08 18:05:57 UTC (rev 2634)
+++ trunk/scripts/admin.pl 2009-06-09 16:02:26 UTC (rev 2635)
@@ -59,6 +59,17 @@
$template->render($template_data);
}
+sub save_user {
+ my ($request, $admin) = @_;
+ my $admin = LedgerSMB::DBObject::Admin->new(base=>$request, copy=>'all');
+
+ my $sal = $admin->get_salutations();
+
+ my $groups = $admin->get_roles();
+ my $entity = $admin->save_user();
+ __edit_page($admin);
+}
+
sub new_user {
# uses the same page as create_user, only pre-populated.
@@ -70,25 +81,7 @@
my $groups = $admin->get_roles();
- if ($request->type() eq 'POST') {
-
- # do the save stuff
-
- my $entity = $admin->save_user();
-
- my $template = LedgerSMB::Template->new( user => $user,
- template => 'Admin/edit_user', language => $user->{ language },
- format => 'HTML', path=>'UI');
- $template->render(
- {
- user=>$admin,
- salutations=>$sal,
- roles=>$groups
- }
- );
- } else {
-
my $template = LedgerSMB::Template->new(
user => $user,
template => 'Admin/edit_user',
@@ -104,7 +97,6 @@
countries=>$admin->get_countries(),
}
);
- }
}
sub edit_user {
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2009-06-08 18:05:57 UTC (rev 2634)
+++ trunk/sql/Pg-database.sql 2009-06-09 16:02:26 UTC (rev 2635)
@@ -940,7 +940,7 @@
parts_id int,
production numeric default 0,
completed numeric default 0,
- customer_id int
+ credit_id int references entity_credit_account(id),
);
--
CREATE TABLE partsgroup (
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.