[interchange-cvs] interchange - heins modified 13 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Fri Sep 27 03:18:02 2002


User:      heins
Date:      2002-09-27 07:16:59 GMT
Modified:  .        MANIFEST
Modified:  dist/foundation catalog.cfg
Modified:  dist/foundation/products mv_metadata.asc
Modified:  dist/foundation/templates/blueyellow theme.cfg
Modified:  dist/foundation/templates/fixedwidth theme.cfg
Modified:  dist/foundation/templates/grayorange theme.cfg
Modified:  dist/foundation/templates/grayscale theme.cfg
Modified:  dist/foundation/templates/greens theme.cfg
Modified:  dist/foundation/templates/purpleyellow theme.cfg
Modified:  dist/lib/UI/pages/admin db_metaconfig.html
Modified:  lib/Vend Dispatch.pm
Modified:  lib/Vend/Table Editor.pm
Added:     dist/lib/UI/profiles recompute_transaction
Log:
* Remove the suddenly-regenerated can't-change-variable-database
  bug that arrived back with all of the extra templates.

* Add DirectoryIndex index.html to catalog.cfg.

* Add the oft-requested "recompute_transaction" thing for
  transactions, using the next two features.

* Add "include_form" capability for Table::Editor, with the
  ability to put random widgets in the form. Used in the
  recompute_transaction thing, via....

* New mv_cleanup facility that is like mv_click and mv_check, but
  happens after the form processing actions is done.

Revision  Changes    Path
2.65      +2 -0      interchange/MANIFEST


rev 2.65, prev_rev 2.64
Index: MANIFEST
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/MANIFEST,v
retrieving revision 2.64
retrieving revision 2.65
diff -u -r2.64 -r2.65
--- MANIFEST	24 Sep 2002 01:37:28 -0000	2.64
+++ MANIFEST	27 Sep 2002 07:16:44 -0000	2.65
@@ -1005,6 +1005,7 @@
 dist/lib/UI/pages/admin/ship_data.html
 dist/lib/UI/pages/admin/ship_edit.html
 dist/lib/UI/pages/admin/ship_range.html
+dist/lib/UI/pages/admin/show_session.html
 dist/lib/UI/pages/admin/sku_selector.html
 dist/lib/UI/pages/admin/special/.access
 dist/lib/UI/pages/admin/special/.autoload
@@ -1087,6 +1088,7 @@
 dist/lib/UI/profiles/login
 dist/lib/UI/profiles/order_button_build
 dist/lib/UI/profiles/process_filter
+dist/lib/UI/profiles/recompute_transaction
 dist/lib/UI/ui.cfg
 dist/lib/UI/vars/UI_EDIT_LINK
 dist/lib/UI/vars/UI_STD_FILE_NAV



2.12      +1 -0      interchange/dist/foundation/catalog.cfg


rev 2.12, prev_rev 2.11
Index: catalog.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/catalog.cfg,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -r2.11 -r2.12
--- catalog.cfg	13 Sep 2002 20:46:17 -0000	2.11
+++ catalog.cfg	27 Sep 2002 07:16:46 -0000	2.12
@@ -131,6 +131,7 @@
 ScratchDefault  mv_no_session_id  1
 ScratchDefault  mv_no_count       1
=20
+DirectoryIndex  index.html
 SpecialPage  catalog  index
 SpecialPage  report   ../etc/report
 SpecialPage  receipt  ../etc/receipt



2.15      +1 -1      interchange/dist/foundation/products/mv_metadata.asc


rev 2.15, prev_rev 2.14
Index: mv_metadata.asc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/products/mv_metadata.asc,v
retrieving revision 2.14
retrieving revision 2.15
diff -u -r2.14 -r2.15
--- mv_metadata.asc	24 Sep 2002 15:40:56 -0000	2.14
+++ mv_metadata.asc	27 Sep 2002 07:16:46 -0000	2.15
@@ -195,7 +195,7 @@
 shipping	text			description=09=09=09=09=09=09=09=09=09=09=09=09=09=09=09=
=09=09
 state				code=0Dcountry=0Dstate=0Dname=0Dtax=0Dtax_name		State/Province Se=
ttings (tax, etc)=09=09=09=09=09=09=09=09=09=09=09=09=09=09=09
 state::state	text	4											word=09=09=09=09=09=09=09=09
