Compiere 3.1

org.compiere.acct
Class DocTax

java.lang.Object
  extended by org.compiere.acct.DocTax

public final class DocTax
extends Object

Document Tax Line

Version:
$Id: DocTax.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
Author:
Jorg Janke

Field Summary
static int ACCTTYPE_TaxCredit
          Tax Credit
static int ACCTTYPE_TaxDue
          Tax Due Acct
static int ACCTTYPE_TaxExpense
          Tax Expense
static int ACCTTYPE_TaxLiability
          Tax Liability
static int ACCTTYPE_TaxReceivables
          Tax Receivables
 
Constructor Summary
DocTax(int C_Tax_ID, String name, BigDecimal rate, BigDecimal taxBaseAmt, BigDecimal amount, boolean salesTax)
          Create Tax
 
Method Summary
 void addIncludedTax(BigDecimal amt)
          Add to Included Tax
 MAccount getAccount(int AcctType, MAcctSchema as)
          Get Account
 BigDecimal getAmount()
          Get Amount
 int getAPTaxType()
          Get AP Tax Type
 int getC_Tax_ID()
          Get C_Tax_ID
 String getDescription()
          Get Description (Tax Name and Base Amount)
 BigDecimal getIncludedTax()
          Get Included Tax
 BigDecimal getIncludedTaxDifference()
          Get Included Tax Difference
 String getName()
          Get Name of Tax
 BigDecimal getRate()
          Get Rate
 BigDecimal getTaxBaseAmt()
          Get Base Amount
 boolean isIncludedTaxDifference()
          Included Tax differs from tax amount
 boolean isSalesTax()
          Is Sales Tax
 String toString()
          Return String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCTTYPE_TaxDue

public static final int ACCTTYPE_TaxDue
Tax Due Acct

See Also:
Constant Field Values

ACCTTYPE_TaxLiability

public static final int ACCTTYPE_TaxLiability
Tax Liability

See Also:
Constant Field Values

ACCTTYPE_TaxCredit

public static final int ACCTTYPE_TaxCredit
Tax Credit

See Also:
Constant Field Values

ACCTTYPE_TaxReceivables

public static final int ACCTTYPE_TaxReceivables
Tax Receivables

See Also:
Constant Field Values

ACCTTYPE_TaxExpense

public static final int ACCTTYPE_TaxExpense
Tax Expense

See Also:
Constant Field Values
Constructor Detail

DocTax

public DocTax(int C_Tax_ID,
              String name,
              BigDecimal rate,
              BigDecimal taxBaseAmt,
              BigDecimal amount,
              boolean salesTax)
Create Tax

Parameters:
C_Tax_ID - tax
name - name
rate - rate
taxBaseAmt - tax base amount
amount - amount
salesTax - sales tax flag
Method Detail

getAccount

public MAccount getAccount(int AcctType,
                           MAcctSchema as)
Get Account

Parameters:
AcctType - see ACCTTYPE_*
as - account schema
Returns:
Account

getAmount

public BigDecimal getAmount()
Get Amount

Returns:
gross amount

getTaxBaseAmt

public BigDecimal getTaxBaseAmt()
Get Base Amount

Returns:
net amount

getRate

public BigDecimal getRate()
Get Rate

Returns:
tax rate in percent

getName

public String getName()
Get Name of Tax

Returns:
name

getC_Tax_ID

public int getC_Tax_ID()
Get C_Tax_ID

Returns:
tax id

getDescription

public String getDescription()
Get Description (Tax Name and Base Amount)

Returns:
tax anme and base amount

addIncludedTax

public void addIncludedTax(BigDecimal amt)
Add to Included Tax

Parameters:
amt - amount

getIncludedTax

public BigDecimal getIncludedTax()
Get Included Tax

Returns:
tax amount

getIncludedTaxDifference

public BigDecimal getIncludedTaxDifference()
Get Included Tax Difference

Returns:
tax ampunt - included amount

isIncludedTaxDifference

public boolean isIncludedTaxDifference()
Included Tax differs from tax amount

Returns:
true if difference

getAPTaxType

public int getAPTaxType()
Get AP Tax Type

Returns:
AP tax type (Credit or Expense)

isSalesTax

public boolean isSalesTax()
Is Sales Tax

Returns:
sales tax

toString

public String toString()
Return String representation

Overrides:
toString in class Object
Returns:
tax anme and base amount

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.