#### Topic: complex Shipping calculation

Our website works out shipping totals for orders, every item in our database has a cubic size and there is a size limit for using courier vs freight for an item. but we get orders with multipul items and i notice it's calling things freight when not needed.

the parcel limit is 0.15m3 per courier ticket, if bigger than that they have to go by freight instead. incidentally freight cost more on small consignments only becuase there is a minimum charge, if there wasn't, this would not be a problem at all.

im asking here because our programmer has a limited time before he leaves the country and this was not one of the urgent tasks we gave him, if we are to get it done at all then i need to help him in the right direction - but alas, i am not a programmer.

the problem: an order came in with 2 items, both 0.106 each to a local address - website calls it a total of 0.212 and makes it freight @ \$42 - we can ship 2 boxes on a courier, \$10 total

but needs to only use freight if any ONE item is bigger than the limit of 0.15 so, it would see that order as (0.106=\$5) and (0.106=\$5) = \$10

eg 1) suppose there was something more complex: 10 items in cart, 0.02 each. website would work it out as 0.2 and call it freight, but we could put it in 2 boxes and pay \$10

eg 2) 5 items in cart, 0.01 x 4 and 0.12 x 1. website would work it out as 0.16 and call it freight, but we could send 2 cartons - 0.04 and 0.12 costing \$10

can it do this: if any ONE item is bigger than 0.15 make it all freight, otherwise add up how many tickets needed supposing we packed into biggest boxes possible example 2:

(0.01+0.01+0.01+0.01)=0.04=\$5,
(0.12)=0.12=\$5
==\$10
tricky i know, but its just maths lol, and it matters most because a ridiculous shipping price might stop an order.