-transactions	text		100																1		{'bottom_buttons' =3D> "",'spread=
_textarea' =3D> "",'tab_vert_offset' =3D> "",'widget_cell_class' =3D> "",'u=
i_sort_field' =3D> "order_number",'link_table' =3D> "orderline",'ui_show_fi=
elds' =3D> "code=0Dusername=0Dnitems=0Dtotal_cost",'link_extra' =3D> "",'br=
eak_row_class' =3D> "",'label_cell_class' =3D> "",'tab_horiz_offset' =3D> "=
",'link_before' =3D> "session",'ui_special_add' =3D> "",'left_width' =3D> "=
120",'top_buttons' =3D> "",'combo_row_class' =3D> "",'spread_fields' =3D> "=
",'tab_height' =3D> "",'link_view' =3D> "",'link_fields' =3D> "code order_n=
umber sku quantity description price subtotal",'spread_meta' =3D> "",'tab_w=
idth' =3D> "",'data_row_class' =3D> "",'panel_height' =3D> "",'help_cell_cl=
ass' =3D> "",'spacer_row_class' =3D> "",'ui_data_fields' =3D> "=3DGeneral=
=0D=0Dcode=0Dstore_id=0Dorder_number =0Dsession=0Dusername=0Dcomments=0D=0D=
=3DTransaction info=0D=0Dstatus=0Dnitems=0Dsubtotal=0Dshipping=0Dhandling=
=0Dtotal_cost=0Dorder_date=0Dorder_ymd=0Dorder_wday=0Darchived=0Ddeleted=0D=
complete=0D=0D=3DMisc=0D=0Dshipmode=0Dpayment_method=0Davs=0Dpo_number=0Dor=
der_id=0Dsalestax=0D=0D=3DShipping=0D=0Dfname=0Dlname=0Dcompany=0Daddress1=
=0Daddress2=0Dcity=0Dstate=0Dzip=0Dcountry=0Dphone_day=0Dphone_night=0Dfax=
=0Demail=0D=0D=3DBilling=0D=0Db_fname=0Db_lname=0Db_company=0Db_address1=0D=
b_address2=0Db_city=0Db_state=0Db_zip=0Db_country=0Db_phone=0D=0D=3DTrackin=
g info=0D=0Daffiliate=0Dcampaign=0Dcurrency_locale=0Dparent=0Dupdate_date=
=0D",'file_upload' =3D> "",'spread_width' =3D> "",'tabbed' =3D> "1",'spread=
_height' =3D> "",'spread_textarea_rows' =3D> "",'table_width' =3D> "800",'l=
ink_sort' =3D> "code",'panel_width' =3D> "",'link_key' =3D> "order_number",=
'data_cell_class' =3D> "",'link_label' =3D> "Ordered Items",}
+transactions			100																1		{'bottom_buttons' =3D> "",'tab_vert_o=
ffset' =3D> "",'spread_textarea' =3D> "",'widget_cell_class' =3D> "",'ui_so=
rt_field' =3D> "order_number",'link_table' =3D> "orderline",'ui_show_fields=
' =3D> "code=0Dusername=0Dnitems=0Dtotal_cost",'link_extra' =3D> "",'break_=
row_class' =3D> "",'label_cell_class' =3D> "",'tab_horiz_offset' =3D> "",'l=
ink_before' =3D> "nitems",'ui_special_add' =3D> "",'left_width' =3D> "120",=
'top_buttons' =3D> "",'include_before' =3D> "total_cost",'combo_row_class' =
=3D> "",'spread_fields' =3D> "",'tab_height' =3D> "",'link_view' =3D> "",'l=
ink_fields' =3D> "code order_number sku quantity description price subtotal=
",'spread_meta' =3D> "",'data_row_class' =3D> "",'tab_width' =3D> "",'panel=
_height' =3D> "",'include_form' =3D> "<td class=3Dclabel>=0D               =
         Recompute?=0D                    </td>=0D                    <td c=
lass=3Dcdata>=0D                        <input type=3Dcheckbox name=3Dmv_cl=
eanup value=3Drecompute_transaction> Totals &nbsp;&nbsp; <input type=3Dchec=
kbox name=3Drecompute_tax value=3D1> Tax &nbsp;&nbsp; <B>Warning: this will=
 not work if your prices depend on options and you change them!=0D         =
           </td>=0D",'help_cell_class' =3D> "",'spacer_row_class' =3D> "",'=
ui_data_fields' =3D> "=3DTransaction info=0D=0Dorder_number =0Dorder_date=
=0Dstatus=0Dnitems=0Dsubtotal=0Dsalestax=0Dshipping=0Dhandling=0Dtotal_cost=
=0Dupdate_date=0D=0D=3DGeneral=0D=0Dcode=0Dstore_id=0Dusername=0Dcomments=
=0Dorder_ymd=0Dorder_wday=0Darchived=0Ddeleted=0Dcomplete=0Dshipmode=0Dpaym=
ent_method=0Davs=0Dpo_number=0Dorder_id=0D=0D=3DShipping=0D=0Dfname=0Dlname=
=0Dcompany=0Daddress1=0Daddress2=0Dcity=0Dstate=0Dzip=0Dcountry=0Dphone_day=
=0Dphone_night=0Dfax=0Demail=0D=0D=3DBilling=0D=0Db_fname=0Db_lname=0Db_com=
pany=0Db_address1=0Db_address2=0Db_city=0Db_state=0Db_zip=0Db_country=0Db_p=
hone=0D=0D=3DTracking info=0D=0Daffiliate=0Dcampaign=0Dcurrency_locale=0Dpa=
rent",'file_upload' =3D> "",'spread_width' =3D> "",'tabbed' =3D> "1",'sprea=
d_height' =3D> "",'table_width' =3D> "800",'spread_textarea_rows' =3D> "",'=
link_sort' =3D> "code",'panel_width' =3D> "",'link_key' =3D> "order_number"=
,'data_cell_class' =3D> "",'link_label' =3D> "Ordered Items",}
 transactions::status	combo							pending=3DPending, shipped=3DShipped, par=
