# [Payment Processor] How to setup discount calculation before tax?

How to setup automatically give 10% discount before tax when a certain payment that configured a payment processor is clicked (I tried using the payment processor, but it still gives me the discount after tax; not before tax).

Any solution for this?

Is there not an option in include tax on calculations?
As a discount I believe including tax on the discount is equivalent of discount before tax as is including (deducting) tax on the discount.

I could not find any option to include â€śtaxâ€ť on property editor. You are right, the discount is equivalent of discount before tax. But my local government rule is to add discount before tax (in order paying excess tax). Following are the screenshots.

Payment Processor Property Editor (Discount Calculations)

Payment Processor Property Editor (Add Calculations)

Sort Account Transaction Types

Still no luck, discount still calculated before tax (PPN 10%). I set the rate 0.00 on â€śMember Discount 10%â€ť calculation, because later I will have to set the rate 10 on â€śDiscount Calculationsâ€ť on Payment Processor Property Editor".

Just clarify for me what values you need to make?
If discount is 10%

Ticket total is 1000
Discounted amount is 900
+10% tax on 900 is 90
Total is 990!!

The totals equate to discount before tax but see tax showing as 100â€¦
Can you show account transactions for that ticket?

Exactly,

Ticket total is 1000
10% Member Discount is -100
Discounted amount is 900
+10% tax on 900 is 90
Total is 990

I know that the totals equate to discount before tax, but I have to pay more tax if discount is added after tax.

Here is the account transaction for this ticket:

And what values do you get with include tax not ticked?

Try checking the Use Plain Total box instead of Include Tax.

1 Like

Well, sounds strange but both calculation have exactly the same value.

@QMcKay I have tried checking the Use Plain Sum and both (Include Tax + Use Plain Sum), but the payment processor (Discount Calculation) is still calculated before tax.

Is there any way to sort Transaction priority? E.g.:

1. Sale Transaction
2. Member Discount Transaction
3. Tax
4. Payment Transaction

Transactions are just a map for moving the values between accounts, the values will be set before that.

I thought that was the aim

1 Like

Is your tax an actual tax template or are you using Calculation?

Actually, this is what Iâ€™m trying to achieve. The discount is calculated before tax, this is done when using â€ścustomisable Discount buttonâ€ť on payment screen.

@QMcKay

Iâ€™m using tax template

``````[TAXES]
<J00>{TAX NAME} {TAX RATE}%:|[=FF('{TAX AMOUNT}','#,##0')]``````

Accounts are messed up, either that or mine are wrong.
Tax has no target for oneâ€¦

Thats not a tax template, thats printer template for tax

Sorry, itâ€™s quite late here already I canâ€™t concentrate. Hereâ€™s my tax template:

And the TAX transaction type?

Here we go,

Likely you cant do it with a payment processorâ€¦ you should probably automate a regular calculation instead. You can do this by creating a calculation selector but leaving header part blank.

Pretty sure that is wrongâ€¦ your accounts will be all over the shop;