Skip to content

Instantly share code, notes, and snippets.

@jedrichards
Last active December 18, 2015 05:39
Show Gist options
  • Save jedrichards/5734577 to your computer and use it in GitHub Desktop.
Save jedrichards/5734577 to your computer and use it in GitHub Desktop.
Camping expense computation
Creating members
----------------
Jed
Natty
Jamie
Owen
Laura
Nicci
Oli
Aysha
Luke
Natalie
Paul
Setting exemptions
------------------
Jamie is exempt from booze
Laura is exempt from booze
Aysha is exempt from booze
Laura is exempt from ale
Aysha is exempt from ale
Nicci is exempt from ale
Natalie is exempt from ale
Jamie is exempt from bbq-meat
Jed is exempt from early-travellers
Nicci is exempt from early-travellers
Oli is exempt from early-travellers
Aysha is exempt from early-travellers
Luke is exempt from early-travellers
Laura is exempt from early-travellers
Jamie is exempt from early-travellers
Aysha is exempt from games-equipment
Laura is exempt from games-equipment
Creating expenses
-----------------
Cans of lager £8
BBQ meat £32
BBQ veg £12
Misc booze £23
Beer £7.5
Potato salad £7.5
Ale £80
Picnic food £9
Picnic food £22
Rounders Bat "Jed's Wrath" and balls £20
Picnic food £14
Fruit and bakery products £36
Natalie, Paul, Nat and Owen's taxi £20
Natalie, Paul, Nat and Owen's train tickets £50
Expense detail
--------------
Cans of lager
Owner Owen
Category booze
Amount £8
Participants 8
Cost per participant £1.00
BBQ meat
Owner Owen
Category bbq-meat
Amount £32
Participants 10
Cost per participant £3.20
BBQ veg
Owner Owen
Category food
Amount £12
Participants 11
Cost per participant £1.09
Misc booze
Owner Laura
Category booze
Amount £23
Participants 8
Cost per participant £2.88
Beer
Owner Natty
Category booze
Amount £7.5
Participants 8
Cost per participant £0.94
Potato salad
Owner Natty
Category food
Amount £7.5
Participants 11
Cost per participant £0.68
Ale
Owner Luke
Category ale
Amount £80
Participants 7
Cost per participant £11.43
Picnic food
Owner Nicci
Category food
Amount £9
Participants 11
Cost per participant £0.82
Picnic food
Owner Jed
Category food
Amount £22
Participants 11
Cost per participant £2.00
Rounders Bat "Jed's Wrath" and balls
Owner Jed
Category games-equipment
Amount £20
Participants 9
Cost per participant £2.22
Picnic food
Owner Jamie
Category food
Amount £14
Participants 11
Cost per participant £1.27
Fruit and bakery products
Owner Natalie
Category food
Amount £36
Participants 11
Cost per participant £3.27
Natalie, Paul, Nat and Owen's taxi
Owner Natalie
Category early-travellers
Amount £20
Participants 4
Cost per participant £5.00
Natalie, Paul, Nat and Owen's train tickets
Owner Natty
Category early-travellers
Amount £50
Participants 4
Cost per participant £12.50
Member detail
-------------
Jed
Expenditure £42
Liability £30.80
Owes £-11.20
Natty
Expenditure £65
Liability £48.30
Owes £-16.70
Jamie
Expenditure £14
Liability £22.79
Owes £8.79
Owen
Expenditure £52
Liability £48.30
Owes £-3.70
Laura
Expenditure £23
Liability £12.34
Owes £-10.66
Nicci
Expenditure £9
Liability £19.37
Owes £10.37
Oli
Expenditure £0
Liability £30.80
Owes £30.80
Aysha
Expenditure £0
Liability £12.34
Owes £12.34
Luke
Expenditure £80
Liability £30.80
Owes £-49.20
Natalie
Expenditure £56
Liability £36.87
Owes £-19.13
Paul
Expenditure £0
Liability £48.30
Owes £48.30
Stats
-----
Num expenses 14
Avg expense value £24.36
Total spent £341
Payments
--------
Oli pays Jed £11
Nicci pays Laura £10
Paul pays Luke £48
Oli pays Natalie £19
Aysha pays Natty £12
Jamie pays Natty £4
Jamie pays Owen £4
Remainders
----------
Jed £0
Natty £0
Jamie £0.7228354978354989
Owen £0
Laura £-0.2925505050505013
Nicci £0
Oli £0.4704004329004263
Aysha £0
Luke £-0.900685425685424
Natalie £0
Paul £0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment