[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3714] branches/1.3
- Subject: SF.net SVN: ledger-smb:[3714] branches/1.3
- From: ..hidden..
- Date: Mon, 19 Sep 2011 21:23:53 +0000
Revision: 3714
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3714&view=rev
Author: einhverfr
Date: 2011-09-19 21:23:53 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
Correcting db version in initial database creation (version changed in previous update script)
correcting redirect logic from old code to new code
Correcting errors saving existing unapproved vouchers
Modified Paths:
--------------
branches/1.3/LedgerSMB/AA.pm
branches/1.3/LedgerSMB/Sysconfig.pm
branches/1.3/bin/aa.pl
branches/1.3/common.pl
branches/1.3/sql/Pg-database.sql
Removed Paths:
-------------
branches/1.3/SNAPSHOT_SVNREV
Modified: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/LedgerSMB/AA.pm 2011-09-19 21:23:53 UTC (rev 3714)
@@ -294,9 +294,14 @@
SELECT id
FROM $table
WHERE id = $id|;
+ my ($exists) = $dbh->selectrow_array($query);
+ if ($exists and $form->{batch_id}) {
+ $query = "SELECT voucher__delete(id)
+ FROM voucher
+ where trans_id = ? and batch_class in (1, 2)";
+ $dbh->prepare($query)->execute($form->{id}) || $form->dberror($query);
+ } elsif ($exists) {
- if ( $dbh->selectrow_array($query) ) {
-
# delete detail records
$dbh->do($query) || $form->dberror($query);
@@ -307,21 +312,16 @@
WHERE trans_id = $id)|;
$dbh->do($query) || $form->dberror($query);
- $query = qq|
- DELETE FROM voucher
- WHERE trans_id = $id
- and batch_class in (1,2)|;
- $dbh->do($query) || $form->dberror($query);
-
$query = qq|
DELETE FROM acc_trans
WHERE trans_id = $id|;
$dbh->do($query) || $form->dberror($query);
+ $dbh->do("DELETE FROM $table where id = $id");
}
+
}
- else {
my $uid = localtime;
$uid .= "$$";
@@ -332,7 +332,7 @@
# are using the current username as the "person" inserting the new
# AR/AP Transaction.
# ~A
- $query = qq|
+ $query = qq|
INSERT INTO $table (invnumber, person_id,
entity_credit_account)
VALUES (?, (select u.entity_id from users u
@@ -343,14 +343,13 @@
# attributes to pass to $dbh->prepare. This is not used here.
# ~A
- $dbh->do($query,undef,$uid,$form->{login}, $form->{"$form->{vc}_id"}) || $form->dberror($query);
+ $dbh->do($query,undef,$uid,$form->{login}, $form->{"$form->{vc}_id"}) || $form->dberror($query);
- $query = qq|
+ $query = qq|
SELECT id FROM $table
WHERE invnumber = ?|;
- ( $form->{id} ) = $dbh->selectrow_array($query,undef,$uid);
- }
+ ( $form->{id} ) = $dbh->selectrow_array($query,undef,$uid);
# record last payment date in ar/ap table
$form->{datepaid} = $form->{transdate} unless $form->{datepaid};
Modified: branches/1.3/LedgerSMB/Sysconfig.pm
===================================================================
--- branches/1.3/LedgerSMB/Sysconfig.pm 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/LedgerSMB/Sysconfig.pm 2011-09-19 21:23:53 UTC (rev 3714)
@@ -26,11 +26,18 @@
our @io_lineitem_columns = qw(unit onhand sellprice discount linetotal);
# Whitelist for redirect destination
+#
+our @newscripts = qw(
+ account.pl customer.pl inventory.pl payment.pl user.pl
+admin.pl drafts.pl journal.pl recon.pl vendor.pl
+asset.pl employee.pl login.pl setup.pl vouchers.pl
+file.pl menu.pl taxform.pl);
+
our @scripts = (
- 'aa.pl', 'admin.pl', 'am.pl', 'ap.pl',
+ 'aa.pl', 'am.pl', 'ap.pl',
'ar.pl', 'arap.pl', 'arapprn.pl', 'bp.pl',
'ca.pl', 'gl.pl',
- 'ic.pl', 'io.pl', 'ir.pl',
+ 'ic.pl', 'ir.pl',
'is.pl', 'jc.pl', 'login.pl', 'menu.pl',
'oe.pl', 'pe.pl', 'pos.pl', 'ps.pl',
'pw.pl', 'rc.pl', 'rp.pl', 'initiate.pl'
Deleted: branches/1.3/SNAPSHOT_SVNREV
===================================================================
--- branches/1.3/SNAPSHOT_SVNREV 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/SNAPSHOT_SVNREV 2011-09-19 21:23:53 UTC (rev 3714)
@@ -1,3 +0,0 @@
-Snapshot 20110716 has revision 3544
-Snapshot 20110731 has revision 3609
-Snapshot 20110803 has revision 3625
Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/bin/aa.pl 2011-09-19 21:23:53 UTC (rev 3714)
@@ -1355,17 +1355,12 @@
&{"print_$form->{formname}"}( $old_form, 1 );
}
- if(defined($form->{batch_id}) and $form->{batch_id})
+ if(defined($form->{batch_id}) and $form->{batch_id}
+ and ($form->{callback} !~ /vouchers/))
{
$form->{callback}.= qq|&batch_id=$form->{batch_id}|;
}
-
- if(defined($form->{batch_id}) and $form->{batch_id})
- {
- $form->{callback}.= qq|&batch_id=$form->{batch_id}|;
- }
-
$form->redirect( $locale->text('Transaction posted!') );
}
else {
Modified: branches/1.3/common.pl
===================================================================
--- branches/1.3/common.pl 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/common.pl 2011-09-19 21:23:53 UTC (rev 3714)
@@ -36,7 +36,11 @@
print "Content-type: text/html\n\n";
exit;
}
-
+ if (first { $_ eq $script } @{LedgerSMB::Sysconfig::newscripts}){
+ print "Location: $form->{callback}\n";
+ print "Content-type: text/html\n\n";
+ exit;
+ }
$form->error(
$locale->text(
__FILE__ . ':' . __LINE__ . ':' . $script . ':' . "Invalid Redirect"
Modified: branches/1.3/sql/Pg-database.sql
===================================================================
--- branches/1.3/sql/Pg-database.sql 2011-09-19 17:20:53 UTC (rev 3713)
+++ branches/1.3/sql/Pg-database.sql 2011-09-19 21:23:53 UTC (rev 3714)
@@ -967,7 +967,7 @@
sonumber|1
yearend|1
businessnumber|1
-version|1.2.99
+version|1.3.0
closedto|\N
revtrans|1
ponumber|1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.