===========================================
Thai Localization - VAT and Withholding Tax
===========================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:0aa1c1c802142837598405290a590520dcfbffd2f905b59837536bb6b18723f5
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--thailand-lightgray.png?logo=github
    :target: https://github.com/OCA/l10n-thailand/tree/15.0/l10n_th_account_tax
    :alt: OCA/l10n-thailand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/l10n-thailand-15-0/l10n-thailand-15-0-l10n_th_account_tax
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-thailand&target_branch=15.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module address 2 main tax requirement in Thailand

1. Tax Invoice (VAT)
====================

Point of tax invoice can occur either on Invoice (VAT) or on Payment
(Undue VAT on invoice become VAT on payment)

2. Withholding Tax
==================

This is the tax that is deducted during payment. There are 2 kinds of withholding tax calculataion.

#. Fixed rate of based amount, i.e., service 3%
#. Progressive rate of accumulated amount, i.e., personal income tax

**Table of contents**

.. contents::
   :local:

Configuration
=============

Tax Invoices
============

**Preparing Undue Tax**

- Use Developer Mode
- In Chart of Account, add new account for Undue Tax, if not already exists.
- As admin, add access rights ``Show Full Accounting Features``
- Go to Invoicing > Configuration > Settings and select ``Cash Basis``, this will open cash basis options in Tax master data
- Go to Invoicing > Configuration > Accounting > Taxes, create new undue tax for both sales and purchase

For Sales Taxes (tax scope = Sales), there is option to run Tax Invoice number by sequence model.
If set properly, Tax Invoice Number will be using this sequence instead of customer invoice number / payment number

* Goto Accounting > Configuration > Invoicing > Taxes
* For sales tax, choose 'Tax Invoice Sequence' (or create new one)
* Make sure you also set the same sequence for the same tax on payment too.
  I.e., Output VAT7% and Undue Output VAT7% must select the same sequence, both both of them will result in same Tax Report

Note: this option is not avaiable for purchase tax, because the Tax Invoice Number is from vendor, and are filled manually.

Withholding Tax and Personal Income Tax (PIT)
=============================================

Setup account related to withholding tax will help set default tax amount
when create certificate from payment.

* Go to Invoicing > Configuration > Accounting > Chart of Accounts
* Search for withholding tax related account
* Check "WHT Account"
* Go to Invoicing > Configuration > Invoicing > Withholding Tax
* Create withholding Tax (normal and personal income tax)

**Configured Withholding Tax by Product (optional)**

* Go to Invoicing > Customers or Vendors > Products
* Select product that you need withholding tax
* Add Withholding Tax on General Information Tab (Invoices) / Purchase Tab (Bills)

**Configure Personal Income Tax Rate**

#. Go to Invoicing > Configuration > Accounting > PIT Rate
#. Change range or tax rate (if any)

Configure PIT Withholding Tax as following,

#. Go to Invoicing > Configuration > Invoicing > Withholing Tax
#. Create new Withholding Tax for PIT and check Personal Income Tax checkbox
#. PIT Rate that will be used to caclulate the withholding amount will be shown
#. You can set default Withholding Tax on the Product's Purchase Tab

Usage
=====

Tax Invoice
===========

With this, 2 new tax related fields will be introduced in account.move.tax.invoice

1. tax_invoice_number : Tax Invoice Number
2. tax_invoice_date : Tax Invoice Date

In customer invoice, both field will be defaulted by Odoo's document number and date.
But in supplier invoice, both field must be filled by user with tax invoice number and date from vendor.

Note: The new table account.move.tax.invoice is the main source of Thai VAT Report

**Case Customer Invoice and Payment**

- Create new customer invoice and choose to use sales' VAT or Undue VAT
- Process invoice and payment as per normal, Odoo document number and date should be used as Tax Invoice Number/Date

**Case Supplier Invoice/Payment**

**1) Case Input VAT**

- Create new vendor bill and choose Input VAT
- At vendor bill's tax invoice tab, fill in 2 new fields, ``Tax Invoice`` and ``Tax Date`` given by your vendor
- Validate this vendor bill, the given Tax Invoice Number and Tax Date are set in account.move.tax.invoice

**2) Case Undue Input VAT**

- Create new vendor bill and choose Undue Input VAT
- Validate vendor bill, journal entry will be created with Undue VAT
- Register payment as per normal, this will create new payment document as per normal
- From this process, the journal entry (cash basis) for clear undue is created, but it will be in state **Draft**
- Go to payment document, in tax invoice tab, fill in Tax Invoice Number and Tax Date
- Click on Clear VAT button, the journal entry (cash basis) for clear undue will now be **Posted**

Withholding Tax
===============

From bills / invoices that require withheld tax,

- Create invoice and Fill withholding tax in Field WT at Invoice Lines tab.
- Post > Register Payment.
- System will auto computed amount include withholding tax.

**Note**

- if you configured withholding tax on product, it fill withholding tax in field WT automatic.
- for invoices with withholding tax,

    - you can't make payment to multiple invoices belongs to multiple partners.
    - you can only make payment to multiple invoices belongs to the same partner (using Group Payments).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-thailand/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-thailand/issues/new?body=module:%20l10n_th_account_tax%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Ecosoft

Contributors
~~~~~~~~~~~~

* `Ecosoft <http://ecosoft.co.th>`__:

  * Kitti U. <kittiu@ecosoft.co.th>
  * Saran Lim. <saranl@ecosoft.co.th>
  * Pimolnat Suntian <pimolnats@ecosoft.co.th>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
    :target: https://github.com/kittiu
    :alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu| 

This module is part of the `OCA/l10n-thailand <https://github.com/OCA/l10n-thailand/tree/15.0/l10n_th_account_tax>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
