izibiz / ws-client-dotnet Goto Github PK
View Code? Open in Web Editor NEWIZIBIZ Webservice Entegrayon Projesi - .NET
IZIBIZ Webservice Entegrayon Projesi - .NET
Merhaba,
BaseInvoiceUBL.cs clasında invoiceTaxTotal fonksiyonu KDV oranlarına göre gruplama işlevini gerçekleştirmiyor. Her defasında ilk KDV satırını almaktadır.
Aşağıdaki fonksiyonu kullanabilirsiniz.
public virtual TaxTotalType[] invoiceTaxTotal()
{
List taxTotalList = new List();
List taxSubTotalList = new List();
TaxTotalType taxTotal = new TaxTotalType { TaxAmount = new TaxAmountType { Value = 0 } };
foreach (var line in baseInvoiceUBL.InvoiceLine)
{
taxTotal.TaxAmount.Value += line.TaxTotal.TaxAmount.Value;
taxTotal.TaxAmount.currencyID = line.TaxTotal.TaxAmount.currencyID;
foreach (var tax in line.TaxTotal.TaxSubtotal)
{
var taxSubTotal = taxSubTotalList.Where(x=>x.Percent.Value == tax.Percent.Value).FirstOrDefault();
if (taxSubTotal != null)
{
taxSubTotal.TaxableAmount.Value += tax.TaxableAmount.Value;
taxSubTotal.TaxAmount.Value += line.TaxTotal.TaxAmount.Value;
}
else //yoksa ekle
{
TaxSubtotalType taxSubtotalNew = new TaxSubtotalType();
taxSubtotalNew.TaxableAmount = new TaxableAmountType { Value = tax.TaxableAmount.Value, currencyID = tax.TaxableAmount.currencyID };
taxSubtotalNew.TaxAmount = new TaxAmountType { Value = line.TaxTotal.TaxAmount.Value, currencyID = tax.TaxAmount.currencyID };
taxSubtotalNew.Percent = new PercentType1 { Value = tax.Percent.Value };
taxSubtotalNew.TaxCategory = new TaxCategoryType();
if (tax.Percent.Value == 0)
{
taxSubtotalNew.TaxCategory.TaxExemptionReasonCode = new TaxExemptionReasonCodeType { Value = "351" };
taxSubtotalNew.TaxCategory.TaxExemptionReason = new TaxExemptionReasonType { Value = "ReasonTaxExemtion" };//Reson Value hard code basıldı
//istenırse formdan da alınabılır
}
taxSubtotalNew.TaxCategory.TaxScheme = new TaxSchemeType();
taxSubtotalNew.TaxCategory.TaxScheme.Name = new NameType1 { Value = nameof(EI.TaxType.KDV) };
taxSubtotalNew.TaxCategory.TaxScheme.TaxTypeCode = new TaxTypeCodeType { Value = "0015" };
taxSubTotalList.Add(taxSubtotalNew);
}
}
}
taxTotal.TaxSubtotal = taxSubTotalList.ToArray();
taxTotalList.Add(taxTotal);
return taxTotalList.ToArray();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.