示例#1
0
        internal USReceipt(RecognizedReceipt receipt)
            : base(receipt)
        {
            ReceiptType = ConvertUSReceiptType();

            MerchantAddress     = ConvertStringField("MerchantAddress", RecognizedForm.Fields);
            MerchantName        = ConvertStringField("MerchantName", RecognizedForm.Fields);
            MerchantPhoneNumber = ConvertPhoneNumberField("MerchantPhoneNumber", RecognizedForm.Fields);
            Subtotal            = ConvertFloatField("Subtotal", RecognizedForm.Fields);
            Tax             = ConvertFloatField("Tax", RecognizedForm.Fields);
            Tip             = ConvertFloatField("Tip", RecognizedForm.Fields);
            Total           = ConvertFloatField("Total", RecognizedForm.Fields);
            TransactionDate = ConvertDateField("TransactionDate", RecognizedForm.Fields);
            TransactionTime = ConvertTimeField("TransactionTime", RecognizedForm.Fields);

            Items = ConvertReceiptItems();
        }
示例#2
0
 internal RecognizedReceipt(RecognizedReceipt receipt)
 {
     ReceiptLocale  = receipt.ReceiptLocale;
     RecognizedForm = receipt.RecognizedForm;
 }
示例#3
0
 /// <summary>
 /// </summary>
 /// <returns></returns>
 public static USReceipt AsUSReceipt(this RecognizedReceipt receipt)
 {
     return(new USReceipt(receipt));
 }