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

SF.net SVN: ledger-smb:[6168] trunk



Revision: 6168
          http://sourceforge.net/p/ledger-smb/code/6168
Author:   einhverfr
Date:     2013-10-23 13:19:14 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Series code works for orders and quotations

Modified Paths:
--------------
    trunk/LedgerSMB/OE.pm
    trunk/bin/oe.pl

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2013-10-23 13:16:16 UTC (rev 6167)
+++ trunk/LedgerSMB/OE.pm	2013-10-23 13:19:14 UTC (rev 6168)
@@ -131,7 +131,7 @@
     }
     $form->{"$ordnumber"} =
       $form->update_defaults( $myconfig, $numberfld, $dbh )
-      unless $form->{"$ordnumber"};
+      if $form->should_update_defaults($form->{"$ordnumber"});
 
 
 

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2013-10-23 13:16:16 UTC (rev 6167)
+++ trunk/bin/oe.pl	2013-10-23 13:19:14 UTC (rev 6168)
@@ -334,7 +334,29 @@
 
 sub form_header {
 
+    my $ordnumber;
+    my $numberfld;
+    if ( $form->{type} =~ /_order$/ ) {
+        $quotation = "0";
+        $ordnumber = "ordnumber";
+	if ($form->{vc} eq 'customer'){
+             $numberfld = "sonumber";
+        } else {
+             $numberfld = "ponumber";
+        }
+    }
+    else {
+        $quotation = "1";
+        $ordnumber = "quonumber";
+        if ( $form->{vc} eq 'customer' ) {
+	    $numberfld = "sqnumber";
+	} else {
+	    $numberfld = "rfqnumber";
+	}
+    }
     $form->{nextsub} = 'update';
+
+    $sequences = $form->sequence_dropdown($numberfld) unless $form->{id};
    
     $checkedopen   = ( $form->{closed} ) ? ""        : "checked";
     $checkedclosed = ( $form->{closed} ) ? "checked" : "";
@@ -430,7 +452,8 @@
         $ordnumber = qq|
 	      <tr class="ordnumber-row">
 		<th width=70% align=right nowrap>| . $locale->text('Order Number') . qq|</th>
-                <td><input name=ordnumber size=20 value="$form->{ordnumber}"></td>
+                <td><input name=ordnumber size=20 value="$form->{ordnumber}">
+                     $sequences</td>
 		<input type=hidden name=quonumber value="$form->{quonumber}">
 	      </tr>
 	      <tr class="transdate-row">
@@ -499,7 +522,8 @@
 		<th width=70% align=right nowrap>|
               . $locale->text('Quotation Number')
               . qq|</th>
-		<td><input name=quonumber size=20 value="$form->{quonumber}"></td>
+		<td><input name=quonumber size=20 value="$form->{quonumber}">
+                    $sequences</td>
 		<input type=hidden name=ordnumber value="$form->{ordnumber}">
 	      </tr>
 |;
@@ -508,7 +532,8 @@
             $ordnumber = qq|
 	      <tr class="rfqnumber-row">
 		<th width=70% align=right nowrap>| . $locale->text('RFQ Number') . qq|</th>
-		<td><input name=quonumber size=20 value="$form->{quonumber}"></td>
+		<td><input name=quonumber size=20 value="$form->{quonumber}">
+                    $sequences</td>
 		<input type=hidden name=ordnumber value="$form->{ordnumber}">
 	      </tr>
 |;

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


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits