[interchange-cvs] interchange - jon modified 2 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Wed Mar 19 09:07:01 2003


User:      jon
Date:      2003-03-19 14:00:49 GMT
Modified:  dist/foundation/products variable.txt
Modified:  dist/lib/UI/pages/include order_delete_archive
Log:
Allow the "Next order" button in the admin order_view to jump over a few
(20, by default) missing order numbers in the order sequence so that
deleted order numbers here and there don't throw the user back to the
order list view. Maximum number to skip settable by variable
UI_ORDER_VIEWNEXT_MAX_SKIP, now in Foundation "Admin control" section.

Revision  Changes    Path
2.23      +1 -0      interchange/dist/foundation/products/variable.txt


rev 2.23, prev_rev 2.22
Index: variable.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/products/variable.txt,v
retrieving revision 2.22
retrieving revision 2.23
diff -u -u -r2.22 -r2.23
--- variable.txt	27 Jan 2003 19:03:36 -0000	2.22
+++ variable.txt	19 Mar 2003 14:00:49 -0000	2.23
@@ -114,6 +114,7 @@
 UI_ITEM_TABLES	products pricing inventory merchandising options:sku	Item display
 UI_IMAGE_DIR_SECURE	__MVC_SHAREURL__/interchange-5/	Admin control
 UI_META_LINK	1	Admin control
+UI_ORDER_VIEWNEXT_MAX_SKIP	20	Admin control
 UI_PAGE_DIR	pages	Directories and Paths
 UI_SECURE	__MVC_UISECURE__	Admin control
 UI_TEMPLATE_DIR	templates	Directories and Paths



1.3       +6 -0      interchange/dist/lib/UI/pages/include/order_delete_archive


rev 1.3, prev_rev 1.2
Index: order_delete_archive
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/order_delete_archive,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- order_delete_archive	22 Nov 2001 04:24:02 -0000	1.2
+++ order_delete_archive	19 Mar 2003 14:00:49 -0000	1.3
@@ -52,8 +52,14 @@
 		$ordnum =~ s/[\0,\s].*//;
 		return if ! $ordnum;
 		$ordnum++;
+		my $maxtries = $Tag->var('UI_ORDER_VIEWNEXT_MAX_SKIP', 2) || 20;
+		my $tries = 0;
 		CHECKNEXT: {
 			if (! $db->record_exists($ordnum) ) {
+				if (++$tries <= $maxtries) {
+					++$ordnum;
+					redo CHECKNEXT;
+				}
 				undef $ordnum;
 				last CHECKNEXT;
 			}