Re: 0-VAT again

dls wrote:

Ok I just got the files from

http://devel.frontaccounting.com/git/?p=fa-stable.git;a=commit;h=481038ba4817907d494aa66fb6a888f1493221b2



I'm running 2.3.22 Do I just copy files from the zip file over my current files?  (backing up current prior)

Are you familiar with git ?
If it's to just to have a look checkout this commit as it is (eventually in another directory).
I don't know if the files have been modified by FA team since i modified them, so I don't know if you can just copy them.
The best would be to merge my branch 2.3.33.

/Elax

Re: 0-VAT again

Thanks

To be honest i'm not familiar with git

28 (edited by apmuthu 03/08/2015 04:13:51 am)

Re: 0-VAT again

@elax: the patch and files I provided in the 19th post in this thread were culled from your repo and has your nine files and the patch for the changes as of FA v2.3.19. These may be used for comparing with their counterparts to suitably modify files in FA v2.3.22+.

@dls: No familiarity with Git is necessary to use the changed files in my earlier post's attachment and the patch file in it is self explanatory. Just compare their original files with their current counterparts and compare the patch files to see what modifications are needed in FA v2.3.22+. Mere overwriting into FA v2.3.22+ will not be advisable.

The only thing not explicitly stated was that there were no database schema changes envisaged.

Post's attachments

elax_tax_support_commit_lines.png 53.4 kb, file has never been downloaded. 

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

Re: 0-VAT again

@apmuthu thanks.

@dls: you might try apmuthu zip.

/Elax

Re: 0-VAT again

Have worked my way through patch from 19th post as advised by apmuthu. A few other mods to code to correspond with 2.3.22 were needed, but seems to be working well. Currently, if I use my 0VAT QE I just need to click edit on the tax item and the Tax input/output is updated and tax posting works for that too.

Many thanks guys - absolutely spot on

Re: 0-VAT again

@dls: Please post the changed files that worked for FA v2.3.22+

Re: 0-VAT again

Not on here sure how to post files on here. Anyone interested I'll send the zipped file to.

Re: 0-VAT again

Upload it anywhere and paste the url here.

34 (edited by dls 03/10/2015 11:15:41 am)

Re: 0-VAT again

Link for gl_tax_support files for ver: 2.3.22  (0-VAT reporting)

http://91.84.138.17/FAdev/FrontaccountingTaxPatch2.3.22.rar

containing:
config.default.php
gl/gl_bank.php
gl/gl_journal.php
gl/includes/db/gl_db_banking.inc
gl/includes/db/gl_db_trans.inc
gl/includes/ui/gl_bank_ui.inc
gl/includes/ui/gl_journal_ui.inc
includes/ui/items_cart.inc
js/inserts.js

35 (edited by apmuthu 03/11/2015 08:11:26 am)

Re: 0-VAT again

Your archive contains a file
   gl_db_bank_trans.inc
but not the file
   gl/includes/db/gl_db_trans.inc.

Re: 0-VAT again

Apologies, done in hast! The archive should now be correct.

Re: 0-VAT again

I have removed the above

Link for gl_tax_support files for ver: 2.3.22  (0-VAT reporting)
http://91.84.138.17/FAdev/FrontaccountingTaxPatch2.3.22.rar

temporarily as this seems to have caused a problem with the reporting on the SI which was not there previously. Banking and Journal entries seem to work and report 0VAT ok.

@elax: SI doesn't post tax when just GL Items entered. When items are added into SI with GL items tax including 0VAT is posted (which was before patch) but is now reported twice?

Re: 0-VAT again

@dls: Please note that there are real changes only in these 3 FA 2.3.22+ changed files:
config.default.php
includes/ui/items_cart.inc
gl/includes/gl_bank.php
when compared to elax patch files for 2.3.19.

Re: 0-VAT again

After comparing elax FA v2.3.19 Tax Support Patch, incorporated changes in FA 2.3.22+ as on date retaining all white space in the latter.