tial=3DPartially shipped, backorder=3DBack ordered, credit=3DWaiting for cr=
edit check, canceled=3DCanceled					nullselect=09=09=09=09=09=09=09=09
 ui_component::mv_metadata																					{'ui_data_fields' =3D> "=3DM=
ain=0D=0Dcode=0Dlabel=0Ddefault=0Dtype=0Dwidth=0Dheight=0Doptions=0Dfilter=
=0D=0D=3DDatabase lookup=0D=0Dlookup=0Dfield=0Ddb=0D=0D=3DHelp and misc=0D=
=0Dhelp=0Dhelp_url=0Dprepend=0Dappend=0Dpre_filter",'table_width' =3D> "80%=
",'left_width' =3D> "30%",}
 ui_component::mv_metadata::append	textarea	60	5							Append HTML	<SMALL>H=
TML to be appended to the widget.=0DWill substitute in the macros _UI_TABLE=
_, _UI_COLUMN_,=0D_UI_KEY, and _UI_VALUE_, and will resolve relative links=
=0Dwith absolute links.</SMALL>=09=09=09=09=09=09=09=09=09=09



1.2       +1 -0      interchange/dist/foundation/templates/blueyellow/theme=
cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/blueyellow/theme.c=
fg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:52 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:47 -0000	1.2
@@ -145,4 +145,5 @@
 ##
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



1.2       +1 -0      interchange/dist/foundation/templates/fixedwidth/theme=
cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/fixedwidth/theme.c=
fg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:52 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:49 -0000	1.2
@@ -161,4 +161,5 @@
=20
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



1.2       +1 -0      interchange/dist/foundation/templates/grayorange/theme=
cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/grayorange/theme.c=
fg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:52 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:49 -0000	1.2
@@ -145,4 +145,5 @@
 ##
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



1.2       +1 -0      interchange/dist/foundation/templates/grayscale/theme.=
cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/grayscale/theme.cf=
g,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:53 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:51 -0000	1.2
@@ -145,4 +145,5 @@
 ##
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



1.2       +1 -0      interchange/dist/foundation/templates/greens/theme.cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/greens/theme.cfg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:53 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:51 -0000	1.2
@@ -145,4 +145,5 @@
 ##
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



1.2       +1 -0      interchange/dist/foundation/templates/purpleyellow/the=
me.cfg


rev 1.2, prev_rev 1.1
Index: theme.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/foundation/templates/purpleyellow/theme=
cfg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- theme.cfg	16 Aug 2002 21:44:53 -0000	1.1
+++ theme.cfg	27 Sep 2002 07:16:52 -0000	1.2
@@ -145,4 +145,5 @@
 ##
 ifdef @TRAFFIC =3D~ /low/i
 Pragma dynamic_variables
+Pragma dynamic_variables_file_only
 endif



2.6       +5 -0      interchange/dist/lib/UI/pages/admin/db_metaconfig.html


rev 2.6, prev_rev 2.5
Index: db_metaconfig.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/db_metaconfig.html,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -r2.5 -r2.6
--- db_metaconfig.html	24 Sep 2002 15:40:57 -0000	2.5
+++ db_metaconfig.html	27 Sep 2002 07:16:52 -0000	2.6
@@ -78,6 +78,8 @@
 		extended.link_fields
 		extended.link_view
 		extended.link_extra
+		extended.include_before
+		extended.include_form
=20
 		=3DTabbed display
=20
@@ -140,6 +142,8 @@
 		'extended.ui_special_add'		=3D> 'Special Additions',
 		'extended.link_table'			=3D> 'Table to link in cell',
 		'extended.link_before'			=3D> 'Column to appear before',
+		'extended.include_before'		=3D> 'Column for include to appear before',
+		'extended.include_form'			=3D> 'Custom form widget for inclusion',
 		'extended.link_key'				=3D> 'Foreign Key',
 		'extended.link_label'			=3D> 'Label for linked table',
 		'extended.link_sort'			=3D> 'Sort linked records by',
@@ -200,6 +204,7 @@
 		'extended.bottom_buttons'		=3D> 'yesno',
 		'extended.link_table'			=3D> 'select',
 		'extended.link_before'			=3D> 'text_12',
+		'extended.include_form'			=3D> 'textarea_10_80',
 		'extended.link_label'			=3D> 'text_50',
 		'extended.link_fields'			=3D> 'text_70',
 		'extended.link_key'			=3D> 'text_20',



1.1                  interchange/dist/lib/UI/profiles/recompute_transaction


rev 1.1, prev_rev 1.0
Index: recompute_transaction
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
__NAME__ recompute_transaction

[comment]
	Makes session from transactions, pretends its an order,
	and recomputes. Only recomputes tax and shipping if
	specifically instructed.
[/comment]

[try]
[perl tables=3D"transactions orderline userdb products options country stat=
e pricing"]

	my $order_number =3D $CGI->{order_number}=20
		or die "No transaction number.\n";

	my $tdb =3D $Db{transactions}
		or die "Cannot find transaction database.\n";
	my $odb =3D $Db{orderline}
		or die "Cannot find orderline database.\n";
	my $udb =3D $Db{userdb}
		or die "Cannot find user database.\n";

	my $trec =3D $tdb->row_hash($order_number)
		or die errmsg("Invalid transaction number: %s", $order_number);

	my $date =3D $Tag->time({ body =3D> '%c' });
=09
	my $otab =3D $odb->name();
	my $on_quoted =3D $odb->quote($order_number, 'order_number');
=09
	my $q =3D "select * from $otab where order_number =3D $on_quoted";

	my $oary =3D $odb->query({ sql =3D> $q, hashref =3D> 1})
		or die errmsg(
				"Problem with orderline query for order number: %s",
				$order_number);
=09
	# In case you want to recompute shipping
	my $smode =3D $trec->{shipmode};
	$smode =3D~ s/\s+.*//;

	my @updates;
	@$Items =3D ();
	my $nitems =3D 0;
	my $subt =3D 0;
	for my $orec (@$oary) {
		my $code =3D $orec->{sku};
		my $qty  =3D $orec->{quantity};
		my $price =3D $orec->{price};
		my $sub  =3D $orec->{subtotal};
		my $nsub =3D $qty * $price;
		if($nsub !=3D $sub) {
			push @updates, [ $orec->{code}, { subtotal =3D> $nsub } ];
		}
		$nitems +=3D $qty;
		$subt +=3D $nsub;
		push @$Items, { code =3D> $code, quantity =3D> $qty, mv_price =3D> $price=
 };
	}

	for(@updates) {
		$odb->set_slice(@$_);
	}

	my $stax;
	if($CGI->{recompute_tax}) {
#Debug("tax prior to recompute: $trec->{salestax}");
		$Values->{country} =3D $trec->{country};
		$Values->{state} =3D $trec->{state};
		$Values->{zip} =3D $trec->{zip};
		$stax =3D $Tag->salestax( { noformat =3D> 1 });
		$trec->{salestax} =3D $stax;
#Debug("tax after recompute: $trec->{salestax}");
	}

	$trec->{subtotal} =3D $subt;
	$trec->{nitems} =3D $nitems;
	$trec->{total_cost} =3D 0;
	for(qw/subtotal salestax shipping handling/) {
		$trec->{total_cost} +=3D $trec->{$_};
	}

	my $code =3D delete $trec->{code};
	$tdb->set_slice($code, $trec);
	$CGI->{mv_data_table} =3D 'transactions';
	$Tag->warnings("Recomputed transaction $order_number");

	[/perl]
[/try]
[catch error-set=3D"Recompute transaction"]
	There was an error recomputing the transaction: $ERROR$
[/catch]




1.2       +10 -2     interchange/lib/Vend/Dispatch.pm


rev 1.2, prev_rev 1.1
Index: Dispatch.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Dispatch.pm	17 Sep 2002 02:00:02 -0000	1.1
+++ Dispatch.pm	27 Sep 2002 07:16:55 -0000	1.2
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.1 2002/09/17 02:00:02 mheins Exp $
+# $Id: Dispatch.pm,v 1.2 2002/09/27 07:16:55 mheins Exp $
 #
 # Copyright (C) 2002 ICDEVGROUP <interchange@icdevgroup.org>
 # Copyright (C) 2002 Mike Heins <mike@perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Dispatch;
=20
 use vars qw($VERSION);
-$VERSION =3D substr(q$Revision: 1.1 $, 10);
+$VERSION =3D substr(q$Revision: 1.2 $, 10);
=20
 use POSIX qw(strftime);
 use Vend::Util;
@@ -606,6 +606,14 @@
 		$template .=3D "($err)";
 		logError($err);
 		response($template);
+	}
+
+	if($CGI::values{mv_cleanup}) {
+		my(@checks) =3D split /\s*[,\0]+\s*/, delete $CGI::values{mv_cleanup};
+		my($check);
+		foreach $check (@checks) {
+				parse_click $::Values, $check, \%CGI::values;=09
+		}
 	}
=20
 	return $status;



1.8       +58 -12    interchange/lib/Vend/Table/Editor.pm


rev 1.8, prev_rev 1.7
Index: Editor.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Editor.pm	24 Sep 2002 15:40:58 -0000	1.7
+++ Editor.pm	27 Sep 2002 07:16:57 -0000	1.8
@@ -1,6 +1,6 @@
 # Vend::Table::Editor - Swiss-army-knife table editor for Interchange
 #
-# $Id: Editor.pm,v 1.7 2002/09/24 15:40:58 mheins Exp $
+# $Id: Editor.pm,v 1.8 2002/09/27 07:16:57 mheins Exp $
 #
 # Copyright (C) 2002 ICDEVGROUP <interchange@icdevgroup.org>
 # Copyright (C) 2002 Mike Heins <mike@perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Table::Editor;
=20
 use vars qw($VERSION);
-$VERSION =3D substr(q$Revision: 1.7 $, 10);
+$VERSION =3D substr(q$Revision: 1.8 $, 10);
=20
 use Vend::Util;
 use Vend::Interpolate;
@@ -230,7 +230,7 @@
 	my $mtab;
 	my $record;
=20
-	my $no_meta =3D $CGI::values{ui_no_meta_display};
+	my $no_meta =3D $opt->{ui_no_meta_display};
=20
 	METALOOK: {
 		## No meta display wanted
@@ -1074,6 +1074,8 @@
 		file_upload
 		help_cell_class
 		help_cell_style
+		include_before
+		include_form
 		label_cell_class
 		label_cell_style
 		left_width
@@ -1124,12 +1126,13 @@
 		ui_meta_view
 		ui_new_item
 		ui_nextpage
+		ui_no_meta_display
 		widget_cell_class
 		widget_cell_style
 	/;
=20
 	for(grep defined $tmeta->{$_}, @mapdirect) {
-		$opt->{$_} ||=3D $tmeta->{$_};
+		$opt->{$_} =3D $tmeta->{$_} if ! defined $opt->{$_};
 	}
=20
 	if($opt->{cgi}) {
@@ -1367,8 +1370,6 @@
 	my $widget       =3D $opt->{widget};
 	my $width        =3D $opt->{width};
=20
-	#my $blabel      =3D $opt->{begin_label} || '<b>';
-	#my $elabel      =3D $opt->{end_label} || '</b>';
 	my $blabel =3D $opt->{blabel};
 	my $elabel =3D $opt->{elabel};
 	my $mlabel =3D '';
@@ -1434,6 +1435,7 @@
 	$::Scratch->{$opt->{back_text}}   =3D $btext if $btext;
=20
 	undef $opt->{tabbed} if $::Scratch->{ui_old_browser};
+	undef $opt->{auto_secure} if $opt->{cgi};
=20
 	### Build the error checking
 	my $error_show_var =3D 1;
@@ -2498,6 +2500,41 @@
 		}
 	}
=20
+	if($opt->{include_form}) {
+#::logDebug("In link table routines...");
+		my @icells;
+		my @ibefore;
+		my $tcount =3D 1;
+		my @includes;
+		if(ref($opt->{include_form}) eq 'ARRAY') {
+			@icells  =3D @{delete $opt->{include_form}};
+			@ibefore =3D @{delete $opt->{include_before} || []};
+		}
+		else {
+			@icells  =3D delete $opt->{include_form};
+			@ibefore =3D delete $opt->{include_before};
+		}
+
+		$opt->{include_before} =3D {};
+		while(my $it =3D shift @icells) {
+			my $ib =3D shift @ibefore;
+
+			my $rcount =3D 0;
+
+#::logDebug("Made include_before=3D$it");
+			if($ib) {
+				$opt->{include_before}{$ib} =3D $it;
+			}
+			elsif($it =3D~ /^\s*<tr\b/i) {
+				push @includes, $it;
+			}
+			else {
+				push @includes, "<tr>$it</tr>";
+			}
+		}
+		$opt->{include_form} =3D join "\n", @includes if @includes;
+	}
+
     if($opt->{tabbed}) {
         my $ph =3D $opt->{panel_height} || '600';
         my $pw =3D $opt->{panel_width} || '800';
@@ -2509,6 +2546,8 @@
         chunk ttag(), qq{<tr><td colspan=3D$span$extra>\n};
     }
=20
+#::logDebug("include_before: " . uneval($opt->{include_before}));
+
 	my @extra_hidden;
 	my $icount =3D 0;
 	foreach my $col (@cols) {
@@ -2742,6 +2781,7 @@
 										type =3D> $widget->{$c} || $type,
 										width =3D> $width->{$c},
 										return_hash =3D> 1,
+										ui_no_meta_display =3D> $opt->{ui_no_meta_display},
 									});
 #::logDebug("finished display of col=3D$c");
 		my $update_ctl;
