[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3869] addons/1.3/budgetting/trunk
- Subject: SF.net SVN: ledger-smb:[3869] addons/1.3/budgetting/trunk
- From: ..hidden..
- Date: Sat, 15 Oct 2011 23:46:42 +0000
Revision: 3869
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3869&view=rev
Author: einhverfr
Date: 2011-10-15 23:46:41 +0000 (Sat, 15 Oct 2011)
Log Message:
-----------
Updating budget screen now works
Modified Paths:
--------------
addons/1.3/budgetting/trunk/UI/budgetting/budget_entry.html
addons/1.3/budgetting/trunk/scripts/budgets.pl
Modified: addons/1.3/budgetting/trunk/UI/budgetting/budget_entry.html
===================================================================
--- addons/1.3/budgetting/trunk/UI/budgetting/budget_entry.html 2011-10-15 13:12:23 UTC (rev 3868)
+++ addons/1.3/budgetting/trunk/UI/budgetting/budget_entry.html 2011-10-15 23:46:41 UTC (rev 3869)
@@ -121,7 +121,7 @@
</tr>
<?lsmb FOREACH displayrow IN display_rows ?>
<tr>
- <?lsmb INDEX=displayrow.index ?>
+ <?lsmb INDEX= loop.count ?>
<td>
<?lsmb IF displayrow.accnoset == 0 ?>
<?lsmb PROCESS ajaxselect element_data = {
@@ -134,9 +134,11 @@
<?lsmb ELSE ?>
- <?lsmb PROCESS label element_data = {
- text = displayrow.account_id
- align = 'right'
+ <?lsmb PROCESS input element_data = {
+ label = displayrow.account_id
+ type = "hidden"
+ value = displayrow.account_id
+ name = "account_id_$INDEX"
id = "acc_$INDEX"
} ?>
Modified: addons/1.3/budgetting/trunk/scripts/budgets.pl
===================================================================
--- addons/1.3/budgetting/trunk/scripts/budgets.pl 2011-10-15 13:12:23 UTC (rev 3868)
+++ addons/1.3/budgetting/trunk/scripts/budgets.pl 2011-10-15 23:46:41 UTC (rev 3869)
@@ -54,8 +54,11 @@
my ($budget) = @_;
$additional_rows = 5;
$additional_rows +=20 unless $budget->{rowcount};
+ $budget->{rowcount} ||= 0;
for (1 .. $additional_rows) {
- push @{$budget->{display_rows}}, {accnoset => 0, index => $_};
+ push @{$budget->{display_rows}},
+ {accnoset => 0, index => $_ + $budget->{rowcount}};
+ ++$budget->{rowcount};
}
$budget->error('Invalid object')
unless $budget->isa('LedgerSMB::DBObject::Budget');
@@ -138,11 +141,12 @@
my ($request) = @_;
for (1 .. $request->{rowcount}){
push @{$request->{display_rows}},
- { account_id => $request->{"account_id_$i"},
- debit => $request->{"debit_$i"},
- credit => $request->{"credit_$i"},
- description => $request->{"description_$i"},
- } if ($request->{"debits_$_"} or $request->{"credits_$_"});
+ { account_id => $request->{"account_id_$_"},
+ debit => $request->{"debit_$_"},
+ credit => $request->{"credit_$_"},
+ description => $request->{"description_$_"},
+ } if ($request->{"debit_$_"} or $request->{"credit_$_"});
+
}
$budget->{rowcount} = scalar @{$request->{display_rows}};
new_budget(@_);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.