Cost per Unit after applying Sales Tax and Discount

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?

You cannot do everything you ask. What you can do is designate sales invoices as tax-inclusive. See 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.

1 Like

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?

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.

1 Like

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 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

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

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).