Topic: Australian Tax Invoice extension

I have created an extension module to provide an Australian Tax Invoice.

The ATO (Australian Tax Office) is rather flexible about the layout of invoices but there are several mandatory elements that must be complied with to be legal. Their guidelines can be found here https://www.ato.gov.au/Business/GST/Iss … axinvoices.

I have used the Module facility to override the standard invoice (rep109) to make FA generate compliant invoices. A number of the other reports have also been modified to be consistent (but not a legal requirement). As this is using Modules, the changes can be switched on or off simply by enabling or disabling the extension.

Module can be downloaded from https://github.com/PaulShipley/rep_aus_invoice

@apmuthu Can this be added to the official extensions?

Thanks.

Re: Australian Tax Invoice extension

Will look into it. Need to check if the UPDATE / INSERT sqls are needed here or changes in the core file(s) are in order. Since many countries including India too follow the GST bandwagon (not that many in the trade are paying it / like to pay it / subsidise excessive and unwarranted govt spending on undesirables!) it may be in order to make it generic.

Re: Australian Tax Invoice extension

Thanks. Let me know if there are any issues. I have tried to make as few changes as possible that meets the ATO requirements.

I'm not sure if this could be made generic as each jurisdiction has it's own requirements. For example the ATO insists that all references are to 'GST', whereas the UK uses 'VAT'. I suspect that there would have to be several versions (eg: Australia, UK, India, USA, etc.) Happy to discuss further ideas.

Re: Australian Tax Invoice extension

The GST / VAT are addressed in the locale translation files.
There are some computational changes you have introduced - in what way do these changes affect the output?

Re: Australian Tax Invoice extension

The ATO guidelines show two examples: one for invoices less than $1000 and the other for amounts of $1000 or more. In practice most businesses choose one or the other depending on if the bulk of their invoices are above or below the threshold. I have modeled my changes on example 2 (above $1000).

This layout requires separating price (ex tax), GST and total for each line item, which required some changes to the calculations. The line and column totals are unchanged.

Hope this clarifies these changes.

Re: Australian Tax Invoice extension

@joe: Please add in an extra column in function get_customer_trans_details to obtain just the price without tax as it is needed for the likes of the Australian Tax Invoice and possibly elsewhere. This is in file sales/includes/db/cust_trans_details_db.inc. Hence the lines 19-21 in the said file:

    $sql = "SELECT line.*,
        line.unit_price+line.unit_tax AS FullUnitPrice,
        line.description As StockDescription,

should now be lines 19-22:

    $sql = "SELECT line.*,
        line.unit_price+line.unit_tax AS FullUnitPrice,
        line.unit_price AS UnitPriceExTax,  
        line.description As StockDescription,

@PaulShipley: The said function is used in rep107.php (sales invoice), rep110.php (deliveries) and rep113.php (credit notes).

Re: Australian Tax Invoice extension

Fixed and committed to Repo.

/Joe

Re: Australian Tax Invoice extension

@joe: Thanks for the commit.

@PaulShipley: The file sales/includes/db/cust_trans_details_db.inc can be removed from your extension as the one in the core would now suffice.

Re: Australian Tax Invoice extension

@apmuthu: Great. I will refactor my code accordingly. Thanks.

Re: Australian Tax Invoice extension

Can try to avoid making several changes in the core reports to include the pdf inc file if possible.
Attached is one instance of a function that may no longer be required or one that can be selectively incorporated with if(!function_exists(... at creation time and it's complement at usage time.

Post's attachments

Core_vs_aus_diffs.jpg 296.2 kb, file has never been downloaded. 

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