N NoBullshit.wiki 中文

Plantation purchasing: annual farm-input demand & delivery scheduling calculator - single-file offline web page; block area x per-acre rate converts to package counts (round up, show the overage instead of hiding it), totals the annual budget and backs out batch delivery dates; missing parameters turn red and stay uncounted; no built-in standard application rates for any crop

Works with:Claude / GPT-4 classCategories:PlantationLevel:Advanced Updated

Build me a directly usable single-file web tool
(HTML with inline CSS/JS, opens on double-click,
runs offline, no installs, no accounts, no network
requests) for annual farm-input demand calculation
and delivery scheduling on a plantation.

Four input sections:

1 Blocks
- Fields: block ID / crop / acres
- Whole-table paste import (tab-separated); rows
  that fail to parse turn red and show the raw
  text - never silently drop a row

2 Rates table (core rule: only numbers I enter)
- Fields: input name / crop it applies to / rate
  per acre / package size (e.g. 50-kg bag, 5-kg
  bag) / price per package
- Any input with no rate entered: the row turns
  red marked "missing rate" and counts toward no
  total - the tool must contain no "typical
  application rate" for any crop, and must not
  extrapolate rates across crops

3 Application plan
- Fields: input name / planned application date /
  block / mergeable with other deliveries (yes/no)
- Multiple applications of the same input get
  one row each

4 Delivery parameters
- Purchase lead time per input (I fill it)
- Supplier minimum order quantity (if any)

Computation and output:

1 Demand table, one row per input:
- Total demand = sum over matching blocks of
  (acres x per-acre rate)
- Packages to order = demand / package size,
  rounded up
- The rounding overage gets its own column
  ("extra 7 kg") - displayed only; no automatic
  safety factor, no rounding up to another full
  package
- Rows below minimum order quantity turn yellow
  with the shortfall shown
2 Delivery schedule: "application date - lead
  time" backs out the latest order date and
  delivery date; mergeable applications of the
  same input merge into one batch; output as a
  month-by-month batch list
3 Budget totals: annual packages x price, by
  input and by month
4 Every "missing rate" or "missing lead time"
  row listed together at the top; missing
  parameters never enter totals

Hard requirements:
- No built-in rate reference tables, crop
  libraries, or nutrient databases anywhere in
  the tool - it is a calculator, not a knowledge
  base; judgment stays with the user
- Data lives in browser local storage; CSV
  export covers all four tables plus all three
  results, with import and export fields
  matching
- Every number traceable to a formula: each
  results table shows its formula in one line
  below it
- UI text in English; a print view fitting the
  demand table plus the delivery schedule on
  one A4 page

Why it is written this way

The ban on built-in "standard rates" is what separates this tool from the crop-app crowd. Preset "recommended rates per acre" look helpful, but they quietly decide the single most consequential number - rates legitimately vary several-fold across regions, soils, and yield targets. This tool does arithmetic only: the agronomist supplies rates, the buyer supplies prices and dates, and the tool guarantees the arithmetic is right and checkable. The judgment belongs to whoever's job it is.

"Show the rounding overage, no automatic safety factor" targets the standard path from purchase order to muddle: many tools carry a "default +10%" toggle that users never know about. Displaying the rounded-up kilograms ("extra 7 kg") turns the surplus into an explicit decision - visible waste can be decided on; invisible uplift just recurs every year.

Delivery scheduling backs out from application dates rather than smoothing monthly, because working capital and storeroom capacity are real constraints: base dressing in March, top dressing in June - merge them into one order and the money leaves at once, the store fills up, and the rainy season does the damage. A batch-by-batch calendar aligns buying rhythm with fieldwork rhythm - which is exactly why "order as needed in batches" so often beats "one big discounted order". The tool lays out quantities and timing for both; the buyer chooses.

Rows that fail to parse turn red rather than vanish, the universal floor for tabular tools: paste a block list, one malformed row gets swallowed, and annual demand quietly misses a whole block - while the user stares at a clean-looking table none the wiser. Data errors must exist visibly; offline tools get no exception.

Variables

Variable Notes
Per-acre rate table Rates the agronomist sets for your own blocks - the core input; without it rows go red and uncounted, which is a feature, not a gap
Purchase lead time Days from order to in-store, per input class - filled from your actual suppliers' habits; the whole backwards calendar hangs on it
Supplier minimums Fill where minimum orders apply - batches below minimum show yellow with the shortfall, the basis for merge decisions

demand planningpurchase planningsingle-file tool