StandardCreditNote class
A class representing a standard credit note used for issuing credit to a customer.
The StandardCreditNote class holds all necessary data for a credit note, including the customer and supplier information, the credit note lines (items), tax details, payment means, delivery information, and other related fields. It can generate the XML representation of the credit note, suitable for reporting and invoicing purposes.
Constructors
-
StandardCreditNote.new({required int icv, required String id, required String uuid, required DateTime issueDate, required DateTime issueTime, required String currency, required BusinessParty customer, required List<
InvoiceLine> lines, required TaxDetails tax, required LegalMonetaryTotal monetaryTotal, required String pih, required BillingReference billingReference, required PaymentMeans paymentMeans, required Delivery delivery, AllowanceCharge? allowanceCharge}) - Constructor to initialize the StandardCreditNote object with necessary values.
Properties
- allowanceCharge → AllowanceCharge?
-
The allowance or charge related to the credit note (if applicable).
final
- billingReference → BillingReference
-
The billing reference associated with the credit note.
final
- currency → String
-
Currency used in the credit note (e.g., SAR for Saudi Riyals).
final
- customer → BusinessParty
-
The customer to whom the credit note is issued.
final
- delivery → Delivery
-
The delivery information related to the credit note.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icv → int
-
Internal control number (ICV) for the credit note.
final
- id → String
-
Unique identifier for the credit note.
final
- issueDate → DateTime
-
The date the credit note was issued.
final
- issueTime → DateTime
-
The time the credit note was issued.
final
-
lines
→ List<
InvoiceLine> -
The list of items (credit note lines) associated with the credit note.
final
- monetaryTotal → LegalMonetaryTotal
-
The legal monetary total of the credit note (e.g., subtotal, taxes, total).
final
- paymentMeans → PaymentMeans
-
The payment means related to the credit note.
final
- pih → String
-
The PIH (Payment Instructions Header) or additional reference for the credit note.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supplier → MyBusinessInfo?
-
The supplier information, fetched from local storage.
no setter
- tax → TaxDetails
-
The tax details related to the credit note.
final
- uuid → String
-
Universal Unique Identifier (UUID) for the credit note.
final
Methods
-
generateAndSaveXml(
String fileName) → Future< void> - Generates and saves the XML representation of the credit note to a file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toXml(
) → String - Generates the XML representation of the credit note.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited