Forget that… its not even that complex…
Use calculation transaction type…
Right so thinking hard right now LOL
Sale = Sales --> Receivables
Payment = Receivables --> Payment (Cash/Card etc)
Discount = Receivables --> Discount
So…
£20 products + £10 cashback = £30 total
I would have said
£30 Sales --> £30 Receivables
£30 Receivables -> £30 Payment - Card
Calculation type Cash -> Sales
£10 Payment - Cash -> £10 Sales
Meaning accounts of
Account | Debit | Credit | Total
Sales 10 30 (20)
Receivables 30 30 -
Cash - 10 (10)
Card 30 0 30
BUT THAT WONT WORK as transaction type for calculation would mean it wasnt 30 in the first part…
So…
Back to first thought of calculation type being as above BUT LOOKING BACK NOW CAN USE SAME account type ID