Item

receipt~ Item

Represents a line in the document.
When you finish setting all the item's properties, call calcMounts() to calculate the mounts.

Constructor

new Item(description)

Source:
Parameters:
Name Type Description
description string

Item description as product or service.

Methods

calcMounts()

Description:
  • Calculates the mounts of the item using all the item's properties so call it after setting all the item's properties.

Source:

getClassificationCode() → {string}

Source:
Returns:
  • Classification code.
Type
string

getCode() → {string}

Source:
Returns:
  • Item code.
Type
string

getDescription() → {string}

Source:
Returns:
  • Item description.
Type
string

getExemptionReasonCode() → {number}

Source:
Returns:
  • Exemption reason code.
Type
number

getIgvAmount() → {number}

Source:
Returns:
  • IGV amount.
Type
number

getIgvPercentage() → {number}

Source:
Returns:
  • IGV percentage.
Type
number

getIscAmount() → {number}

Source:
Returns:
  • ISC amount.
Type
number

getIscPercentage() → {number}

Source:
Returns:
  • ISC percentage.
Type
number

getLineExtensionAmount() → {number}

Source:
Returns:
  • Line extension amount.
Type
number

getPricingReferenceAmount() → {number}

Source:
Returns:
  • Pricing reference amount.
Type
number

getQuantity() → {number}

Source:
Returns:
  • Item quantity.
Type
number

getTaxTotalAmount() → {number}

Source:
Returns:
  • Tax total amount.
Type
number

getTaxableIgvAmount() → {number}

Source:
Returns:
  • Taxable IGV amount.
Type
number

getUnitCode() → {string}

Source:
Returns:
  • Unit code.
Type
string

getUnitValue() → {number}

Source:
Returns:
  • Unit value.
Type
number

setClassificationCode(cc)

Description:
  • According roll 25.

Source:
Parameters:
Name Type Description
cc string

Classification code.

setCode(c)

Source:
Parameters:
Name Type Description
c string

Item code.

setDescription(d)

Description:
  • Item description as product or service.

Source:
Parameters:
Name Type Description
d string

Item description.

setExemptionReasonCode(xrc)

Description:
  • Indicate how taxes affect them or not.

Source:
Parameters:
Name Type Description
xrc number

Exemption reason code.

setIgvPercentage(ip)

Description:
  • Percentage from 0 to 100.

Source:
Parameters:
Name Type Description
ip number

IGV percentage.

Throws:
  • If IGV percentage is inconsistent.
Type
Error

setIscPercentage(ip)

Source:
Parameters:
Name Type Description
ip number

ISC percentage.

Throws:
  • If ISC percentage is inconsistent.
Type
Error

setQuantity(q)

Description:
  • How many units of the item are being sold.

Source:
Parameters:
Name Type Description
q number

Item quantity.

setUnitCode(uc)

Description:
  • According roll 03.

Source:
Parameters:
Name Type Description
uc string

Unit code.

setUnitValue(uv, withoutIgv)

Description:
  • It's the value of one item without taxes.

Source:
Parameters:
Name Type Description
uv number

Unit value.

withoutIgv boolean

Whether the unit does not include IGV.