[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4923] trunk
- Subject: SF.net SVN: ledger-smb:[4923] trunk
- From: ..hidden..
- Date: Tue, 19 Jun 2012 13:18:32 +0000
Revision: 4923
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4923&view=rev
Author: einhverfr
Date: 2012-06-19 13:18:32 +0000 (Tue, 19 Jun 2012)
Log Message:
-----------
nested partsgroups
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/PE.pm
trunk/bin/pe.pl
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2012-06-19 13:15:49 UTC (rev 4922)
+++ trunk/Changelog 2012-06-19 13:18:32 UTC (rev 4923)
@@ -19,6 +19,7 @@
* Added Equity (Temp) account type (Chris T)
* Added description field to transaction and invoice screens (Chris T)
* Removed ability to repost/delete transactions (Chris T)
+* Partsgroups can now be nested though this is not yet used by LSMB (Chris T)
New RESTful Web Services Framework
* Supports XML and JSON as input formats
Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm 2012-06-19 13:15:49 UTC (rev 4922)
+++ trunk/LedgerSMB/PE.pm 2012-06-19 13:18:32 UTC (rev 4923)
@@ -387,8 +387,9 @@
}
else {
$query = qq|
- INSERT INTO partsgroup (partsgroup)
- VALUES (?)|;
+ INSERT INTO partsgroup (partsgroup, parent)
+ VALUES (?, ?)|;
+ push @group, $form->{parent};
}
$dbh->do($query, undef, @group) || $form->dberror($query);
Modified: trunk/bin/pe.pl
===================================================================
--- trunk/bin/pe.pl 2012-06-19 13:15:49 UTC (rev 4922)
+++ trunk/bin/pe.pl 2012-06-19 13:18:32 UTC (rev 4923)
@@ -224,8 +224,6 @@
}
-}
-
sub save {
if ( $form->{translation} ) {
@@ -405,6 +403,7 @@
# $locale->text('Edit Group')
$form->{partsgroup} = $form->quote( $form->{partsgroup} );
+ PE->partsgroups(\%myconfig, $form);
$form->header;
@@ -425,7 +424,17 @@
<td>
<table width=100%>
<tr>
- <th align=right>| . $locale->text('Group') . qq|</th>
+ <th align="right">| . $locale->text('Parent') . qq|</th>
+ <td><select name='parent'>|;
+ for my $pg (@{$form->{item_list}}){
+ my $selected = '';
+ $selected = 'SELECTED="SELECTED"'
+ if $form->{parent} == $pg->{id};
+ print qq|<option value='$pg->{id}' $selected>
+ $pg->{partsgroup} </option>|;
+ }
+ print qq|</select>
+ <th align="right">| . $locale->text('Group') . qq|</th>
<td><input name=partsgroup size=30 value="$form->{partsgroup}"></td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.