Deferred Tax

From ADempiere
Revision as of 16:44, 13 April 2010 by Red1 (Talk) (Background)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Background

(This is a stub. Please help expand it)

  • The Thailand Usability project uses Deferred Tax in VAT when the Invoice for services is completed.
  • Then during Payment process of that Invoice, its Accounting transfers that to Tax_Due.
  • This is a good case for using a ModelValidator.
  • A pretty good validator to learn from is LCO_Validator

Business Logic

  • What i intend to do is to write a ModelValidator that uses AOP (aspect oriented programming) principle in intercepting Invoice BEFORE POST to change the facts to Tax_Liability and then during Payment BEFORE POST to transfer the Facts to TAX_DUE
  • There can be logic in the ModelValidator to ensure that the Invoice is for Services product and is qualified for VAT. The Payment part's logic handles to make sure its transfering the right fact in the accounts.

Technical Logic

  • OCCURENCE 1: Doc_Invoice.FactsCreate()
  • OCCURENCE 2: Doc_Payment.FactsCreate()
  • MODEL: FACT_ACCT
  • CODE INTERCEPTION 1: fact.creatline(..,..,..,..,..);

See Also