Sitemap
How to Coda with VAT — Part VI

Member-only story

How to Coda with VAT — Part VI

4 min readJan 31, 2022

--

How to permit a user without any affinity with Coding

to apply reductions on products and — or — over the total in an easy way?

We start with what we have, the dynamic reductions on product level and we integrate the learnings from part 4. We add a button that permits to use the same buttons to calculate the total reduction. Once I saw this design option the code part was not too difficult anymore.

The reduction

The first step is to get the reduction right. We reuse the product logic and replace for the percentage logic the base price per row — thisRow.BasePrice — by the sum per list: — thisTable.NewBasePrice.Sum(). This results in the reduction over the total.

Press enter or click to view image in full size
adding columns with check boxes filled out via buttons

The redistribution of VAT per VAT type

We have a column in our table about VAT, checked means VAT excl, unchecked VAT incl. We use this logic to duplicate the steps we described in part IV with a little extra, see below the IF statement we use. No additional columns needed.

--

--

Christiaan Huizer
Christiaan Huizer

Written by Christiaan Huizer

I write every week about how to Coda . You find blogs for beginners and experienced makers. Until 7 days after publication you read my blog for free. Welcome!