SHARE
TWEET

Untitled

a guest May 19th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function TaxCalculator(Flag, TaxesSalaryA, TaxesSalaryB, TaxesSalaryC, TaxesSalaryD, TaxesSalaryE, TaxesSalaryF, TaxesTaxLevelA, TaxesTaxLevelB, TaxesTaxLevelC, TaxesTaxLevelD, TaxesTaxLevelE, TaxesTaxLevelF, TaxesTaxLevelG, TaxesZicui) {
  2.  
  3.  
  4.     var ZicuiTxtInput = $("input#ZicuiTxt");
  5.     var SalaryLeftInput = $("input#SalaryTxt");
  6.  
  7.  
  8.     var ZicuiTxt = ZicuiTxtInput[Flag].value * TaxesZicui;
  9.     var Tax = 0;
  10.     var SalaryLeft = SalaryLeftInput[Flag].value;
  11.  
  12.     //    var ZicuiTxt = $("input#ZicuiTxt").val() * TaxesZicui;
  13.     //    var Tax = 0;
  14.     //    var SalaryLeft = $("input#SalaryTxt").val();
  15.  
  16.  
  17.     if (ZicuiTxt != '' & SalaryLeft != '') {
  18.         //inbal
  19.          if (parseInt(SalaryLeft) > parseInt(TaxesSalaryF)) {
  20.             Tax += (SalaryLeft - TaxesSalaryF) * TaxesTaxLevelG;
  21.             SalaryLeft = TaxesSalaryF;
  22.         }
  23.         //inbal
  24.         if (parseInt(SalaryLeft) > parseInt(TaxesSalaryE)) {
  25.             Tax += (SalaryLeft - TaxesSalaryE) * TaxesTaxLevelF;
  26.             SalaryLeft = TaxesSalaryE;
  27.         }
  28.         if (parseInt(SalaryLeft) > parseInt(TaxesSalaryD)) {
  29.             Tax += (SalaryLeft - TaxesSalaryD) * TaxesTaxLevelE;
  30.             SalaryLeft = TaxesSalaryD;
  31.  
  32.         }
  33.         if (parseInt(SalaryLeft) > parseInt(TaxesSalaryC)) {
  34.             Tax += (SalaryLeft - TaxesSalaryC) * TaxesTaxLevelD;
  35.             SalaryLeft = TaxesSalaryC;
  36.  
  37.         }
  38.         if (parseInt(SalaryLeft) > parseInt(TaxesSalaryB)) {
  39.             Tax += (SalaryLeft - TaxesSalaryB) * TaxesTaxLevelC;
  40.             SalaryLeft = TaxesSalaryB;
  41.  
  42.         }
  43.         if (parseInt(SalaryLeft) > parseInt(TaxesSalaryA)) {
  44.             Tax += (SalaryLeft - TaxesSalaryA) * TaxesTaxLevelB;
  45.             SalaryLeft = TaxesSalaryA;
  46.  
  47.         }
  48.  
  49.         if (parseInt(SalaryLeft) > 0) {
  50.             Tax += SalaryLeft * TaxesTaxLevelA;
  51.         }
  52.  
  53.  
  54.         var payment = (Tax - ZicuiTxt < 0) ? 0 : roundit(Tax - ZicuiTxt);
  55.  
  56.  
  57.         $("input#CalcZicuiTxt").val(payment);
  58.     }
  59.     else {
  60.         alert("ื—ืกืจื™ื ืคืจื˜ื™ื ืœื‘ื™ืฆื•ืข ื”ื—ื™ืฉื•ื‘");
  61.     }
  62.  
  63. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top