Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
High performance receipt storage for retail networks
C#
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Docs
Source/ReceiptStream
Test/ReceiptStream.Tests
packages/NUnit.2.6.0.12054
.gitignore
README.md
ReceiptStream.sln
license.txt

README.md

Lokad ReceiptStream

By Joannes Vermorel, 2012

High-performance receipt storage intended for large retail networks.

Read the whitepaper (PDF) about ReceiptStream.

Visit us at Lokad.com

Sample code

// Hard-coding a receipt
var receipt = new Receipt 
{
    Date = new DateTime(2012, 5, 30),
    LoyaltyCard = 1013,
    Store = 555,

    Items = new Item[]
    {
        new Item
        {
            GTIN = "1234567890123",
            UnitPrice = 150, // in cents
            Discount = 0, // in cents
            Quantity = 1, 
            VatRate = 196 // per-thousands
        },
    }
};

// Writing the receipt
var stream = new MemoryStream();
var writer = new ReceiptWriter(stream);
writer.Write(receipt);

// Reading the receipt
stream.Position = 0;
var reader = new ReceiptReader(stream);
var receiptCopy = reader.Read();
Something went wrong with that request. Please try again.