This article explains the calculation of prices in pixi based on two samples. For more information regarding implementation and usage of net prices in pixi, check this article.
Explanation of used terms:
Gross Price: the selling price of the item incl. VAT
Final Gross price: selling price of the item incl. VAT and discount
Net Price: the selling price of the item without VAT
Final Net Price: selling price of the item incl. discount, but without VAT
Gross Orderline: gross total of an orderline incl. discount, which means ordered quantity x final gross price of an item
Net Orderline: net total of an orderline incl. discount, which means ordered quantity x final net price of an item
Gross Orderlines Total: sum of all orderlines of the order incl. VAT and discount
Gross Order Total: sum of the order incl. VAT, discount, voucher and shipping costs
Net Orderlines Total: sum of all orderlines of the order incl. discount, but without discount
Net Order Total: sum of the order incl. discount, voucher and shipping costs, but without VAT
Example 1
A B2C order with 2 items is imported to pixi, the net prices for each item are calculated to 4 decimals to prevent rounding issues:
Item Name |
Quantity |
Gross Price |
VAT % |
Net Price |
Item A |
200 |
0,49 € |
19 |
0,4118 € |
Item B |
33 |
1,99 € |
7 |
1,8598 € |
Since there is no discount, the gross price equals the final gross price and the net price equals the final net price. The order line totals are now calculated as follows:
Gross Orderlines Total: Final Gross Price * Quantity
Net Orderlines Total: Final Net Price * Quantity
VAT Amount included in orderline is the difference between the net and gross order line total
This results in the following values in our example:
Item Name |
Net Orderlines Total |
Gross Orderlines Total |
VAT Amount |
Item A |
0,4118 € * 200 = 82,36 € |
0,49 € * 200 = 98,00 € |
98,00 € - 82,36 € = 15,64 € |
Item B |
1,8598 € * 33 = 61,3734 € |
1,99 € * 33 = 65,67 € |
65,67 € - 61,3734 € = 4,2966 € |
These values are now summed up and (if necessary) rounded to 2 decimal places for the order lines total in the order header. Since there are no shipping costs and voucher in the example, gross orderline total equals gross order total and net orderline total equals net order total.
Sums for the order are calculated as follows:
Gross Orderlines Total = SUM (Gross orderline) = Gross Orderline item A + Gross Orderline item B
Net Orderlines Total = SUM (Net Orderline) = Net Orderline item A + Net Orderline item B
VAT Amount = Gross Order Total – Net Order Total
Gross Orderlines Total |
Net Orderlines Total |
Gross Order Total |
VAT Amount |
Net Order Total |
98,00 € + 65,67 € = 163,67 € |
82,36 € + 61,37 € = 143,73 € |
163,67 € |
163,67 € - 143,73 € = 19,94 € |
143,73 € |
Example 2
The second example uses the same order as example 1 but includes discount on order lines, shipping costs and a voucher. Item A gets a discount of 13% and item B gets a discount of 0,19€:
Item Name |
Quantity |
Gross Price |
VAT % |
Net Price |
Item A |
200 |
0,49 € |
19 |
0,4118 € |
Item B |
33 |
1,99 € |
7 |
1,8598 € |
The final prices are calculated as follows:
-
If discount is entered as %:
Discount = (Gross Price * Discount %) / 100
Final Gross Price = Gross Price – Discount
Final Net Price = Final Gross Price / (1 + (VAT % / 100))
-
If discount is entered as €:
Discount % = (100 * Discount €) / Gross Price
Final Gross Price = Gross Price – Discount
Final Net Price = Final Gross Price / (1 + (VAT % / 100))
Item Name |
Discount % |
Discount |
Final Gross Price |
Final Net Price |
Item A |
13 % |
0,0637 € |
0,49 € - 0,0637 € = 0,4263 € |
0,4263 € / 1,19 = 0,35823529 € rounded to 0,3582 € |
Item B |
9,54 % |
0,19 € |
1,99 € – 0,19 € = 1,80 € |
1,80 € / 1,07 = 1,68224299 € rounded to 1,6822 € |
The orderline totals are then calculated as follows:
Gross Orderline Total = Final Gross Price * Quantity
Net Orderline Total = Final Net Price * Quantity
VAT Amount included in orderline is the difference between net and gross orderline total
Item Name |
Net order line total |
Gross order line total |
VAT amount |
Item A |
0,3582 € * 200 = 71,64 € |
0,4263 € * 200 = 85,26 € |
85,26 € - 71,64 € = 13,62 € |
Item B |
1,6822 € * 33 = 55,5126 € |
1,80 € * 33 = 59,40 € |
59,40 € - 55,5126 € = 3,8874 € |
These values are now summed up and (if necessary) rounded to 2 decimal places for the orderlines total in the order header. The discount on the orderlines is also added up and shown in the order header:
Gross Orderlines Total = SUM (Gross Orderline) = Gross Orderline item A + Gross Orderline item B
Net Orderlines Total = SUM (Net Orderline) = Net Orderline item A + Net Orderline item B
Orderline Discount = SUM (Quantity * Discount) = (Quantity item A * Discount item A) + (Quantity item B * Discount item B)
Gross Orderlines Total |
Net Orderlines Total |
Orderline Discount |
85,26 € + 59,40 € = 144,66 € |
71,64 € + 55,51 € = 127,15 € |
(200 * 0,0637 €) + (33 * 0,19 €) = 12,74 € + 6,27 € = 19,01 € |
The shipping costs for this order are 5,95 € and the customer has a discount voucher of 30 €. The order totals are calculated as follows:
Gross Order Total = Gross Orderlines Total + Shipping Costs – Discount Voucher
Net Order Total = Net Orderlines Total + Net Shipping Costs – Net Discount Voucher
VAT Amount = Gross Order Total – Net Order Total
Shipping Costs |
Discount Voucher |
Gross Order Total |
VAT Amount |
Net Order Total |
5,95 € |
30,00 € |
144,66 € + 5,95 € - 30,00 € = 120,61 |
120,61 € - 106,01 € = 14,60 € |
127,15 € + 5,23 € - 26,37 € = 106,01 € |
Note: VAT in shipping costs is calculated proportional to the VAT rates of the items in the order (Setting Charge High VAT in Ship Costs in VAT Rates table in pixi Control Center is disabled). In the above example, the shipping costs include an amount of 0,5599 € for 19% VAT rate and 0,1598 € for 7% VAT rate, which sums up to a total of 0,7197 € VAT in shipping costs. Same applies for the voucher calculation which results in a net voucher amount of 26,37€.