Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] l10n_th_withholding_tax, Add PIT feature. #262

Closed

Conversation

kittiu
Copy link
Member

@kittiu kittiu commented Sep 28, 2021

This PR do not change any logic in calculate WHT. But add a useful field "Withholding Base Amount", and as such, it is now possible to change base amount in order to calculate back the withholding tax.

image

@kittiu
Copy link
Member Author

kittiu commented Sep 28, 2021

@Saran440 can you help review this one please.

@Saran440
Copy link
Member

@kittiu
On wizard. Fields Amount + Payment Difference must equal Withholding Base always?
if yes, you should add function for check this.

@kittiu
Copy link
Member Author

kittiu commented Sep 29, 2021

@kittiu On wizard. Fields Amount + Payment Difference must equal Withholding Base always? if yes, you should add function for check this.

No, not necessary. It is possible that, only 1 out of 2 invoice line is the base amount. I do this intentionally.
Also, even if in invoice line, there are not WHT lines, we can still select the WHT in payment wizard and type in base amount manually.

Now, it is very flexible.

@kittiu kittiu force-pushed the 14.0-imp-l10n_th_withholding_tax branch from a35140f to 471ecb9 Compare September 29, 2021 09:01
Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional Test,
Vat + WT -> 👍
WT only -> 👍

@kittiu kittiu changed the title [14.0][IMP] l10n_th_withholding_tax, add base amount on payment register [14.0][IMP] l10n_th_withholding_tax, Refactor + Add PIT feature. Sep 29, 2021
@kittiu
Copy link
Member Author

kittiu commented Sep 29, 2021

@saran, as discussed,

  • I moved PIT feature from [14.0][ADD] l10n_th_withholding_tax_pit #261 here.
  • Except "Create Cert.", I will create another PR for l10n_th_withholding_tax_cert
  • I will also create PR for l10n_th_withholding_tax_multi to make it support PIT too.

Please help review/approve this PR, and we will continue with the rest.

@kittiu kittiu changed the title [14.0][IMP] l10n_th_withholding_tax, Refactor + Add PIT feature. [14.0][IMP] l10n_th_withholding_tax, Add PIT feature. Sep 29, 2021
@kittiu kittiu force-pushed the 14.0-imp-l10n_th_withholding_tax branch from 7f037cd to dbe9466 Compare September 29, 2021 16:15
@kittiu
Copy link
Member Author

kittiu commented Sep 29, 2021

Ready for review.

@kittiu kittiu force-pushed the 14.0-imp-l10n_th_withholding_tax branch 4 times, most recently from 7eb9154 to f0a3abe Compare September 30, 2021 04:21
@kittiu kittiu force-pushed the 14.0-imp-l10n_th_withholding_tax branch 2 times, most recently from a3cf955 to 46e141d Compare September 30, 2021 12:10
@kittiu
Copy link
Member Author

kittiu commented Sep 30, 2021

@Saran440 @ps-tubtim This PR is ready for review.

@Saran440
Copy link
Member

Saran440 commented Oct 5, 2021

Functional Test

Case: Cancel Payment with PIT

  1. Create Vendor Bills and select line with PIT > Register Payment normal process
  2. View PIT on vendor (it's correct)
    Selection_004
  3. Cancel Payment and View PIT on vendor again
    Selection_005

Should be check cancel checkbox?
and I test payment reset to draft and cancel again.
It reversed and not check cancel last line.

Selection_006


Case: Some field is not used

  1. Payment View
    Selection_003

  2. Vendor View
    Selection_007

Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review above

@peerayaproud
Copy link

peerayaproud commented Oct 6, 2021

I would like to raise issue about employee expense
If the employee made an expense report and there is PIT.
The Odoo will record PIT data in "that employee" master data not the vendor who got paid from employee.
Also the WHT Certificate will print employee's name.
The employee is just a middle man who transfer company's money to Vendor.

Selection_119
Selection_118
Selection_120

@newtratip
Copy link
Member

@kittiu, Could you fix the conflict files ?

@kittiu kittiu force-pushed the 14.0-imp-l10n_th_withholding_tax branch from 46e141d to 9aa5975 Compare October 7, 2021 12:33
@kittiu
Copy link
Member Author

kittiu commented Oct 8, 2021

TODO:

  • Fix the reported bugs (above)
  • Make sure that, when this module works with expense and clearing (and l10n_th_expense_tax), it use correct bill_partner_id when withhold.
  • (not this PR), Fix for normal Tax Invoice, currently, the module l10n_th_expense_tax invoice should also dr/cr on bill_partner_id

@Saran440

@kittiu
Copy link
Member Author

kittiu commented Oct 8, 2021

Review above

Note on the Type of Income, it is intentional to have user fill it later one (just before printing cert is ok).

@kittiu
Copy link
Member Author

kittiu commented Nov 1, 2021

Closed as move to #272

@kittiu kittiu closed this Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants