# Cost per Unit after applying Sales Tax and Discount

**URL:** <https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445>\
**Category:** ideas\
**Created:** [September 25, 2019, 12:01pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445 "2019-09-25T12:01:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asif\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@Asif\_Hussain](https://forum.manager.io/u/Asif_Hussain)\
**Post date:** [September 25, 2019, 12:01pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/1 "2019-09-25T12:01:32Z")

</div>

Hi, is there anyway we can display cost per unit on sales invoice after applying sales tax and discount, our customers are resellers, so they are interested in “Price per unit” to see how much it costing to them after all taxes and discount  
I have added another column with title “Cost per unit after S.tax and Discount” but it looks calculations cant be done in custom fields, is there any other way to achieve this?

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [September 25, 2019, 1:00pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/2 "2019-09-25T13:00:19Z")

</div>

You cannot do everything you ask. What you can do is designate sales invoices as tax-inclusive. See [Choose between tax-exclusive and tax-inclusive prices | Manager](https://www.manager.io/guides/9502). And you can edit the unit price to be the discounted price including tax. A note in a custom field could be used to explain to your customer what discount you have given.

Another approach is to enter discounts as separate line items with negative unit prices. Be sure to apply the same tax code to the discount line item you applied to the relevant line item for the goods.

You are correct that line-item custom fields cannot perform calculations. They are designed for entry of text information only.

---

<div class="post-metadata">

**Author:** ![Asif\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@Asif\_Hussain](https://forum.manager.io/u/Asif_Hussain)\
**Post date:** [September 25, 2019, 2:01pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/3 "2019-09-25T14:01:40Z")

</div>

that will require lots of manual efforts on each invoice, is it technically possible if someone knows dotliquid coding by modifying template we have assigned to Sales Invoice?

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [September 25, 2019, 4:25pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/4 "2019-09-25T16:25:56Z")

</div>

No, because themes only control presentation of variables already present in the transaction. The number you want to display is not calculated by the program.

---

<div class="post-metadata">

**Author:** ![Asif\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@Asif\_Hussain](https://forum.manager.io/u/Asif_Hussain)\
**Post date:** [September 27, 2019, 8:49am UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/5 "2019-09-27T08:49:49Z")

</div>

Okay should I consider your reply as an official reply or you are also a user of Manager software?  
As per this guide [https://www.manager.io/guides/17115](https://www.manager.io/guides/17115) it looks we can do calculations using custom theme, all i want to do is (Unit Price - Discount + Tax) and display it on invoice, No need to save it anywhere in DB

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [September 27, 2019, 1:22pm UTC](https://forum.manager.io/t/cost-per-unit-after-applying-sales-tax-and-discount/24445/6 "2019-09-27T13:22:04Z")

</div>

> [@Asif\_Hussain](#):
>
> or you are also a user of Manager software?

I am a user and forum moderator. My answers are not official positions of the developer.

> [@Asif\_Hussain](#):
>
> it looks we can do calculations using custom theme,

You can. But that will not accomplish what you want for two reasons:

- First, you cannot add a column to the sales invoice except by using line-item custom fields. And line-item custom fields, as I said earlier, are only for text. Calculations can only be performed on number-type fields. So, you could create a custom theme that performs calculations, but the results cannot appear in a column of the regular table along with item codes, descriptions, unit prices, amounts, etc. The results could only appear somewhere else in the sales invoice.

- Second, performing such calculations requires that any number you want to include in the calculation already be part of the transaction form, either built-in or in a custom field. Neither the discount nor the tax amount on a unit basis is included, so the calculation cannot be made. The kind of calculation you could make would be to multiply the total tax on an invoice by a number entered into a regular custom field (although I cannot think of a reason to do that).