@@ -2777,8 +2817,10 @@
 						delete $link_row{$link_before{$col}};
 		}
 		if($opt->{include_before} and $opt->{include_before}{$col}) {
-			my $h =3D { ROW =3D> $opt->{include_before}{$col} };
-			col_chunk "_INCLUDE_$link_before{$col}", $h;
+#::logDebug("include_before: $col $opt->{include_before}{$col}");
+			my $h =3D { ROW =3D> delete $opt->{include_before}{$col} };
+			$h->{TEMPLATE} =3D $opt->{whole_template} || '<tr>{ROW}</tr>';
+			col_chunk "_INCLUDE_$col", $h;
 		}
 		$ctl_index++ if $update_ctl;
 		if($opt->{start_at} and $opt->{start_at} eq $namecol) {
@@ -2786,7 +2828,7 @@
 #::logDebug("set start_at_index to $ctl_index");
 		}
 #::logDebug("control index now=3D$ctl_index");
-		col_chunk $c, $display;
+		col_chunk $col, $display;
 	}
=20
 	for(sort keys %link_row) {
@@ -2838,7 +2880,11 @@
 	### Here the user can include some extra stuff in the form....
 	###
 	if($opt->{include_form}) {
-		col_chunk '_INCLUDE_FORM', { ROW =3D> $opt->{include_form} };
+		col_chunk '_INCLUDE_FORM',
+					{
+						ROW =3D> $opt->{include_form},
+						TEMPLATE =3D> $opt->{whole_template} || '<tr>{ROW}</tr>',
+					};
 	}
 	### END USER INCLUDE
=20
@@ -3158,8 +3204,8 @@
 			or next;
 		if($ref->{ROW}) {
 #::logDebug("outputting ROW $_=3D$ref->{ROW}");
-			my $tpl =3D $ref->{TEMPLATE} || $opt->{row_template};
-			push @out, tag_attr_list($opt->{combo_template}, $ref);
+			my $tpl =3D $ref->{TEMPLATE} || $opt->{combo_template};
+			push @out, tag_attr_list($tpl, $ref);
 			$rowcount =3D 0;
 			next;
 		}