[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6562] branches/1.3/LedgerSMB/IS.pm



Revision: 6562
          http://sourceforge.net/p/ledger-smb/code/6562
Author:   einhverfr
Date:     2014-01-20 13:53:10 +0000 (Mon, 20 Jan 2014)
Log Message:
-----------
Merging fix for invoice id clobbering (6561) from trunk

Modified Paths:
--------------
    branches/1.3/LedgerSMB/IS.pm

Modified: branches/1.3/LedgerSMB/IS.pm
===================================================================
--- branches/1.3/LedgerSMB/IS.pm	2014-01-20 13:50:44 UTC (rev 6561)
+++ branches/1.3/LedgerSMB/IS.pm	2014-01-20 13:53:10 UTC (rev 6562)
@@ -918,7 +918,7 @@
     my ( $self, $myconfig, $form ) = @_;
     $form->{invnumber} = $form->update_defaults( $myconfig, "sinumber", $dbh )
       unless $form->{invnumber};
-
+ 
     my $dbh = $form->{dbh};
 
     my $query;
@@ -1622,6 +1622,7 @@
         $form->{crdate},	$form->{id}
     ) || $form->dberror($query);
 
+    $form->error($form->{id});
     # add shipto
     $form->{name} = $form->{customer};
     $form->{name} =~ s/--$form->{customer_id}//;
@@ -2136,6 +2137,8 @@
         $sth->execute( $form->{id} ) || $form->dberror($query);
 
         $ref = $sth->fetchrow_hashref(NAME_lc);
+        $ref->{locationid} = $ref->{id};
+        delete $ref->{id};
         for ( keys %$ref ) { $form->{$_} = $ref->{$_} }
         $sth->finish;
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits