Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Calculation rules concerning the order specification data are described below. Variables beginning with "pmt" represent field data sent to the new payment interface. Variables beginning with "Calc" are calculated values used to check the validity of interface field data.

Live Search
placeholdersearch

Table of Contents

Gross and net prices have the following relationship:

Code Block
languagejava
pmt_row_price_gross = round ( pmt_row_price_net * ( 1 + 0.01 * pmt_row_vat ) )

IF net price was supplied (pmt_row_price_net):

Row sum after reducing the discount, without VAT:

Code Block
CalcRowAmountExVAT = round (
                         round ( pmt_row_quantity * pmt_row_price_net ) *
                          ( 1 - 0.01 * pmt_row_discountpercentage )
                     )

IF gross price was supplied (pmt_row_price_gross):

Row sum after reducing the discount, without VAT:

Code Block
CalcRowUnitNetPrice = round (
                          pmt_row_price_gross / ( 1 + 0.01 * pmt_row_vat )
                      )
CalcRowAmountExVAT = round (
                         round ( pmt_row_quantity * CalcRowUnitNetPrice ) *
                          ( 1 - 0.01 * pmt_row_discountpercentage )
                     )

Row sum of VAT (VAT is calculated based on the reduced net price):

Code Block
CalcRowVAT = round (CalcRowAmountExVAT * ( 0.01 * pmt_row_vat ))

Row total amount (payable in effect on the gross amount):

Code Block
CalcTotalRowAmount = round ( CalcRowAmountExVAT + CalcRowVAT )

The gross price of the whole order:

Code Block
== pmt_amount + pmt_sellercosts
== sum ( CalcTotalRowAmount )

pmt_amount

Code Block
== total sum of CalcTotalRowAmount for product and service rows (types 1, 4, 5 and 6)

pmt_sellercosts

Code Block
languagejava
== total sum of postal and handling cost rows (types 2 and 3)

In the interfaces all the money amounts and percentages must be presented with two decimals using comma as the decimal delimiter.