Index: openacs-4/packages/ecommerce/www/admin/sales-tax/clear.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/clear.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/clear.adp 18 Aug 2008 21:01:27 -0000 1.1 @@ -0,0 +1,12 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +Please confirm that you wish to clear all your sales tax settings. + +
+
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/sales-tax/clear.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/clear.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/sales-tax/clear.tcl 9 Mar 2004 00:59:53 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/clear.tcl 18 Aug 2008 21:01:27 -0000 1.4 @@ -10,21 +10,6 @@ ad_require_permission [ad_conn package_id] admin -doc_return 200 text/html "[ad_admin_header "Clear Sales Tax Settings"] +set title "Clear Sales Tax Settings" +set context [list [list index "Sales Tax"] $title] -

Clear Sales Tax Settings

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Sales Tax"] "Clear Settings"] - -
- -Please confirm that you wish to clear all your sales tax settings. - -
-
- -
-
- -[ad_admin_footer] -" \ No newline at end of file Index: openacs-4/packages/ecommerce/www/admin/sales-tax/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/edit.adp 18 Aug 2008 21:01:27 -0000 1.1 @@ -0,0 +1,19 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

+Please specify the sales tax rates below for each state listed and whether tax +is charged on shipping in that state: +

+ +
+ @export_form_vars_html;noquote@ +
    +@usps_abbrev_list_html;noquote@ +
+
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/sales-tax/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/sales-tax/edit.tcl 9 Mar 2004 00:59:53 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/edit.tcl 18 Aug 2008 21:01:27 -0000 1.4 @@ -17,67 +17,33 @@ # below and use it in conjunction with set_form_variables set usps_abbrev_list $usps_abbrev +set title "Sales Tax, continued" +set context [list [list index "Sales Tax"] $title] -set page_html "[ad_admin_header "Sales Tax, Continued"] +set export_form_vars_html [export_form_vars usps_abbrev_list] -

Sales Tax, Continued

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Sales Tax"] "Edit"] - -
- -Please specify the sales tax rates below for each state listed and whether tax -is charged on shipping in that state: - -

- -

-[export_form_vars usps_abbrev_list] - -
    -" - - +set usps_abbrev_list_html "" foreach usps_abbrev $usps_abbrev_list { - append page_html "
  • [ec_state_name_from_usps_abbrev $usps_abbrev]: -
    + append usps_abbrev_list_html "
  • [ec_state_name_from_usps_abbrev $usps_abbrev]: Tax rate %
    -Charge tax on shipping? -" +Charge tax on shipping? " -set shipping_p [db_string get_shipping_ps "select shipping_p from ec_sales_tax_by_state where usps_abbrev=:usps_abbrev" -default ""] -if { [empty_string_p $shipping_p] || $shipping_p == "t" } { - append page_html "Yes -   No - " -} else { - append page_html "Yes -   No - " -} + set shipping_p [db_string get_shipping_ps "select shipping_p from ec_sales_tax_by_state where usps_abbrev=:usps_abbrev" -default ""] + if { [empty_string_p $shipping_p] || $shipping_p == "t" } { + append usps_abbrev_list_html "Yes +   No" + } else { + append usps_abbrev_list_html "Yes +   No" + } -db_release_unused_handles - -append page_html "
  • -" + db_release_unused_handles } -append page_html "
-
- -
-
-[ad_admin_footer] -" -doc_return 200 text/html $page_html - - - - Index: openacs-4/packages/ecommerce/www/admin/sales-tax/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/index.adp 18 Aug 2008 21:01:27 -0000 1.1 @@ -0,0 +1,60 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Your Current Settings

+ +

No tax is currently charged in any state.

+
    + @sales_taxes_html;noqote@ +
+
+ +

Change Your Settings

+

Please select all the states in which you need to charge sales tax. You will be asked +later what the tax rates are and whether to charge tax on shipping in those states. +

+
+@state_widget_html;noquote@ +
+ +
+
+ +

Clear All Settings

+

+If you want to start from scratch, clear all settings. +

+

In general, you must collect sales tax on orders shipped to states +where you have some kind of physical presence, e.g., a warehouse, a +sales office, or a retail store. +

+Some sources of data on sales tax rates by zip codes are: +

+ +

+We tried to keep this module simple by ignoring the ugly fact of local +taxing jurisdictions (e.g., that New York City collects tax on top of +what New York State collects). If you're a Fortune 500 company with +nexus in 50 states, you'll probably have to add in a fair amount of +complexity to collect tax more precisely or at least remit +sales tax more precisely. +

+

Audit Trail

+ Index: openacs-4/packages/ecommerce/www/admin/sales-tax/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/sales-tax/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/www/admin/sales-tax/index.tcl 9 Mar 2004 05:00:05 -0000 1.7 +++ openacs-4/packages/ecommerce/www/admin/sales-tax/index.tcl 18 Aug 2008 21:01:27 -0000 1.8 @@ -10,109 +10,30 @@ ad_require_permission [ad_conn package_id] admin -set page_html "[ad_admin_header "Sales Tax"] +set title "Sales Tax" +set context [list $title] -

Sales Tax

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] "Sales Tax"] - -
- -

Your Current Settings

- -

- -

    -" - # for audit table set table_names_and_id_column [list ec_sales_tax_by_state ec_sales_tax_by_state_audit usps_abbrev] - - +set sales_taxes_html "" +set taxes_counter 0 db_foreach get_sales_taxes "select state_name, tax_rate*100 as tax_rate_in_percent, decode(shipping_p,'t','Yes','No') as shipping_p from ec_sales_tax_by_state, us_states where ec_sales_tax_by_state.usps_abbrev = us_states.abbrev" { - + incr taxes_counter append page_html "
  • $state_name: -
    - Tax rate: $tax_rate_in_percent%
    - Charge tax on shipping? $shipping_p -
    - " -} if_no_rows { +
    • Tax rate: $tax_rate_in_percent%
    • +
    • Charge tax on shipping? $shipping_p
  • " - append page_html "No tax is currently charged in any state.\n" -} -append page_html " -
+} -

- -

Change Your Settings

- -

- -

- -Please select all the states in which you need to charge sales tax. You will be asked -later what the tax rates are and whether to charge tax on shipping in those states. - -

- -

-" - set current_state_list [db_list get_abbrevs "select usps_abbrev from ec_sales_tax_by_state"] db_release_unused_handles -append page_html "[ec_multiple_state_widget $current_state_list] +set state_widget_html "[ec_multiple_state_widget $current_state_list]" -
- -
+set audit_url_html "[ec_url_concat [ec_url] /admin]/audit-tables?[export_url_vars table_names_and_id_column]" -
-
- -

- -

Clear All Settings

- -
-If you want to start from scratch, clear all settings. -
- -In general, you must collect sales tax on orders shipped to states -where you have some kind of physical presence, e.g., a warehouse, a -sales office, or a retail store. - -Some sources of data on sales tax rates by zip codes are: -
    -
  • www.salestax.com - their Sales Tax Assistant - All States, Single User was \$1,650 as of 3/8/2004. -
  • www.simpova.com - approximately 99.95 for a national, by zip, tax table or online lookup. -
- -

- -We tried to keep this module simple by ignoring the ugly fact of local -taxing jurisdictions (e.g., that New York City collects tax on top of -what New York State collects). If you're a Fortune 500 company with -nexus in 50 states, you'll probably have to add in a fair amount of -complexity to collect tax more precisely or at least remit -sales tax more precisely. - -

Audit Trail

- - - -[ad_admin_footer] -" - -doc_return 200 text/html $page_html - -