OSCommerce Product Manager

OSCommerce Product Manager for Windows
Tasklist

FS#266 - Net price (taxed) miscalculated if no tax class selected.

Attached to Project: OSCommerce Product Manager
Opened by Mario A. Valdez-Ramirez (mvaldez) - Thursday, 08 September 2005, 05:38 GMT-6
Last edited by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:30 GMT-6
Task Type Bug Report
Category Backend / Core
Status Closed
Assigned To Mario A. Valdez-Ramirez (mvaldez)
Operating System All
Severity Low
Priority Immediate
Reported Version any
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In the Product editing window, when adding a new product, if the tax class has not been selected the net price (price with taxes) is miscalculated.
This task depends upon

Closed by  Mario A. Valdez-Ramirez (mvaldez)
Sunday, 11 September 2005, 00:30 GMT-6
Reason for closing:  
Comment by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:14 GMT-6

Reviewed:

This only happens if there are no tax classes or tax rates defined. To duplicate this bug, delete all tax rates/classes and then try to create a product. The problem seems to be that the tax rates list is filled with random data.

Pending to check if the problem is in the tax-list loading routines or somewhere else.
Comment by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:16 GMT-6

The problem seems to be in the FNopm_GetTax function, as the default returned record has all fields empty excepting the the SumRate field. Fixing it.
Comment by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:19 GMT-6

We have had this kind of error before. The requesting routine does not check for the ID field of any requested record (product, currency, manufacturer, etc) and use it. The ID field is always set to 0 or -1 if there are not any matching record.

One partial solution is to always set all fields to their empty value (zero, empty string, etc). But anyway, the requesting routine has to check always for the ID value.

Pending to audit all similar procedures.
Comment by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:29 GMT-6

FNopm_GetCategory passed.
FNopm_GetManufacturer passed.
FNopm_GetDescriptionByID did not pass, fixed.
PRopm_GetCategory_Data passed.
FNopm_GetCurrency did not pass, fixed.
FNopm_GetProductByID did not pass, fixed.
Comment by Mario A. Valdez-Ramirez (mvaldez) - Sunday, 11 September 2005, 00:30 GMT-6

Fixed. Closed.

Loading...