[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5876] trunk
- Subject: SF.net SVN: ledger-smb:[5876] trunk
- From: ..hidden..
- Date: Tue, 28 May 2013 20:42:38 +0000
Revision: 5876
http://sourceforge.net/p/ledger-smb/code/5876
Author: tshvr
Date: 2013-05-28 20:42:37 +0000 (Tue, 28 May 2013)
Log Message:
-----------
on_hold vendor invoice via ir.pl and IR.pm to table ap
Modified Paths:
--------------
trunk/LedgerSMB/IR.pm
trunk/bin/ir.pl
Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm 2013-05-27 07:31:04 UTC (rev 5875)
+++ trunk/LedgerSMB/IR.pm 2013-05-28 20:42:37 UTC (rev 5876)
@@ -1454,11 +1454,11 @@
if ($form->{id}) { # it's an existing (.. probably) invoice.
my $dbh = $form->{dbh};
- my $sth = $dbh->prepare("SELECT on_hold from ar where ar.id = ?");
+ my $sth = $dbh->prepare("SELECT on_hold from ap where ap.id = ?");#tshvr4
$sth->execute($form->{id});
my $state = $sth->fetchrow_array;
my $n_s; # new state
- if ($state[0] == 't') {
+ if ($state) {#tshvr4
# Turn it off
$n_s = 'f';
@@ -1467,8 +1467,8 @@
$n_s = 't';
}
- $sth = $dbh->prepare("update ar set on_hold = ?::boolean where ar.id = ?");
- my $code = $dbh->execute($ns, $form->{id});
+ $sth = $dbh->prepare("update ap set on_hold = ?::boolean where ap.id = ?");
+ my $code = $dbh->execute($n_s, $form->{id});#tshvr4
return 1;
Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl 2013-05-27 07:31:04 UTC (rev 5875)
+++ trunk/bin/ir.pl 2013-05-28 20:42:37 UTC (rev 5876)
@@ -1416,7 +1416,7 @@
if ($form->{id}) {
- my $toggled = IS->toggle_on_hold($form);
+ my $toggled = IR->toggle_on_hold($form);#tshvr4
#&invoice_links(); # is that it?
&edit(); # it was already IN edit for this to be reached.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.