Show / Hide Table of Contents

Class SwicoBillInformation

Bill information (according to Swico S1) for automated processing of invoices.

Swico S1 (see http://swiss-qr-invoice.org/downloads/qr-bill-s1-syntax-de.pdf) is one of the supported standards for adding structured billing information to a QR bill (in the field StrdBkgInf).

Inheritance
object
SwicoBillInformation
Implements
IEquatable<SwicoBillInformation>
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Codecrete.SwissQRBill.Generator
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public class SwicoBillInformation : IEquatable<SwicoBillInformation>

Properties

| Edit this page View Source

CustomerReference

Gets or sets the customer reference.

Declaration
public string CustomerReference { get; set; }
Property Value
Type Description
string
| Edit this page View Source

DueDate

Gets the due date.

The due date is calculated from the invoice date and the payment condition with a discount of 0.

Declaration
public DateTime? DueDate { get; }
Property Value
Type Description
DateTime?
| Edit this page View Source

InvoiceDate

Gets or sets the invoice date.

Declaration
public DateTime? InvoiceDate { get; set; }
Property Value
Type Description
DateTime?
| Edit this page View Source

InvoiceNumber

Gets or sets the invoice number.

Declaration
public string InvoiceNumber { get; set; }
Property Value
Type Description
string
| Edit this page View Source

PaymentConditions

Gets or sets the payment conditions.

Each element in the list is a tuple of a payment discount (in percent) and a deadline (in days from the invoice date).

Declaration
public List<(decimal, int)> PaymentConditions { get; set; }
Property Value
Type Description
List<(decimal, int)>
Examples

If the list contained (2, 10), (0, 60), a discount of 2% applies if the payment is made by 10 days after invoice data. The payment is due 60 days after invoice date.

| Edit this page View Source

VatDate

Gets or sets the date when the goods or service were supplied.

Declaration
public DateTime? VatDate { get; set; }
Property Value
Type Description
DateTime?
Remarks

If this property is non-null, VatStartDate and VatEndDate must not be used.

| Edit this page View Source

VatEndDate

Gets or sets the end date of the period when the service was supplied (e.g. a subscription).

Declaration
public DateTime? VatEndDate { get; set; }
Property Value
Type Description
DateTime?
Remarks

If this property is non-null, VatStartDate must be set as well, and VatDate must not be used.

| Edit this page View Source

VatImportTaxes

Gets or sets a list of VAT import taxes.

Each element in the list is a tuple of VAT rate (in percent) and VAT amount (in QR bill currency). It indicates that the specified VAT rate was applied and resulted in the specified tax amount.

Declaration
public List<(decimal, decimal)> VatImportTaxes { get; set; }
Property Value
Type Description
List<(decimal, decimal)>
Examples

If the list contained (7.7, 48.37), (2.5, 12.4) for an invoice in CHF, a VAT rate of 7.7% has been applied to a part of the items resulting in CHF 48.37 in tax and a rate of 2.5% has been applied to another part of the items resulting in CHF 12.40 in tax.

| Edit this page View Source

VatNumber

Gets or sets the invoicing party's VAT number.

The number without any prefix, white space, separator or suffix, i.e. "106017086" instead of "CHE-106.017.086 MWST".

Declaration
public string VatNumber { get; set; }
Property Value
Type Description
string
| Edit this page View Source

VatRate

Gets or sets the VAT rate (in percent) in case the same rate applies to the entire invoice.

If different rates apply to invoice line items, this property is null and VatRateDetails is used instead.

Declaration
public decimal? VatRate { get; set; }
Property Value
Type Description
decimal?
| Edit this page View Source

VatRateDetails

Gets or sets a list of VAT rates.

Each element in the list is a tuple of VAT rate (in percent) and amount (in QR bill currency). It indicates that the specified VAT rate applies to the specified net amount (partial amount) of the invoice.

If a single VAT rate applies to the entire invoice, this list is null and VatRate is used instead.

Declaration
public List<(decimal, decimal)> VatRateDetails { get; set; }
Property Value
Type Description
List<(decimal, decimal)>
Examples

If the list contained (8, 1000), (2.5, 51.8), (7.7, 250) for an invoice in CHF, a VAT rate of 8% would apply to CHF 1000.00, 2.5% for CHF 51.80 and 7.7% for CHF 250.00.

| Edit this page View Source

VatStartDate

Gets or sets the start date of the period when the service was supplied (e.g. a subscription).

Declaration
public DateTime? VatStartDate { get; set; }
Property Value
Type Description
DateTime?
Remarks

If this property is non-null, VatEndDate must be set as well, and VatDate must not be used.

Methods

| Edit this page View Source

DecodeText(string)

Decodes the text of structured billing information and creates a SwicoBillInformation instance.

Declaration
public static SwicoBillInformation DecodeText(string text)
Parameters
Type Name Description
string text

The structured billing information encoded according to Swico S1 syntax.

Returns
Type Description
SwicoBillInformation

The decoded billing information.

| Edit this page View Source

EncodeAsText()

Encodes this bill information as a single text string suitable to be added to a Swiss QR bill.

Declaration
public string EncodeAsText()
Returns
Type Description
string

Encoded text

| Edit this page View Source

Equals(SwicoBillInformation)

Determines whether the specified bill information is equal to the current bill information.

Declaration
public bool Equals(SwicoBillInformation other)
Parameters
Type Name Description
SwicoBillInformation other

The bill information to compare with the current bill information.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

| Edit this page View Source

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
object.Equals(object)
| Edit this page View Source

GetHashCode()

Gets the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
object.GetHashCode()

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX