Пример #1
0
        private Contact ParseContact(dataPackDataPackItem i)
        {
            var customer = MatchContact(i.invoice.invoiceHeader.partnerIdentity.address);

            customer = MergeContact(i.invoice.invoiceHeader.partnerIdentity.address, customer);

            return(customer);
        }
Пример #2
0
        private IssuedInvoiceBase ParseInvoice(dataPackDataPackItem i, Contact contact)
        {
            var invoice = MatchInvoice(i.invoice.invoiceHeader.number.numberRequested.ToString());

            if (invoice != null)
            {
                return(MergeInvoice(i.invoice, invoice));
            }
            else
            {
                return(CreateInvoice(i.invoice, contact.Id));
            }
        }