Business to Business Sales Tax Exemption (b2bnotax.mv)
Copyright © 2000, William Weiland
Overview
This module will prevent the sales tax from being applied if a business customer enters a tax exemption/blanket resale ID. After order payment is authorized, it will include the tax ID at the bottom of the Merchant notification email. This module also writes abbreviated order information plus the tax ID to a flat file for historical retrieval in the event that the Merchant's email is lost. That file is located in your store's data directory under the b2bnotax subdirectory, which is created when installed to the store.
Disclaimer
The authors, programmers or distributors of this module will not be held liable for uncollected tax or failure of this module to perform without failure. The store owner is solely responsible for verifying the credibility of a customer's claim for tax exemption. You agree to these terms prior to use of this module.
Initial Setup
Use the Merchant admin upload feature to upload the modules b2bnotax.mv, cim_b2b.mv, and cim_log.mv. As each are uploaded, click the Add button to add them to the mall/domain.

In admin, under your store, click on the link for the System Extension Configuration screen. Assign the CIM B2B System Extension Module and Update it to install it in your store. No additional admin edits are required.

In admin, under your store, click on the link for the Order Fulfillment Configuration screen. Assign the Business to Business Sales Tax Exemption module and Update it to install it in your store. No additional admin edits are required.

In admin, under your store, click on the link for the Logging Configuration screen. Assign the CIM Activity Log module and Update it to install it in your store. No additional admin edits are required.


Editing Requirements (skip if using the OpenUI)
If you are using the Miva Merchant User Interface (mmui) you will need to make some very simple edits to the core files. Be sure to do that with a text editor (NO WYSIWYG editors) such as Programmer's File Editor (PFE) so as not to damage the mv files. ALWAYS BACKUP your unmodified mv files in case you make a mistake.

1) In the mmui.mv file, MMUI_Order_ShippingPaymentSelection function, just above the table containing the Continue button (you can change the wording here), add the following
<MvDO FILE = "{g.Module_Root$'modules/fulfill/b2bnotax.mv'}" NAME = "l.showentry" VALUE = "{B2BNoTax_Input()}">

2) In the mmui.mv file, MMUI_Order_Payment function, just before the table that contains the Continue button add the following
<MvDO FILE = "{g.Module_Root$'modules/fulfill/b2bnotax.mv'}" NAME = "l.op2" VALUE = "{B2BNoTax_OP2()}">

3) If you want this ID # to appear in the Merchant versions prior to 4.10 email notification, add the following lines just before the </MvSMTP> tag in meremail.mv
<MvIF EXPR = "{g.taxexempt}">
<MvEVAL EXPR = "{ asciichar( 10 ) $ 'Tax ID........: ' $ g.taxexempt}">
</MvIF>

4) In you want this ID # to appear in the meremail.mv starting with Merchant 4.10, locate the line:
<MvDO FILE = "{ g.Module_Library_Utilities }" NAME = "l.ok" VALUE = "{ SendEmail( l.to,l.from,l.cc,l.subject,l.headers,l.message ) }">
Add the following immediately preceeding that line:
<MvIF EXPR = "{g.taxexempt}">
<MvASSIGN NAME = "l.message" VALUE = "{ l.message $ asciichar( 10 ) $ 'Tax ID........: ' $ g.taxexempt}">
</MvIF>