SimplifiedCreditNote class
A class representing a simplified credit note (or debit note) used in transactions.
The SimplifiedCreditNote class holds the necessary data for a credit note, including information about the supplier, customer, tax, items, and payment methods. It can also generate an XML representation of the credit note that can be used for reporting or invoicing.
Constructors
-
SimplifiedCreditNote.new({required int icv, required String id, required String uuid, required DateTime issueDate, required DateTime issueTime, required String currency, required IndividualParty customer, required List<
InvoiceLine> lines, required TaxDetails tax, required LegalMonetaryTotal monetaryTotal, required String pih, required BillingReference billingReference, required PaymentMeans paymentMeans, Delivery? delivery, AllowanceCharge? allowanceCharge}) - Constructor to initialize the SimplifiedCreditNote object with necessary values.
Properties
- allowanceCharge → AllowanceCharge?
-
Allowance or charge details, if applicable to the credit note.
final
- billingReference → BillingReference
-
The billing reference details associated with the credit note.
final
- currency → String
-
Currency used in the credit note (e.g., SAR for Saudi Riyals).
final
- customer → IndividualParty
-
The customer to whom the credit note is addressed.
final
- delivery → Delivery?
-
Delivery information, if applicable 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 (invoice 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
-
Payment means details specifying how the credit note will be paid.
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< String?> - Generates the XML file for the credit note and saves it 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 in a format required for reporting.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited