Package org.bgerp.plugin.bil.invoice.model

# Class Invoice

java.lang.Object
org.bgerp.model.base.Id
org.bgerp.plugin.bil.invoice.model.Invoice

All Implemented Interfaces:
  `Serializable`, `Id<Integer>`

public class Invoice extends Id

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.bgerp.model.base.Id

  `id`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Invoice()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addPosition(String id, String title, String amount, String unit, int quantity)`
  `void`
  `addPosition(String id, String title, BigDecimal amount, String unit, int quantity)`
  `BigDecimal`
  `amount()`
  Updates amount out of positions.
  `String`
  `dateFromMonthDisplayName(String lang)`
  `TextStyle.FULL` display name of the month of `dateFrom`.
  `int`
  `dateFromYear()`
  Year of `dateFrom`.
  `BigDecimal`
  `getAmount()`
  `Date`
  `getCreatedTime()`
  Deprecated.
  `int`
  `getCreatedUserId()`
  Deprecated.
  `Date`
  `getCreateTime()`
  `int`
  `getCreateUserId()`
  `Date`
  `getDateFrom()`
  `String`
  `getDateFromMonthDisplayName(String lang)`
  Deprecated.
  `int`
  `getDateFromYear()`
  Deprecated.
  `Date`
  `getDateTo()`
  `String`
  `getNumber()`
  `int`
  `getNumberCnt()`
  `Date`
  `getPaymentDate()`
  `int`
  `getPaymentUserId()`
  `List<Position>`
  `getPositions()`
  `int`
  `getProcessId()`
  `Date`
  `getSentTime()`
  `int`
  `getSentUserId()`
  `int`
  `getTypeId()`
  `int`
  `getTypeTitle()`
  `long`
  `months()`
  `String`
  `monthsPeriod(String lang)`
  Formatted period of invoice months: `MonthFromName YearFromNumber - MonthToName YearToNumber` with month names for a specified language.
  `void`
  `setAmount(BigDecimal value)`
  `void`
  `setCreatedTime(Date value)`
  Deprecated.
  `void`
  `setCreatedUserId(int value)`
  Deprecated.
  `void`
  `setCreateTime(Date value)`
  `void`
  `setCreateUserId(int value)`
  `void`
  `setDateFrom(Date value)`
  `void`
  `setDateTo(Date value)`
  `void`
  `setNumber(String number)`
  `void`
  `setNumberCnt(int numberCnt)`
  `void`
  `setPaymentDate(Date value)`
  `void`
  `setPaymentUserId(int value)`
  `void`
  `setPositions(List<Position> positions)`
  `void`
  `setProcessId(int processId)`
  `void`
  `setSentTime(Date value)`
  `void`
  `setSentUserId(int value)`
  `void`
  `setTypeId(int typeId)`
  `void`
  `setTypeTitle(int typeTitle)`

  ### Methods inherited from class org.bgerp.model.base.Id

  `equals, getId, hashCode, setId`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Invoice

    public Invoice()

- ## Method Details

  - ### getTypeId

    public int getTypeId()

  - ### setTypeId

    public void setTypeId(int typeId)

  - ### getTypeTitle

    public int getTypeTitle()

  - ### setTypeTitle

    public void setTypeTitle(int typeTitle)

  - ### getProcessId

    public int getProcessId()

  - ### setProcessId

    public void setProcessId(int processId)

  - ### getNumberCnt

    public int getNumberCnt()

  - ### setNumberCnt

    public void setNumberCnt(int numberCnt)

  - ### getNumber

    public String getNumber()

  - ### setNumber

    public void setNumber(String number)

  - ### getDateFrom

    public Date getDateFrom()

  - ### setDateFrom

    public void setDateFrom(Date value)

  - ### getDateTo

    public Date getDateTo()

  - ### setDateTo

    public void setDateTo(Date value)

  - ### dateFromMonthDisplayName

    public String dateFromMonthDisplayName(String lang)
    `TextStyle.FULL` display name of the month of `dateFrom`.
    Parameters:
      `lang` - language, e.g. 'en', 'ru'.
    Returns:

  - ### dateFromYear

    public int dateFromYear()
    Year of `dateFrom`.
    Returns:

  - ### monthsPeriod

    public String monthsPeriod(String lang)
    Formatted period of invoice months: `MonthFromName YearFromNumber - MonthToName YearToNumber` with month names for a specified language. If `dateFrom` and `dateTo` are in the same month, then only it is shown without range.
    Parameters:
      `lang` - the language of months names.
    Returns:

  - ### months

    public long months()
    Returns:
      count of invoice months, `1` or more.

  - ### getDateFromMonthDisplayName

    @Deprecated public String getDateFromMonthDisplayName(String lang)
    Deprecated.

  - ### getDateFromYear

    @Deprecated public int getDateFromYear()
    Deprecated.

  - ### getCreateTime

    public Date getCreateTime()

  - ### setCreateTime

    public void setCreateTime(Date value)

  - ### getCreatedTime

    @Deprecated public Date getCreatedTime()
    Deprecated.

  - ### setCreatedTime

    @Deprecated public void setCreatedTime(Date value)
    Deprecated.

  - ### getCreateUserId

    public int getCreateUserId()

  - ### setCreateUserId

    public void setCreateUserId(int value)

  - ### getCreatedUserId

    @Deprecated public int getCreatedUserId()
    Deprecated.

  - ### setCreatedUserId

    @Deprecated public void setCreatedUserId(int value)
    Deprecated.

  - ### getSentTime

    public Date getSentTime()

  - ### setSentTime

    public void setSentTime(Date value)

  - ### getSentUserId

    public int getSentUserId()

  - ### setSentUserId

    public void setSentUserId(int value)

  - ### getPaymentDate

    public Date getPaymentDate()

  - ### setPaymentDate

    public void setPaymentDate(Date value)

  - ### getPaymentUserId

    public int getPaymentUserId()

  - ### setPaymentUserId

    public void setPaymentUserId(int value)

  - ### getAmount

    public BigDecimal getAmount()

  - ### setAmount

    public void setAmount(BigDecimal value)

  - ### amount

    public BigDecimal amount()
    Updates amount out of positions.
    Returns:
      the new value.

  - ### getPositions

    public List<Position> getPositions()

  - ### setPositions

    public void setPositions(List<Position> positions)

  - ### addPosition

    public void addPosition(String id, String title, BigDecimal amount, String unit, int quantity)

  - ### addPosition

    public void addPosition(String id, String title, String amount, String unit, int quantity)