增值税计算器-在线增值税计算器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了增值税计算器-在线增值税计算器相关的知识,希望对你有一定的参考价值。

<p>
<p><b>VAT rate:</b>

<p><b>Net price:</b>

<p><b>Gross price:</b>

<p><b>Tax amount:</b>

</p>
  1. function net_change() {
  2. var vat_rate = document.getElementById('vat_rate');
  3. var net_price = document.getElementById('net_price');
  4. var gross_price = document.getElementById('gross_price');
  5. var tax_amount = document.getElementById('tax_amount');
  6. gross_price.value = net_price.value *(1+(vat_rate.value/100));
  7. tax_amount.value = gross_price.value - net_price.value;
  8. }
  9.  
  10. function gross_change() {
  11. var vat_rate = document.getElementById('vat_rate');
  12. var net_price = document.getElementById('net_price');
  13. var gross_price = document.getElementById('gross_price');
  14. var tax_amount = document.getElementById('tax_amount');
  15. net_price.value = gross_price.value - (gross_price.value * (vat_rate.value/100));
  16. tax_amount.value = gross_price.value - net_price.value;
  17. }
  18.  
  19. function amount_change() {
  20. var vat_rate = document.getElementById('vat_rate');
  21. var net_price = document.getElementById('net_price');
  22. var gross_price = document.getElementById('gross_price');
  23. var tax_amount = document.getElementById('tax_amount');
  24. net_price.value = ((tax_amount.value / vat_rate.value)*100);
  25. gross_price.value = Number(net_price.value) + Number(tax_amount.value);;
  26. }
  27.  
  28.  
  29. function vat_change() {
  30. var vat_rate = document.getElementById('vat_rate');
  31. var net_price = document.getElementById('net_price');
  32. var gross_price = document.getElementById('gross_price');
  33. var tax_amount = document.getElementById('tax_amount');
  34. net_price.value = gross_price.value - (gross_price.value * (vat_rate.value/100));
  35. gross_price.value = net_price.value *(1+(vat_rate.value/100));
  36.  
  37. }
  38.  
  39.  
  40. // Добавляет слушателя событий для таблицы
  41. var vat_rate = document.getElementById('vat_rate');
  42. var net_price = document.getElementById('net_price');
  43. var gross_price = document.getElementById('gross_price');
  44. var tax_amount = document.getElementById('tax_amount');
  45.  
  46. vat_rate.addEventListener("input", vat_change, false);
  47. net_price.addEventListener("input", net_change, false);
  48. gross_price.addEventListener("input", gross_change, false);
  49. tax_amount.addEventListener("input", amount_change, false);

以上是关于增值税计算器-在线增值税计算器的主要内容,如果未能解决你的问题,请参考以下文章

怎么算每月应交的增值税?

动态计算总和和增值税

根据上述资料分别计算4月、5月、6月应纳增值税税额。

解析涉及计算的多条记录

增值税抵扣

双软认证-软件产品需要哪些资料呢?