Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

High performance receipt storage for retail networks

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Docs
Octocat-spinner-32 Source
Octocat-spinner-32 Test
Octocat-spinner-32 packages
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 ReceiptStream.sln
Octocat-spinner-32 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.