1 (edited by advocaat.pollet 03/30/2023 08:24:55 am)

Topic: Taxreport (rep709) - separate creditnotes from invoices sales/purch.

Hi,

In Belgium, the creditnotes in VAT-declaration need to be mentioned seperated from invoices (sales and purchases).

Now, FA makes sums of invoices AND creditnotes in the taxreport-summary.

How can I seperate the creditnotes from invoices in the taxreport-summary ?

Kind regards,
F.

2 (edited by advocaat.pollet 04/02/2023 08:17:59 am)

Re: Taxreport (rep709) - separate creditnotes from invoices sales/purch.

Hi,

I helped myself. Attachted you can find the rep709-file. Rename it to rep709.php and save it under your '/reporting/'-directory.

The report contains a VAT-declaration for Belgium, but you can adapt it for other countries (symply rename the fieldnumbers of the VAT-declaration).

You need to add the fieldnames of the VAT-declaration in the taxname, ex. 'BTW BE D&G-21/100-M03VT54M49AT64|M82AT59M85VT63'.

When the 'taxname' is used for a transaction, the fields of the VAT-declaration will be populated with the correct values and sums.

So, in this ex., if you make a salesinvoice, the fields M03 en VT54 will be popultated with the salesamount and the taxamount.
If you make a purchase, the fields M82 and AT59 will be populated with the purchase-amount and the 100%-deductable taxamount.
salescreditnote : fields M49 and AT64
purchase-creditnote : fields M85 and VT63

Ofcourse this is not a pretty name of the taxname in invoices/credit notes/deliveries.  In these reports, I changed the variable '$tax_type_name' to :

$tax_type_name = substr($tax_item['tax_type_name'],0,3);

So, only the first 3 letters of the taxname are used in invoices/credit notes/deliveries, in above ex. : 'BTW', which is the dutch translation of 'VAT'.

It also works for VAT that is only partialy deductable (ex. 50% deductability of the tax).  Read the code.  Make a first taxname for the deductable part of the tax (as explained above), and a second taxname for the non-deductable part of the tax, put '_' in front of the taxname for the non-deductable part (ex. _BTW21/50, i.e. 10,5 %, i.e. 1/2e of 21) and FA and the report will do the rest (escaping the non-deductable part of taxamounts in purchases from being part of the VAT-declaration).
 
I hope this helps someone.

Kind regards,
F.

Post's attachments

rep709.txt 18.5 kb, 4 downloads since 2023-04-02 

You don't have the permssions to download the attachments of this post.

3 (edited by advocaat.pollet 04/02/2023 10:32:00 am)

Re: Taxreport (rep709) - separate creditnotes from invoices sales/purch.

Forgot to mention, the report needs PHP 8 and didn't test with quick entries yet.