Difference between revisions of "Deferred Tax"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Technical Logic)
Line 1: Line 1:
 +
*This is a technical, step-by-step newbie/oldie attempt at extending ADempiere. Refer to it if you are something like me! - [[User:Red1|red1]]
 
=Background=
 
=Background=
 
(This is a stub. Please help expand it)
 
(This is a stub. Please help expand it)

Revision as of 20:09, 13 April 2010

  • This is a technical, step-by-step newbie/oldie attempt at extending ADempiere. Refer to it if you are something like me! - red1

Background

(This is a stub. Please help expand it)

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(..,..,..,..,..);

TODO

  1. First I try to create my own Model Validator so that I can debug it to make it work correctly.
  2. Then I shall transfer it to a Script ModelValidator so that I can easily teleport it anywhere I want without harming the ozone layer.

Using MyValidator

  • Now, to do the first TODO, I do it by good old copy/paste from MyValidator
  • Then I introduce my stub for a BEFORE_POST, putting a break there to POC up to that point.

See Also