N NoBullshit.wiki 中文

Beauty store owner - BA commission payroll calculator - base pay, tiered commission, card-open and card-renewal shares, attach bonus, and the brand-BA attribution switch all live in one config panel, month-end entry of the numbers produces payslips, every slip prints the full calculation breakdown so each BA can re-verify it with a calculator, any rule change auto-versions with a month-over-month diff, and paid months lock their rules so every historical slip recomputes under the rules that were actually in force - zero preset rates out of the box, no smart compensation advice

Works with:Claude / GPT-4 classCategories:Beauty StoreLevel:Advanced Updated

You are a coding agent building payroll tools for
an independent beauty store. Build a single-file
HTML tool (no backend, no external dependencies,
offline) for: configuring commission rules,
running month-end BA payroll, and producing
verifiable payslips.

The real problem: payroll rules live in the
owner's memory, Excel formulas get hand-tuned
monthly, and "why is this under last month" takes
an evening to answer. Rule changes leave no
trace, past months can't be recomputed, and
disputes settle by volume.

1. Config panel (every rule lives here, and
only here; check this panel before running
any month):
- Base pay, per person
- Tiered commission: thresholds and rates on
  personal monthly sales, count and rate fully
  custom (e.g. up to 30k at 2%, 30-50k at 3%,
  above 50k at 4%); two algorithms selectable,
  "whole amount at the landed tier" or
  "progressive by bracket" - the choice
  prints on the payslip
- Card-open and card-renewal shares: separate
  rates for new stored-value cards and
  renewals, and a choice of basis - card face
  value or actual money received
- Attach bonus: attach-rate threshold (attach
  transactions / closed transactions) plus a
  fixed bonus; threshold and amount custom
- Brand-BA attribution: a per-brand switch -
  sales closed by that brand's stationed BA
  count toward the brand BA, toward the
  store's own advisor, or split by ratio;
  ratios entered where split
- Deductions: custom categories (late
  arrivals / upheld complaints), each entry
  carrying an itemized note and amount; a
  bare "other deductions" line is not
  allowed

2. Month-end entry:
- Per person, per item: personal sales, cards
  opened and their amounts, renewals and
  amounts, closed and attach transaction
  counts, deduction details
- Brand-BA attribution happens automatically
  per config; entry records only the fact
  (who closed the sale), never the split
  result

3. Payslip output (the core):
- One per person: total + per-item breakdown
  + each item's arithmetic printed verbatim,
  e.g. "personal sales 38,000 -> tier 2
  at 3% -> 1,140" and "attach 18/12 = 1.5
  >= threshold 1.3 -> bonus 200"
- The slip carries this month's rule-version
  number and the line "to verify, recompute
  from the printed steps" - a BA with a
  calculator can walk every line. This is a
  hard requirement
- Printable per person, or one page for the
  whole store

4. Rule versioning (the second core):
- Any edit to any config field generates a
  new version number
- Auto month-over-month diff: which fields
  changed, old value -> new value, listed
- Each payroll run marks the month "paid" and
  binds it to the rules then in force;
  later rule changes never reprice a paid
  month, and historical slips recompute
  under their own era's rules forever
- Unpaid months recompute freely; recomputing
  a paid month requires an explicit
  confirmation and leaves a record

5. Boundaries:
- Offline single file, local data, exportable
- Ships with zero preset rates, tiers, or
  thresholds; empty config shows setup
  guidance only
- No "smart compensation advice" or "scheme
  optimization" - the rules are the owner's
  decision; the tool guarantees they compute
  cleanly and explain themselves
- Interface in Chinese, plain and restrained

Delivery order: a one-sentence structure note,
then the complete single-file code, then usage
advice: the month-end flow (lock the rules ->
enter numbers -> generate -> spot-recheck two
people with a calculator -> mark paid), and
when to change rules (after payday, for next
month - never inside the month being paid).

Why it is written this way

Printing the full arithmetic on the payslip is the tool's first hard requirement, and its purpose is not transparency theater - it is the elimination of one specific scene: the payroll dispute. Nine disputes in ten are not distrust, they're illegibility - "two hundred under" with only a total on the slip means the doubt can only dissolve through the owner's explanations; printed arithmetic lets it dissolve on paper. One level deeper, the requirement forces the config panel to make every algorithm an explicit choice (whole-amount versus progressive, face value versus money received) - choices that in the Excel era lived inside formula cells and memory, and that are the actual factory of monthly friction.

Versioning with paid-month locking is the second core, aimed at "cold cases." Commission schemes will evolve - the attach threshold moves 1.3 to 1.4, a returning brand renegotiates its attribution rule - and the evolution itself is fine. The failure is that nobody remembers the old values, so a slip from three months ago can never reconcile. Binding each paid month to its rules makes every historical slip recompute forever, turning "how was last month calculated" from an archaeology project into a lookup. The diff carries a fairness payload too: changes are announced - a threshold quietly moved is the single fastest way to burn down trust in a commission system, and the tool closes the "quietly" route.

The brand-BA attribution switch exists because beauty stores carry a trap generic payroll software doesn't: a manufacturer's stationed BA selling on your floor raises the question of whose numbers those sales count toward, and the answer differs per brand agreement - sometimes oppositely within one store. Entry records only the fact (who closed it), and config owns the split - separating fact from rule means when the brand renegotiates, you change the rule without rewriting history.

Zero preset rates and no compensation advice, same rationale as every calculator here: a plausible "industry-common 2%" gets used as-is, and commission terms sit on every store's specific margin and staffing structure - a wrong default is worse than none. And once a tool opines on "optimal commission design," the output gets executed as authority. Pay is an agreement between two people; the tool's job is to compute and record that agreement cleanly, and stepping past that line is assuming liability for someone else's deal.

Variables

Variable Description
Tier algorithm Whole-amount-at-landed-tier versus progressive-by-bracket - the two disagree meaningfully on identical tiers; pick one explicitly and print it on slips. Switching mid-stream counts as a rule change and versions accordingly
Card-share basis Card face value versus money actually received (does the bonus money count) - stored-value cards commonly run "load 1000, get 200 free," and the basis decides the share outright; money-received is the stabler basis, but write it into the rules rather than leaving it verbal
Brand-BA attribution rules Per brand, per the manufacturer agreement (to the brand BA / to the store advisor / split by ratio) - where the agreement is silent, run the default "whoever closed it owns it" and get the written confirmation from the brand soon

commission calculationverifiable payslipsrule versioning