You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have discounts on each item, I will get the expected validation error:
Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount
Pfad: /ubl:Invoice/cac:InvoiceLine[1]
because partprice * quantity will be not the position price due the fact that the discount will be not considered.
therefore I have changed the tradeLineItem configuration as following:
TradeLineItem tradeLineItem = new TradeLineItem(pos.Pos.ToString())
{
// lineID = pos.Pos.ToString(),
SellerAssignedID = pos.ArtikelNummer,
Name = pos.Bezeichnung.UnmaskHTMLinString(),
Description = pos.Beschreibung.UnmaskHTMLinString(),
UnitCode = GetQuantityCodes(pos.Einheit), // Mengeneinheit
BilledQuantity = pos.Menge,
NetUnitPrice = pos.PPGesamt / pos.Menge,//pos.EP,
LineTotalAmount = pos.PPGesamt,
TaxPercent = pos.Steuersatz,
TaxType = TaxTypes.VAT,
TaxCategoryCode = GetTaxCategoryCodes(pos.SteuertypID),
BillingPeriodStart = Beleg.LeistungszeitraumBeginn,
BillingPeriodEnd = Beleg.LeistungszeitraumEnde,
};
// Rabatte zuweisen, falls vorhanden
if (pos.RabattGesamt > 0)
{
tradeLineItem.AddSpecifiedTradeAllowanceCharge(
isDiscount: true, // Rabatt
currency: CurrencyCodes.EUR,
basisAmount: pos.PPGesamt, // Der Basisbetrag, auf den sich der Rabatt bezieht
actualAmount: pos.RabattGesamt, // Rabattbetrag
reason: "Rabatt für Position " + pos.Pos // Optional: Grund für den Rabatt
);
}
// TradeLineItem der Beschreibung hinzufügen
desc.TradeLineItems.Add(tradeLineItem);
so checking the tradeLineItem during adding to list includes the TradeAllowanceCharge, but unfourtunately this information will be not part of the xml-file.
If I change item price to reduced item price and the I will pass the validation but at the end ,the discount information is missing in the invoice, which seems to be a problem- I think.
Do I something wrong or is this part not supported?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello again,
If I have discounts on each item, I will get the expected validation error:
Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount
Pfad: /ubl:Invoice/cac:InvoiceLine[1]
because partprice * quantity will be not the position price due the fact that the discount will be not considered.
therefore I have changed the tradeLineItem configuration as following:
TradeLineItem tradeLineItem = new TradeLineItem(pos.Pos.ToString())
{
// lineID = pos.Pos.ToString(),
SellerAssignedID = pos.ArtikelNummer,
Name = pos.Bezeichnung.UnmaskHTMLinString(),
Description = pos.Beschreibung.UnmaskHTMLinString(),
UnitCode = GetQuantityCodes(pos.Einheit), // Mengeneinheit
BilledQuantity = pos.Menge,
NetUnitPrice = pos.PPGesamt / pos.Menge,//pos.EP,
LineTotalAmount = pos.PPGesamt,
TaxPercent = pos.Steuersatz,
TaxType = TaxTypes.VAT,
TaxCategoryCode = GetTaxCategoryCodes(pos.SteuertypID),
BillingPeriodStart = Beleg.LeistungszeitraumBeginn,
BillingPeriodEnd = Beleg.LeistungszeitraumEnde,
};
so checking the tradeLineItem during adding to list includes the TradeAllowanceCharge, but unfourtunately this information will be not part of the xml-file.
If I change item price to reduced item price and the I will pass the validation but at the end ,the discount information is missing in the invoice, which seems to be a problem- I think.
Do I something wrong or is this part not supported?
Thanks in advance!
Robert
Beta Was this translation helpful? Give feedback.
All reactions