v6.0.0: big revbank.products syntax change

Rationale in UPGRADING.md

It's a big change technically, but converting the format won't be hard
for admins.

There's a compatibility mode with loud warnings in case the file isn't
converted.
This commit is contained in:
Juerd Waalboer 2024-01-18 18:15:35 +01:00
parent 6aa33beedb
commit 55a83d9ceb
7 changed files with 249 additions and 117 deletions

View file

@ -1,83 +1,52 @@
### THIS IS THE EXAMPLE FILE; DON'T ADD PRODUCTS, BUT MAKE A NEW FILE ###
# Deze in principe niet veranderen want dat heeft invloed op producten
# die al eerder verkocht zijn. Omschrijving aanpassen kan geen kwaad.
+sb 0.15@+statiegeld Statiegeld blikje
+sf 0.15@+statiegeld Statiegeld plastic flesje
+sm 0.15@+statiegeld Statiegeld Mehrwegflasche
matekrat 1.50@+statiegeld Statiegeld matekrat excl. inhoud
# Documentation: perldoc plugins/products.pod
# or https://github.com/revspace/revbank/blob/master/plugins/products.pod
# Let op: als een product een statiegeld addon (bijv. +sb) heeft, dat niet
# meer veranderen, want dan kan het product niet meer worden ingeleverd.
# Not using statiegeld? Just leave off the +sb etc!
5000112658873 0.90 "Coca Cola Zero, can 33 cl" +sb
8712800196440 1.10 "Chocomel, can 25 cl" +sb
4337182201458 0.75 "Spuitwater, bottle 50 cl" +sf
4337182093381 0.75 "Plat water, bottle 50 cl" +sf
5000112646719 3.00 "Coca-Cola Zero, bottle 150 cl" +sF
4029764001883 1.15 "Club-Mate Cola, bottle 33 cl" +sm
4029764001401 1.40 "Club-Mate Granat, bottle 50 cl" +sm
4029764001869 1.40 "Club-Mate Winter-Edition, bottle 50cl" +sm
4029764001906 1.40 "Club-Mate Zero, bottle 50cl" +sm
4029764001807 1.40 "Club-Mate, bottle 50 cl" +sm
5000112545326 0.90 "Coca-Cola, can 33 cl (no deposit)"
5740700988349 0.90 "Coca-Cola, can 33 cl (no deposit)"
8710615077206 0.50 "Daelmans Stroopwafel" +THT
8716100202337 0.70 "Katja Apekoppen"
40084077 0.40 "Kinder Maxi"
4001724046196 5.50 "Oetker Ristorante Pizza Wuerstel & Patatine"
4009233016846 5.00 "Wagner Sensazione Pizza Mozzarella"
8710401024605 0.75 "Titan (Raket)"
8718964162758 1.50 "Crappy fietslampje is beter dan niks"
mdf3mm-wit 3.00 "MDF 600x400x3 wit gelakt "
mdf4mm 1.50 "MDF 600x400x4"
populier5mm 3.15 "Populier-timmerplaat 600x400x5"
hardboard3mm 0.65 "Hardboard 600x400x3"
# Aliases:
8710447032756,Perenijsje 0.80 "Ola Perenijsje"
8712100340666,Raket 0.55 "Raket"
8722700627821,Splitijsje 0.80 "Split"
# Empty lines and lines beginning with # are ignored.
# All other lines should have three fields, whitespace separated. The first two
# fields are barcode/productID and price, the third field is the description.
# Only the last field may have whitespace.
# Free stuff
649241869825 0.00 Free disgusting stuff (LS)
57063003 0.00 Free Stimorol
# Water
5400151013112 0.50 Carbonated mineral water
5400155056542 0.50 Mineral water
# Soda
5449000014535 0.70 Sprite
5449000000996 0.70 Coca-Cola
# Chips
05414359710322 0.50 Chips
05414359710315 0.50 Chips
zakjechips 0.50 Chips
clubmate,4029764001807 1.40 Club-Mate +sm
87124385 1.10 Chocomel
8710447032756 0.80 Festini peer
tostikaas 1.15 Tosti kaas
4001724035848 5.10 Pizza Veggie Mix
cola,5000112638745 0.90 Coca-Cola Zero, blik 33 cl +korting +sb
pizza 4.50 Pizza +sgo
+korting -50% Yay korting
dinges 0.00 Dingeskitje +aa +pcb +koppla +j +korting
aa 0.20@+sales/batt Batterij
pcb 0.80 pcb
koppla 5.00 Koppla
j 0.10@juerd Gratis geld voor juerd
#moo 2,151 bla
#meh 1.00 blaaat +mekker
bla -5
#aap 1.00 ding +noot
#noot 9.99 dinges deze niet
#+noot 2.00 dinges +mies
#mies 3.00 donges +aap
sgo 0.80@+stroomgebruik Stroomgebruik oven
nietsb -0.15@+statiegeld WHoaaa
korting -0.10@-korting Korting \o/
BOUNTY1 -10.00@-expenses/bounties Bedankt voor dingen!! +j
BOUNTY2 -5.00@-expenses/bounties Bedankt en zo
example_id 1.00 Example product +something
+something 1.00 Product that has an id that starts with plus
example,+alias 1.00 Product that has an alias that starts with plus
example_id1 1.00 Example product+something
example_id2 1.00 Example product + something
more_stuff 1.00 Example product with +something but not at the end
bbq 1.00 3+ pieces of meat
# Special "products"
BOUNTY1 -10.00@-expenses/bounties "Thanks for vacuuming!"
BOUNTY3 -25.00@-expenses/bounties "Thanks for mopping!"
+THT -50.00% "Discount (best-before date expired)"
ibutton 15.00@+ibuttonborg "Deposit for new iButton"
ibutton-terug -15.00@+ibuttonborg "Deposit returned for iButton"
contributie 30.00@+sales/contributie "Membership 1 month"
# For use with the statiegeld plugin:
# (Nothing but descriptions should be changed after using these addons.)
+sb 0.15@+statiegeld "Deposit can"
+sf 0.15@+statiegeld "Deposit bottle"
+sF 0.25@+statiegeld "Deposit large bottle"
+sm 0.15@+statiegeld "Deposit Mehrwegpfand"
#+se 0.25@+statiegeld "Statiegeld Einwegpfand"
+smk,matekrat 1.50@+statiegeld "Deposit crate w/o bottles"