Menu

Freeze marina haul-out and storage rates in TypeScript
📰

Freeze marina haul-out and storage rates in TypeScript

DEV Community: typescript·eth shihao·4 days ago
#GdY9Gwvg
#devtotypescript#devto#dev#deposit#rates
Long article (1247 words) — no AI summary yet.
Reading 0:00
15s threshold

A 30-foot boat rings up $845 for haul-out, prep, and four months of storage. Apply the $200 deposit and the balance is $645 . The marina later changes all three rates. Open the approved revision again and the same $645 is still due.

Price the work order at approval

Length overall (LOA) is the billable length for the haul-out in this example. The fixture takes whole billable feet and whole storage months as inputs. If a marina bills fractional lengths, establish the billable quantity under its pricing terms before approval.

Work-order line Calculation Amount

Haul-out 30 ft × $4 per foot $120

Prep One flat charge $125

Seasonal storage 4 months × $150 per month $600

Approved total $845

Applied deposit Receipt DEP-200 −$200

Balance $645

Use bigint cents for rates, charges, and deposits. At approval, copy the live rates and freeze the copied rates, calculated charges, and revision record. Those nested freezes matter because Object.freeze operates on one object at a time.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.