Index: /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 6423)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 6424)
@@ -177,5 +177,7 @@
         writer.writerow([self.prefix, str(self.num), "%0.2f" % self.cost])
 
-        for value in self.values():
+        for value in sorted(self.values(),
+                            cmp=lambda x, y: cmp(
+                x.batch_serial, y.batch_serial)):
             writer.writerow(
                 [str(value.batch_serial), str(value.representation)]
@@ -203,5 +205,8 @@
         writer.writerow([self.prefix, '%0.2f' % self.cost, str(self.num),
                          str(self.entry_num)])
-        for value in self.values():
+        for value in sorted(
+            self.values(),
+            cmp = lambda x, y: cmp(x.batch_serial, y.batch_serial)
+            ):
             writer.writerow([
                     self.prefix, value.batch_serial, value.representation,
