KLEUR_POOLS).| Pleat | Factor |
|---|---|
| Wave default | 2.00 |
| Double return | 2.50 |
| Single return | 2.10 |
| Double | 2.35 |
| Single | 1.80 |
Order in dropdown: Wave → Double return → Single return → Double → Single.
No effect on effective width: all three cover the full rail. Does affect the side-hem surcharge (§5) and the return margin (§4).
For Single return or Double return the finished width is artificially adjusted — for both Pair and 1 part left/right:
finishedWidth ≥ 300 cm → returnMargin = 10% × finishedWidth finishedWidth < 300 cm → returnMargin = 30 cm effectiveWidth = finishedWidth + returnMargin
Reason — with a return / zigzag pleat the fabric protrudes towards the back; without slack the pleats are pulled flat when closing, causing gaps at the sides or in the middle (with a Pair).
Measuring tip: the rail must sit at least 7–10 cm off the wall to prevent the pleats from rubbing against it.
Drop-width fabric receives no side-hem surcharge in width (per drop the side hem fits within the roll width).
requiredFabricWidth (floor-to-ceiling) = effectiveWidth × pleat + numberOfParts × 24 requiredFabricWidth (drop-width fabric) = effectiveWidth × pleat
rawCutHeight = finishedHeight + headingTape + bottomHem
Choice: 8 / 10 / 12 / 15 cm. Default 10 cm.
| Condition | Bottom hem |
|---|---|
| Lock = Yes | 0 cm (overlocked) |
| Weight cord = Yes | 2 cm |
| otherwise | 15 cm (steamed bottom hem) |
The header (Dutch: hoofdje) is the narrow strip of fabric above the pleat tape. It is a configurator choice in Step 6 — Pleat & split that documents the workshop finish. Does not affect the cut height — it does not appear in rawCutHeight or in the cut-loss calculation.
| Pleat choice | Allowed header values |
|---|---|
| Wave | 0 (locked, field disabled) |
| Single return | 0 (locked, field disabled) |
| Double return | 0 (locked, field disabled) |
| Single | 0 or 2.5 mm |
| Double | 0 or 2.5 mm |
The UI disables the field automatically as soon as the pleat is set to a return- or Wave-choice. After choosing 2.5 mm, the value resets to 0 if the pleat is later switched to Wave or a return-pleat.
patroonhoogte is an article attribute that documents the vertical pattern repeat in cm, but does not enter rawCutHeight. The configurator does not round cut height up to a whole repeat — the workshop handles repeat alignment at processing time and orders extra fabric if needed.
Patterned fabric is never rotated: rotatable is forced to No (rotation would turn the pattern 90°). This rule depends on the Pattern = Patterned field, not on the value of patroonhoogte. In feasibility and compute() the rotatable fallback is therefore disabled for patterned articles, regardless of the repeat value.
Fabric rolls vertically: roll height = hoogte_stof (max ~300 cm); the roll-length direction (originally "breedte_stof") is unrestricted → stored as 10000 cm.
Fits when rawCutHeight ≤ hoogte_stof.
numberOfDrops = 1 totalMetres = requiredFabricWidth ÷ 100
When rawCutHeight > hoogte_stof with rotatable plain fabric, the fabric is turned 90°; the original height becomes the drop width.
cordLoss = (weightCord = Yes) ? 2 cm : 0 dropWidthEff = hoogte_stof − cordLoss numberOfDrops = ⌈requiredFabricWidth ÷ dropWidthEff⌉ totalMetres = numberOfDrops × rawCutHeight ÷ 100
Weight cord with rotation: the cord is cut away (−2 cm in drop width).
rawCutHeight > hoogte_stof and (rotatable = No or pattern = Patterned) → the article is marked "Not possible".
Fabric rolls horizontally: roll width = breedte_stof (typically 140 cm), length (originally "hoogte_stof") is unrestricted → stored as 10000 cm.
numberOfDrops = ⌈requiredFabricWidth ÷ breedte_stof⌉ lengthPerDrop = rawCutHeight totalCm = numberOfDrops × lengthPerDrop totalMetres_m = totalCm ÷ 100
No height limit, no rotation.
Options: No lining / Semi-transparent / Blackout. Lining price and colour appear only when lining ≠ No lining.
liningPrice/m¹ = (voering_prijs_per_m1 > 0)
? voering_prijs_per_m1
: prijs_per_m1 × 0.60 (60% fallback)
liningCost = totalMetres × liningPrice/m¹
Lining colours (5 fictitious): White, Beige, Taupe, Grey, Anthracite.
Fabric price is based on sales price incl. VAT, not on cost:
fabricPrice = totalMetres × salesPrice/m¹ totalPrice = fabricPrice (+ liningCost where applicable)
verkoopprijs_per_m1 field) — entered by Victor in production. This field always takes precedence.verkoopprijs_per_m1 is empty or 0:
salesPrice/m¹ = cost × 3, rounded up to xx.95Auto example: cost € 12.34 → sales € 37.95.
Implementation: verkoopPrijs95(inkoop) + getVerkoopPrijs(article) in db.js. The breakdown explicitly states whether the price is manual or auto.
Lining still calculates on a cost basis (custom price or 60% fallback of cost).
On every load, via seedAfmetingenPlaceholders():
| Type | Field | Value |
|---|---|---|
| Floor-to-ceiling (Yes) | breedte_stof | 10000 (= unlimited roll length) |
| Drop-width fabric (No) | hoogte_stof | 10000 (= unlimited roll length) |
In the aside (Article specifications) we display "Not relevant" instead of the number for the unlimited direction.
if effectiveWidth > 600 cm → warning: "split the curtain into 1 part left + 1 part right"
Fixed, read-only display per chosen article:
Cost price is not visible (only sales price incl. VAT). Selects in the aside no longer show a dropdown arrow (pure value display).
3 active filters:
klaarhoogte + vliesband + onderzoom ≤ hoogte_stof.| File | Role |
|---|---|
index.html | Configurator (steps 1–9, calculation, article aside). |
import.html | CSV/Excel import + saved-articles overview. |
db.js | Read layer on the article source (build-time data/artikelen.json) + localStorage cache, colour pools, seed migrations, esc(), verkoopPrijs95(). |
gordijn_configurator.deluge | Zoho Creator script — mirrored on index.html logic. |
start.sh | Local server (Python http.server or Node fallback). |
berekeningsregels.html | This page — summary of all rules. |
Saved-articles table (import.html) shows per article: Article no., Type, Description, Fabric H, Fabric W (= 10000 for floor-to-ceiling), Pattern, Pattern height (= 0 for Plain), Cost/m¹, Sales/m¹ incl. VAT, Shrink%, FtC, Light, Lining, Lining price, Rotatable, D.face, FR, Acoust., W.cord, Composition, Colours.
index.html is authoritative for the business logic. With every change in:
→ also update gordijn_configurator.deluge in the same commit.
The configurator is connected to Zoho CRM (module: Products). The table below maps our internal field keys to the Zoho API names and the Zoho field type that must be created in CRM. The master overview lives in db.js (ARTIKEL_FIELDS) and is automatically shown in import.html next to every field explanation.
| Internal key | Label | Zoho API (Products) | Zoho field type |
|---|---|---|---|
artikelnummer | Article number | Product_Code | Single Line |
gordijn_type | Curtain type | Gordijn_Type | Picklist |
omschrijving | Description | Product_Name | Single Line |
hoogte_stof | Fabric height (cm) | Hoogte_Stof | Number |
breedte_stof | Fabric width (cm) | Breedte_Stof | Number |
patroon | Pattern | Patroon | Picklist |
patroonhoogte | Pattern height (cm) | Patroonhoogte | Decimal |
patroonbreedte | Pattern width (cm) | Patroonbreedte | Decimal |
prijs_per_m1 | Cost price (€) + Unit | Inkoopprijs | Currency |
verkoopprijs_per_m1 | Sales price incl. VAT (€) + Unit | Verkoopprijs | Currency |
krimpercentage | Shrinkage percentage (%) | Krimpercentage | Percent |
kamerhoog | Floor-to-ceiling | Kamerhoog | Checkbox |
lichtdoorlatenheid | Light transmission | Lichtdoorlatenheid | Picklist |
voeren | Lining (default) | Voering_Default | Picklist |
voering_prijs_per_m1 | Lining price per m¹ | Voering_Prijs_M1 | Currency |
kantelbaar | Rotatable | Kantelbaar | Checkbox |
doubleface | Doubleface | Doubleface | Checkbox |
brandvertragend | Flame-retardant | Brandvertragend | Checkbox |
akoestiek | Acoustics class | Akoestiek | Picklist |
verzwaaringskoord | Weight cord (legacy) | Verzwaaringskoord | Checkbox |
geschikt_voor_verzwaringskoord | Suitable with weight cord | Geschikt_Met_Verzwaringskoord | Checkbox |
eenheid | Unit (default m¹) | Eenheid | Picklist |
samenstelling | Composition | Samenstelling | Single Line |
geschikte_plooi | Suitable pleat | Geschikte_Plooi | Multi-Select Picklist |
geschikt_vouwgordijn | Suitable as Roman blind | Geschikt_Vouwgordijn | Picklist |
kleuren | Colours | local-only | — |
Geschikte_Plooi and Geschikt_Vouwgordijn are local-only (localStorage only); they have no column in the central articles source.
The Zoho Creator script gordijn_configurator.deluge expects the same API names on the input form (input.Inkoopprijs, input.Verkoopprijs, input.Hoogte_Stof, …). Configuration choices (KlaarBreedte, KlaarHoogte, Plooi, Stuk, Voering, Verzwaringskoord, Band) are form fields, not Products fields.
Two article fields determine which processing options are allowed for a fabric; they are not used in the metres or price calculation, but they do drive UI warnings.
geschikte_plooi — Multi-Select Picklist with the values from the Pleat dropdown: Wave, Double return, Single return, Double, Single."Wave, Single, Double").geschikt_vouwgordijn — Picklist with values Yes, No, Yes (unlined).The pleat dropdown order matches PLOOI_OPTIES in db.js; this is shared by index.html and the seed helpers. Keep in sync with gordijn_configurator.deluge (constants plooi_*).