[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2450] trunk
- Subject: SF.net SVN: ledger-smb:[2450] trunk
- From: ..hidden..
- Date: Fri, 13 Feb 2009 18:35:42 +0000
Revision: 2450
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2450&view=rev
Author: einhverfr
Date: 2009-02-13 18:35:42 +0000 (Fri, 13 Feb 2009)
Log Message:
-----------
Undoing accidental commit of customization
Modified Paths:
--------------
trunk/LedgerSMB/DBObject/Reconciliation.pm
trunk/UI/Contact/contact.css
trunk/UI/Contact/contact.html
trunk/UI/reconciliation/report.html
trunk/scripts/recon.pl
trunk/sql/modules/Reconciliaton.sql
Modified: trunk/LedgerSMB/DBObject/Reconciliation.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Reconciliation.pm 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/LedgerSMB/DBObject/Reconciliation.pm 2009-02-13 18:35:42 UTC (rev 2450)
@@ -286,11 +286,28 @@
$our_balance = $ref->{reconciliation__get_cleared_balance};
$self->{beginning_balance} = $our_balance;
+ $self->{cleared_total} = 0;
+ $self->{outstanding_total} = 0;
+
for my $line (@{$self->{report_lines}}){
- $our_balance += $line->{our_balance} if $self->{"cleared_$line->{id}"};
+ if ($self->{"cleared_$line->{id}"}){
+ $our_balance += $line->{our_balance};
+ $self->{cleared_total} += $line->{our_balance};
+ print STDERR "$self->{cleared_total}\n"
+ } else {
+ $self->{outstanding_total} += $line->{our_balance};
+ print STDERR "$self->{outstanding_total}\n"
+ }
}
$self->{our_total} = $our_balance;
- $self->{format_amount} = sub { return $self->format_amount(@_); }
+ @{$self->{accounts}} = $self->get_accounts;
+ for (@{$self->{accounts}}){
+ if ($_->{id} == $self->{chart_id}){
+ $self->{account} = $_->{name};
+ }
+ }
+ $self->debug({file => '/tmp/recon'});
+ $self->{format_amount} = sub { return $self->format_amount(@_); };
}
sub get_accounts {
Modified: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/UI/Contact/contact.css 2009-02-13 18:35:42 UTC (rev 2450)
@@ -31,29 +31,3 @@
div label {
margin-left: 1em;
}
-
-/* This shouldnot go in SVN trunk */
-#company_div .note_contents {
- display: none;
-}
-
-table {
- width: 100%;
-}
-
-#credit-row {
- display: none;
-}
-
-#discount-gifi-row {
- display: none;
-}
-
-#line-two {
- display: none;
-}
-
-#line-three {
- display: none;
-}
-
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/UI/Contact/contact.html 2009-02-13 18:35:42 UTC (rev 2450)
@@ -234,9 +234,6 @@
</div>
<?lsmb END ?>
</div>
-<?lsmb IF entity_id;
-INCLUDE 'rates_div.html';
-END -?>
<?lsmb IF entity_id ?>
<div id="credit_div">
<div class="listtop"><strong>Accounts</strong></div>
@@ -548,24 +545,6 @@
type = "text",
size = "20"
} ?>
- <!--
- if the following button and script show up in svn
- /trunk, please remove them. -CT -->
- <script type="text/javascript">
- function show_lines(){
- var e;
- e = document.getElementById('line-two');
- e.style.display = 'inline';
- e = document.getElementById('line-three');
- e.style.display = 'inline';
- e = document.getElementById('show-lines-button');
- e.style.display = 'none';
- return false;
- }
- </script>
- <button onclick="javascript: return show_lines()"
- id="show-lines-button" type="button"><?lsmb text('Show More Lines') ?>
- </button> <!-- end custom section -->
</div>
<div>
<?lsmb PROCESS input element_data = {
Modified: trunk/UI/reconciliation/report.html
===================================================================
--- trunk/UI/reconciliation/report.html 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/UI/reconciliation/report.html 2009-02-13 18:35:42 UTC (rev 2450)
@@ -26,10 +26,14 @@
<?lsmb END ?>
<?lsmb i = 0 ?>
<table border=0>
+ <tr class="listtop">
+ <th colspan=7><?lsmb text('Cleared Transactions') ?></th>
+ </tr>
<tr class="listheading">
<th><?lsmb text('Cleared') ?></th>
<th><?lsmb text('Transaction Type') ?></th>
<th><?lsmb text('Clear date') ?></th>
+ <th><?lsmb text('Source') ?></th>
<th><?lsmb text('Posted Date') ?></th>
<th><?lsmb text('Our Balance') ?></th>
<th><?lsmb text('Their Balance') ?></th>
@@ -37,6 +41,13 @@
</tr>
<?lsmb FOREACH row = report_lines ?>
+ <?lsmb IF (row.our_balance == row.their_balance) or
+ row.cleared or ${"cleared_$row.id"}
+ -?>
+ <?lsmb row.cleared = 'checked' ?>
+ <?lsmb ELSE ?> <?lsmb row.cleared = undef -?>
+ <?lsmb END -?>
+ <?lsmb IF row.cleared == 'checked' ?>
<?lsmb INCLUDE input element_data = {
type = "hidden",
name = "id_$i",
@@ -49,12 +60,6 @@
<?lsmb ELSE ?>
<tr>
<?lsmb END ?>
- <?lsmb IF (row.our_balance == row.their_balance) or
- row.cleared or ${"cleared_$row.id"}
- -?>
- <?lsmb row.cleared = 'checked' ?>
- <?lsmb ELSE ?> <?lsmb row.cleared = undef -?>
- <?lsmb END -?>
<td><?lsmb INCLUDE input element_data = {
type = "checkbox"
name = "cleared_$row.id"
@@ -64,24 +69,76 @@
?></td>
<td><?lsmb row.transaction_type ?> </td>
<td><?lsmb row.clear_time ?></td>
+ <td><?lsmb row.scn ?> </td>
<td><?lsmb row.post_date ?></td>
<td><?lsmb row.our_balance ?></td>
<td><?lsmb row.their_balance ?></td>
</tr>
<?lsmb i = i + 1 -?>
+ <?lsmb END ?>
<?lsmb END -?>
+ <tr class="subtital">
+ <th colspan=5><?lsmb text('Total') ?></th><td><?lsmb cleared_total ?></td>
+ </tr>
+ <tr class="listheading">
+ <th colspan=7><?lsmb text('Outstanding Transactions') ?></th>
+ </tr>
+ <tr class="listheading">
+ <th><?lsmb text('Cleared') ?></th>
+ <th><?lsmb text('Transaction Type') ?></th>
+ <th><?lsmb text('Clear date') ?></th>
+ <th><?lsmb text('Source') ?></th>
+ <th><?lsmb text('Posted Date') ?></th>
+ <th><?lsmb text('Our Balance') ?></th>
+ <th><?lsmb text('Their Balance') ?></th>
+ <th></th>
+ </tr>
+ <?lsmb FOREACH row = report_lines ?>
+ <?lsmb IF row.cleared != 'checked' ?>
+ <?lsmb INCLUDE input element_data = {
+ type = "hidden",
+ name = "id_$i",
+ value = row.id
+ } ?>
+ <?lsmb IF row.errorcode != 0 ?>
+ <tr style="background-color:pink;">
+ <?lsmb ELSIF row.id == corrected ?>
+ <tr style="background-color:yellow;">
+ <?lsmb ELSE ?>
+ <tr>
+ <?lsmb END ?>
+ <td><?lsmb INCLUDE input element_data = {
+ type = "checkbox"
+ name = "cleared_$row.id"
+ value = row.id
+ checked = row.cleared
+ }
+ ?></td>
+ <td><?lsmb row.transaction_type ?> </td>
+ <td><?lsmb row.clear_time ?></td>
+ <td><?lsmb row.scn ?> </td>
+ <td><?lsmb row.post_date ?></td>
+ <td><?lsmb row.our_balance ?></td>
+ <td><?lsmb row.their_balance ?></td>
+ </tr>
+ <?lsmb i = i + 1 -?>
+ <?lsmb END ?>
+ <?lsmb END -?>
+ <tr class="subtital">
+ <th colspan=5><?lsmb text('Total') ?></th><td><?lsmb outstanding_total ?></td>
+ </tr>
</table>
<?lsmb INCLUDE input element_data = {
name = "report_id",
type = "hidden",
value = report_id,
-} ?>
+} ?><?lsmb IF NOT submitted ?>
<?lsmb INCLUDE button element_data = {
name = "action",
text = text('Update'),
value = 'update_recon_set',
class = "submit"
-} ?><?lsmb IF NOT submitted ?>
+} ?>
<?lsmb INCLUDE button element_data = {
name = "action",
text = text('Submit'),
Modified: trunk/scripts/recon.pl
===================================================================
--- trunk/scripts/recon.pl 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/scripts/recon.pl 2009-02-13 18:35:42 UTC (rev 2450)
@@ -279,6 +279,8 @@
$l->{their_balance} = $recon->format_amount({amount => $l->{their_balance}, money => 1});
$l->{our_balance} = $recon->format_amount({amount => $l->{our_balance}, money => 1});
}
+ $recon->{cleared_total} = $recon->format_amount({amount => $recon->{cleared_total}, money => 1});
+ $recon->{outstanding_total} = $recon->format_amount({amount => $recon->{outstanding_total}, money => 1});
$recon->{their_total} = $recon->format_amount(
{amount => $recon->{their_total}, money => 1});
$recon->{our_total} = $recon->format_amount(
Modified: trunk/sql/modules/Reconciliaton.sql
===================================================================
--- trunk/sql/modules/Reconciliaton.sql 2009-02-10 17:15:51 UTC (rev 2449)
+++ trunk/sql/modules/Reconciliaton.sql 2009-02-13 18:35:42 UTC (rev 2450)
@@ -224,17 +224,17 @@
BEGIN
INSERT INTO cr_report_line (report_id, scn, their_balance,
our_balance, "user", voucher_id, ledger_id, post_date)
- SELECT in_report_id, ac.source, 0, sum(amount) * -1 AS amount,
+ SELECT in_report_id, case when gl.table = 'gl' then gl.ref else ac.source end, 0, sum(amount) * -1 AS amount,
(select entity_id from users
where username = CURRENT_USER),
ac.voucher_id, min(ac.entry_id), ac.transdate
FROM acc_trans ac
JOIN transactions t on (ac.trans_id = t.id)
- JOIN (select id, entity_credit_account, 'ar' as table FROM ar
+ JOIN (select id, entity_credit_account::text as ref, 'ar' as table FROM ar
UNION
- select id, entity_credit_account, 'ap' as table FROM ap
+ select id, entity_credit_account::text, 'ap' as table FROM ap
UNION
- select id, NULL, 'gl' as table FROM gl) gl
+ select id, reference, 'gl' as table FROM gl) gl
ON (gl.table = t.table_name AND gl.id = t.id)
LEFT JOIN cr_report_line rl ON (rl.report_id = in_report_id
AND ((rl.ledger_id = ac.trans_id
@@ -243,8 +243,8 @@
WHERE ac.cleared IS FALSE
AND ac.chart_id = in_chart_id
AND ac.transdate <= in_end_date
- GROUP BY gl.entity_credit_account, ac.source, ac.transdate,
- ac.memo, ac.voucher_id
+ GROUP BY gl.ref, ac.source, ac.transdate,
+ ac.memo, ac.voucher_id, gl.table
HAVING count(rl.id) = 0;
RETURN in_report_id;
END;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.