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

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



Revision: 6629
          http://sourceforge.net/p/ledger-smb/code/6629
Author:   einhverfr
Date:     2014-01-25 06:48:12 +0000 (Sat, 25 Jan 2014)
Log Message:
-----------
Inventory adjustment screen now saves.  Need to ensure that at least one row shows.

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/inventory.pm
    trunk/UI/inventory/adjustment_entry.html

Modified: trunk/LedgerSMB/Scripts/inventory.pm
===================================================================
--- trunk/LedgerSMB/Scripts/inventory.pm	2014-01-25 06:32:49 UTC (rev 6628)
+++ trunk/LedgerSMB/Scripts/inventory.pm	2014-01-25 06:48:12 UTC (rev 6629)
@@ -17,6 +17,7 @@
 =cut
 package LedgerSMB::Scripts::inventory;
 
+use Carp::Always;
 use LedgerSMB::Template;
 use LedgerSMB::Inventory::Adjust;
 use LedgerSMB::Inventory::Adjust_Line;

Modified: trunk/UI/inventory/adjustment_entry.html
===================================================================
--- trunk/UI/inventory/adjustment_entry.html	2014-01-25 06:32:49 UTC (rev 6628)
+++ trunk/UI/inventory/adjustment_entry.html	2014-01-25 06:48:12 UTC (rev 6629)
@@ -25,44 +25,47 @@
 		<th><?lsmb text('On Hand') ?></th>
 		<th><?lsmb text('Adjustment') ?></th>
 	</tr>
-	<?lsmb FOREACH i = [ 1 .. rowcount ] -?>
-	<?lsmb ${"id_$i"} = (${"id_$i"}) ? ${"id_$i"} : "New_$i"
+	<?lsmb FOREACH i = [ 1 .. rowcount ];
+              id_id = "id_$i";
+              IF NOT $id_id;
+                 $id_id = "New_$i";
+              END;
 		# ids are numeric -?>
 	<?lsmb INCLUDE input element_data = {
-		name  = "id_$i"
-		value = ${"id_$i"}
+		name  = id_id
+		value = $id_id
 		type  = "hidden"
 	} ?>	
         <tr>
 		<td><?lsmb INCLUDE input element_data = {
-			name  = "partnumber_${id_$i}"
-			value = ${partnumber_${"id_$i"}}
+			name  = "partnumber_$id_id"
+			value = ${"partnumber_$id_id"}
 			class = "control_code"
 			type  = "text"
 			size  = "20"                        
 		} ?></td>
 		<td><?lsmb INCLUDE input element_data = {
-			name  = "description_${id_$i}"
-			value = ${description_${"id_$i"}}
+			name  = "description_$id_id"
+			value = ${"description_$id_id"}
 			type  = "hidden"
-		} ?><?lsmb ${description_${"id_$i"}} ?></td>
+		} ?><?lsmb ${"description_$id_id"} ?></td>
 		<td><?lsmb INCLUDE input element_data = {
-			name  = "counted_${id_$i}"
-			value = ${counted_${"id_$i"}}
+			name  = "counted_$id_id"
+			value = ${"counted_$id_id"}
 			class = "numeric"
 			type  = "text"
 			size  = "20"                    
 		} ?></td>
 		<td><?lsmb INCLUDE input element_data = {
-			name  = "onhand_${id_$i}"
-			value = ${onhand_${"id_$i"}}
+			name  = "onhand_$id_id"
+			value = ${"onhand_$id_id"}
 			type  = "hidden"
-		} ?><?lsmb ${onhand_${"id_$i"}} ?></td>
+		} ?><?lsmb ${"onhand_$id_id"} ?></td>
 		<td><?lsmb INCLUDE input element_data = {
-			name  = "qty_${id_$i}"
-			value = ${qty_${"id_$i"}}
+			name  = "qty_$id_id"
+			value = ${"qty_$id_id"}
 			type  = "hidden"
-		} ?><?lsmb ${qty_${"id_$i"}} ?></td>
+		} ?><?lsmb ${"qty_$id_id"} ?></td>
         </tr>
 	<?lsmb END # foreach i -?>
 	</table>

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