Please provide feedback.

Post's attachments

FA_Inv_Rep_Tax_Support_elax-apm.zip 79.2 kb, 4 downloads since 2015-03-11 

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

40 (edited by dls 03/11/2015 09:45:59 am)

Re: 0-VAT again

@apmuthu: I will check the files again when I get some time later, although I didn't think i'd missed anything.

It would appear that:

trans_type 20 (SI) doesn't post net_amount (just sets it to 0) to trans_tax_details when posting SI with no items included just gl item entries.

trans_type 20 (SI) posts net_amount to trans_tax_details when posting SI with items included just gl item entries and also posts another entry to the trans_tax_details with net_amount =0

As noted Banking and Journal entry seems fine.

@elax: do you have any pointers as to where to look to sort this?

Re: 0-VAT again

@apmuthu: feedback for post 39.

Same results found -ie those noted in post 40

Many thanks for help so far

Re: 0-VAT again

@dls: I think @elax did mention some limitations, possibly for Supplier Invoices.

@elax: please have a look.

Re: 0-VAT again

As a temporary fix to enable me to correctly use FA for tax reporting I have modified the code to post net amount from SI entry now - This is implemented using QE so that the 0VAT is associated to a particular entry. For the 0VAT reporting to work the zero-rated QE must be used. The posting to the tables works correctly.

The tax report rep709 however reports each SI twice. This is as a result of the following sql query:

SELECT tt.name as taxname, taxrec.*, taxrec.amount*ex_rate AS amount,
                taxrec.net_amount*ex_rate AS net_amount,
                IF(taxrec.trans_type= 1 OR taxrec.trans_type=2,
                    IF(gl.person_type_id<>0, gl.memo_, gl.person_id),
                    IF(ISNULL(supp.supp_name), debt.name, supp.supp_name)) as name,
                branch.br_name
        FROM 0_trans_tax_details taxrec
        LEFT JOIN 0_tax_types tt
            ON taxrec.tax_type_id=tt.id
        LEFT JOIN 0_gl_trans gl
            ON taxrec.trans_type=gl.type AND taxrec.trans_no=gl.type_no AND
            (tt.purchasing_gl_code=gl.account OR tt.sales_gl_code=gl.account)
        LEFT JOIN 0_supp_trans strans
            ON taxrec.trans_no=strans.trans_no AND taxrec.trans_type=strans.type
        LEFT JOIN 0_suppliers as supp ON strans.supplier_id=supp.supplier_id
        LEFT JOIN 0_debtor_trans dtrans
            ON taxrec.trans_no=dtrans.trans_no AND taxrec.trans_type=dtrans.type
        LEFT JOIN 0_debtors_master as debt ON dtrans.debtor_no=debt.debtor_no
        LEFT JOIN 0_cust_branch as branch ON dtrans.branch_code=branch.branch_code
        WHERE (taxrec.amount <> 0 OR taxrec.net_amount <> 0)
            AND taxrec.trans_type <> 13
        ORDER BY taxrec.trans_type, taxrec.tran_date, taxrec.trans_no, taxrec.ex_rate

I haven't looked further into this report yet, the joins are obviously pulling the data out twice when only required once.
To save time, wondered if anyone had encountered this issue before.  Before I start modifying the statement.

On a longer term, when I have more time, I would like to modify the SI code to deal with input more on the lines of elax's Banking/GL entry. Unless, of course, this is dealt with in a future version of FA.

Thanks

Re: 0-VAT again

I have attached the output of your SQL statement for the en_US-demo CoA - I do not see any duplications. Please show which ones you consider duplicate for what set of restricted unique keys.

Post's attachments

SQL_Output_0VAT.png 17 kb, file has never been downloaded. 

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

Re: 0-VAT again

Sorry guys, I've been quite busy recently (I'm still) and don't come often on this forum.
Can someone summarize the situation ? I only use 0-VAT for journal entry and payment/deposit
so some bugs in sales or supplier invoices are possible.

/Elax