Last active
July 19, 2018 13:23
-
-
Save tosyu/3d0e8297778c21d391165f2c5371459f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function money(workdays, hnetto, zus, costs) { | |
workdays = workdays !== undefined ? workdays : 0; | |
hnetto = hnetto !== undefined ? hnetto : 0; | |
zus = zus !== undefined ? zus : 0; | |
costs = costs !== undefined ? costs : 0; | |
var mnetto = workdays * 8 * hnetto; | |
var costs_netto = costs/1.23; | |
var costs_vat = costs - costs_netto; | |
var vat = mnetto*0.23; | |
var brutto = mnetto+vat; | |
var tohand = mnetto - zus - ((mnetto-costs_netto)*0.19); | |
console.log('faktura brutto: ' + brutto + ', vat: ' + (vat - costs_vat) + ', earned: ' + tohand); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment