3 ms·
I was handed a chart from our shipping manager. It had columns for each state, and shipping prices based on quantity. This was a simple project to turn into a t
by bluedino 5y ago
I was handed a chart from our shipping manager. It had columns for each state, and shipping prices based on quantity. This was a simple project to turn into a table and then lookup the needed value. When the manager needed to update the prices, they could just update the table.
I noticed the 3rd column for quantity was "3 or more". I should have ran at that point. The next page of the spreadsheet added exceptions for certain item #'s, certain zip codes (each borough of NYC for example). It was still manageable but it was way past the two hour point.
Sadly, when this was originally put on the AS/400 it was 4,000 lines of IF statements since the original developer didn't put it in a database. It probably started out as a hack that said "for a quantity of 2, let's offer a discount on shipping", and then later someone said "If we're shipping to states on the west coast, use this price"...etc