InvoiceItem class
Represents an individual item in an invoice, including details such as description, quantity, unit price, taxable amount, VAT rate, and VAT amount.
The InvoiceItem class contains the necessary fields to represent a single item listed in an invoice, including pricing and VAT details. This is typically used in invoices for billing or tax reporting purposes.
Fields:
- description: A description of the item being billed.
- quantity: The quantity of the item.
- unitPrice: The price per unit of the item.
- taxableAmount: The taxable amount for the item (without VAT).
- vatRate: The VAT rate applied to the item (expressed as a percentage).
- vatAmount: The VAT amount for the item, calculated based on the VAT rate.
Constructors
- InvoiceItem.new({required String description, required int quantity, required double unitPrice, required double taxableAmount, required double vatRate, required double vatAmount})
- Constructs an InvoiceItem with the provided details.
Properties
- description → String
-
A description of the item being billed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- quantity → int
-
The quantity of the item.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taxableAmount → double
-
The taxable amount for the item (before VAT).
final
- unitPrice → double
-
The price per unit of the item.
final
- vatAmount → double
-
The VAT amount calculated based on the taxable amount and VAT rate.
final
- vatRate → double
-
The VAT rate applied to the item, expressed as a percentage.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the InvoiceItem instance to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited