Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var aliquote_irpef = [
- { soglia : 0, percentuale : 23 },
- { soglia : 15000, percentuale : 27 },
- { soglia : 28000, percentuale : 38 },
- { soglia : 55000, percentuale : 41 },
- { soglia : 75000, percentuale : 43 }
- ];
- function progressiva(lordo, aliquote) {
- var tmp = 0;
- for(var i = aliquote.length - 1; i >= 0; i--) {
- if(lordo > aliquote[i].soglia) {
- tmp += (lordo - aliquote[i].soglia) * aliquote[i].percentuale / 100;
- lordo = aliquote[i].soglia;
- }
- }
- return tmp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement