[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [2031] trunk
- Subject: SF.net SVN: ledger-smb: [2031] trunk
- From: ..hidden..
- Date: Wed, 09 Jan 2008 14:35:21 -0800
Revision: 2031
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2031&view=rev
Author: einhverfr
Date: 2008-01-09 14:35:21 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Correcting trial balance and gl report not to pull unapproved transactions
Modified Paths:
--------------
trunk/LedgerSMB/GL.pm
trunk/LedgerSMB/RP.pm
trunk/LedgerSMB.pm
trunk/bin/gl.pl
trunk/sql/Pg-database.sql
Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm 2008-01-08 22:25:48 UTC (rev 2030)
+++ trunk/LedgerSMB/GL.pm 2008-01-09 22:35:21 UTC (rev 2031)
@@ -417,6 +417,15 @@
} else {
$chart_id = 'NULL';
}
+
+ if (!defined $form->{approved}){
+ $approved = 'true';
+ } elsif ($form->{approved} eq 'all') {
+ $approved = 'NULL';
+ } else {
+ $approved = $dbh->quote($form->{approved});
+ }
+
my $query = qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference,
g.description, ac.transdate, ac.source,
ac.amount, c.accno, c.gifi_accno, g.notes, c.link,
@@ -429,6 +438,9 @@
WHERE $glwhere
AND (ac.chart_id = $chart_id OR
$chart_id IS NULL)
+ AND ($approved IS NULL OR
+ $approved =
+ (ac.approved AND g.approved))
UNION ALL
@@ -445,6 +457,9 @@
WHERE $arwhere
AND (ac.chart_id = $chart_id OR
$chart_id IS NULL)
+ AND ($approved IS NULL OR
+ $approved =
+ (ac.approved AND a.approved))
UNION ALL
@@ -461,6 +476,9 @@
WHERE $apwhere
AND (ac.chart_id = $chart_id OR
$chart_id IS NULL)
+ AND ($approved IS NULL OR
+ $approved =
+ (ac.approved AND a.approved))
ORDER BY $sortorder|;
my $sth = $dbh->prepare($query);
Modified: trunk/LedgerSMB/RP.pm
===================================================================
--- trunk/LedgerSMB/RP.pm 2008-01-08 22:25:48 UTC (rev 2030)
+++ trunk/LedgerSMB/RP.pm 2008-01-09 22:35:21 UTC (rev 2031)
@@ -925,6 +925,13 @@
$project = qq|
AND ac.project_id = $project_id|;
}
+ if (!defined $form->{approved}){
+ $approved = 'true';
+ } elsif ($form->{approved} eq 'all') {
+ $approved = 'NULL';
+ } else {
+ $approved = $dbh->quote($form->{approved});
+ }
if ( $form->{accounttype} eq 'gifi' ) {
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2008-01-08 22:25:48 UTC (rev 2030)
+++ trunk/LedgerSMB.pm 2008-01-09 22:35:21 UTC (rev 2031)
@@ -197,7 +197,10 @@
if (!$self->{script}) {
$self->{script} = 'login.pl';
}
- if (($self->{script} eq 'login.pl') &&
+ if ($self->{action} eq 'migrate_user'){
+ return $self;
+ }
+ if ($self->{script} eq 'login.pl' &&
($self->{action} eq 'authenticate' || !$self->{action})){
return $self;
}
Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl 2008-01-08 22:25:48 UTC (rev 2030)
+++ trunk/bin/gl.pl 2008-01-09 22:35:21 UTC (rev 2031)
@@ -131,7 +131,7 @@
}
}
- &dislay_form(1);
+ display_form(1);
}
@@ -951,7 +951,7 @@
$form->{rowcount} = $count + 1;
- &display_form;
+ display_form;
}
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2008-01-08 22:25:48 UTC (rev 2030)
+++ trunk/sql/Pg-database.sql 2008-01-09 22:35:21 UTC (rev 2031)
@@ -475,7 +475,7 @@
primary_contact int references person(id),
ar_ap_account_id int references chart(id),
cash_account_id int references chart(id),
- PRIMARY KEY(entity_id, meta_number, entity_class),
+ PRIMARY KEY(entity_id, meta_number, entity_class)
);
CREATE UNIQUE INDEX entity_credit_ar_accno_idx_u
@@ -489,7 +489,7 @@
INSERT INTO entity (name, entity_class) values ('Inventory Entity', 1);
INSERT INTO company (legal_name, entity_id)
-values ('Inventory Entity', currval('entity_id_seq');
+values ('Inventory Entity', currval('entity_id_seq'));
INSERT INTO entity_credit_account (entity_id, meta_number, entity_class)
VALUES
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.