You are here

function _invoice_vat_percent_to_decimal in Invoice 7

Same name and namespace in other branches
  1. 6 invoice_helpers.inc \_invoice_vat_percent_to_decimal()

Converts a VAT value in percent to decimal

For examle: A vat value of 20,5 will be converted into 1.205

Parameters

mixed $vat:

5 calls to _invoice_vat_percent_to_decimal()
invoice_edit_item in ./invoice_ajax.inc
Edit an invoice item
invoice_load in ./invoice.module
Implements hook_load()
invoice_save_item in ./invoice_ajax.inc
Add an invoice item
_invoice_get_invoice_items in ./invoice_form.inc
Form helper function to get all invoice items
_invoice_get_invoice_totals in ./invoice_helpers.inc
Helper function to calculate invoice totals

File

./invoice_helpers.inc, line 229
Invoice module

Code

function _invoice_vat_percent_to_decimal($percent_vat) {
  $decimal_vat = 1 + $percent_vat / 100;
  return $decimal_vat;
}