From bb274380ce8d724df7083e477e9bb00015f571a7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 23 Mar 2008 20:58:05 +0000 Subject: [PATCH] Add a column for the tax rate (duh) and the taxId. The taxId will eventually be replaced with an icon for deleting tax info. Change the comment character in the JS. Return the generated output inside of an admin console. --- lib/WebGUI/Shop/Tax.pm | 27 ++++++++++++++++----------- lib/WebGUI/i18n/English/Tax.pm | 6 ++++++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index 4fd9eb380..8385269fe 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -431,14 +431,14 @@ EODIV }; EODSURL $output .= <{CurrentPageReport} {PreviousPageLink} {PageLinks} {NextPageLink} {RowsPerPageDropdown}" }); - ##Configure the table to use the paginator. + //Configure the table to use the paginator. var myTableConfig = { initialRequest : ';startIndex=0', generateRequest : buildQueryString, @@ -456,28 +456,33 @@ EODSURL }; STOP - $output .= sprintf <<'EOCHJS', $i18n->get('country'), $i18n->get('state'), $i18n->get('city'), $i18n->get('code'); - ##Build column headers. + $output .= sprintf <<'EOCHJS', $i18n->get('country'), $i18n->get('state'), $i18n->get('city'), $i18n->get('code'), $i18n->get('tax rate'); + //Build column headers. var taxColumnDefs = [ + {key:"taxId", label:"taxId"}, {key:"country", label:"%s"}, {key:"state", label:"%s"}, {key:"city", label:"%s"}, - {key:"code", label:"%s"} + {key:"code", label:"%s"}, + {key:"taxRate", label:"%s"}, + ]; EOCHJS $output .= < STOP - return ''; + return $admin->getAdminConsole->render($output, $i18n->get('taxes', 'Shop')); } 1; diff --git a/lib/WebGUI/i18n/English/Tax.pm b/lib/WebGUI/i18n/English/Tax.pm index 8d26c5ddd..0f7b74320 100644 --- a/lib/WebGUI/i18n/English/Tax.pm +++ b/lib/WebGUI/i18n/English/Tax.pm @@ -27,6 +27,12 @@ our $I18N = { context => q|A postal code, or zip code.|, }, + 'tax rate' => { + message => q|Tax Rate|, + lastUpdated => 1206302052, + context => q|The amount that a person is charged to buy something, a percentage of the price.|, + }, + }; 1;