Git Product home page Git Product logo

e-arsiv-fatura-dotnet's People

Contributors

bfydigital avatar danshaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

e-arsiv-fatura-dotnet's Issues

Ondalıklı rakamlardan oluşan faturalar sisteme gönderilemiyor.

Aşağıdaki gibi düzenlediğim kodlarda {faturaService.CreateDraftInvoice(data);} ile taslak fatura oluşturduğumda eğer faturada ondalıklı sayılar varsa fatura hiç gitmiyor sisteme işin içinden çıkamadım her türlü şeyi denedim. .Replace(",", "."), komutunu denedim olmadı. Yardım edebilir misiniz?

                foreach (DataGridViewRow row in DataGridView1.Rows)
            {
               
                string itemName = row.Cells[0].Value.ToString();
                int quantity = Convert.ToInt32(row.Cells[1].Value);

                InvoiceDetailsItemModel item = new InvoiceDetailsItemModel()
                {
                    name = itemName,
                    quantity = quantity,
                    unitPrice = Convert.ToDecimal(row.Cells[3].Value.ToString()),
                    price = Convert.ToDecimal(row.Cells[3].Value.ToString()) * quantity,
                    VATRate = Convert.ToInt32(row.Cells[4].Value.ToString()),
                    VATAmount = Convert.ToDecimal(row.Cells[3].Value.ToString()) * quantity * Convert.ToInt32(row.Cells[4].Value.ToString()) / 100

                };
                
                itemList.Add(item);
             
            }
        var configuration = FaturaServiceConfigurationFactory.Create(); 
 var data = new InvoiceDetailsModel()
            {
                
                date = tarih.Value.ToString("dd/MM/yyyy").Replace(".", "/"),
                time = DateTime.Now.ToString("HH:mm:ss"),
                taxIDOrTRID = vergikimlik.Text,
                taxOffice = vergidairesi.Text,
                title = YeniUnvan,
                name = adi.Text,
                surname = soyadi.Text,
                fullAddress = adres.Text,
                items = itemList,               
                totalVAT = Convert.ToDecimal(hesaplananKDV),
                grandTotal = Convert.ToDecimal(toplamTutar),
                grandTotalInclVAT = Convert.ToDecimal(vergilerDahil),
                paymentTotal = Convert.ToDecimal(vergilerDahil),
            };
            

            faturaService.CreateDraftInvoice(data);

GetInvoiceHTML response dönmüyor

Merhabalar,

Token almama rağmen GetInvoiceHTML methodu ile komut cevap dönmüyor, ayrıca GetAllInvoicesByDateRange gibi komutlarda response dönmüyor, nerede hata yapıyor olabilirim? E-arsiv canlıya bağlandım, herhangi bir izin vs. gerekiyor mu?

resim

Asp.Net MVC (.net framewrok v4.8) Desteği Hk

Öncelikle bu kütüphaneyi C# diline port ettiğiniz için teşekkürler. Yıllar önce başladığım Asp.Net MVC 5 projem .net framewrok 4.8 üzerinde çalışıyor. Bu kütüphane ise .net core üzerinden yapılmış. Kendi projem üzerinde nasıl kullanabilirim? Şimdiden teşekkürler

Blazor da dll olarak kullanımda Access-Control-Allow-Origin hatası alıyorum.

Blazor kodu
var configuration = FaturaServiceConfigurationFactory.Create();
configuration.ServiceType = ServiceType.Prod;
configuration.Username = "xxxxxxx";
configuration.Password = "xxxxxxx";
FaturaService faturaService = new(configuration);
faturaService.GetToken().Wait();

    Alınan Hata
    Access to fetch at 'https://earsivportal.efatura.gov.tr/earsiv-services/assos-login' from origin 'http://localhost:5120' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Token alınamıyor.

The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

ignDraftInvoice funksiyionunu bir türlü çalıştırmadım

İmzala SignDraftInvoice funksiyionunu bir türlü çalıştırmadım.
Kodla imza üretmeyi tetikleye bilen var mı?

Kullanımım aşağıdaki gibidir.
var invoice= await faturaService.FindDraftInvoice(date, uuid);
var fatura = faturaService.SignDraftInvoice(invoice).GetAwaiter().GetResult();

Token Alma Problemi

faturaService.GetToken().Wait(); satırında kalıyor ve bir türlü ilerlemiyor. Tokeni alamıyorum ne yapmam gerekiyor?

GetDownloadURL ile download edemiyorum.

Öncelikle emeği geçenlere teşekkür ediyorum.
GetDownloadURL komutu ile dosya indiremiyorum. Tüm parametrelere token, uuid vs ulaşıyorum.
Yardımlarınızı bekliyorum.
İşte örnek kodlarım:
var configuration = FaturaServiceConfigurationFactory.Create();
configuration.ServiceType = ServiceType.Prod;
configuration.Username = "********"; //gizlendi
configuration.Password = "*******"; //gizlendi
FaturaService faturaService = new FaturaService(configuration);
faturaService.GetToken().Wait();
//var faturalar = faturaService.GetAllInvoicesByDateRange(DateTime.Now.AddDays(-7), DateTime.Now).GetAwaiter().GetResult();
DateTime tarih = new DateTime(2022, 1, 22);
var faturalar = faturaService.GetAllInvoicesByDateRange(tarih, tarih).GetAwaiter().GetResult();
for (int i = 0; i < faturalar.data.Count; i++)
{
string ettn = faturalar.data[i].ettn;
Console.WriteLine(ettn);
faturaService.GetDownloadURL(ettn, true); //burası çalışmıyor indirmiyor
faturaService.GetInvoiceHTML(ettn).GetAwaiter().GetResult(); //burası düzgün çalışıyor
}
Console.ReadLine();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.