Einzelnen Beitrag anzeigen

dpKlaus

Registriert seit: 1. Nov 2020
14 Beiträge
 
#51

AW: Delphi und XRechnung

  Alt 12. Dez 2023, 09:10
Guten Morgen!
Ja und ganau das ist das Problem. Hier die Kopie aus der Demo:

if cbAllowanceCharges.Checked then
begin
inv.LineAmount := inv.LineAmount; // - 5.00;
inv.AllowanceTotalAmount := 5.00;
inv.ChargeTotalAmount := 0;
inv.TaxAmountSubtotals[1].TaxableAmount := inv.TaxAmountSubtotals[1].TaxableAmount - 5.00; // - 5.00;
inv.TaxAmountSubtotals[1].TaxAmount := inv.TaxAmountSubtotals[1].TaxAmount - 0.95; // - 0.95;
inv.TaxAmountTotal := inv.TaxAmountTotal - 0.95; // - 0.95;
inv.TaxExclusiveAmount := inv.TaxExclusiveAmount - inv.AllowanceTotalAmount + inv.ChargeTotalAmount; // - 5.00; // zum Nachlass
inv.TaxInclusiveAmount := inv.TaxInclusiveAmount - 5.00 - 0.95; // - 5.00 - 0.95;
inv.PayableAmount := inv.TaxInclusiveAmount;
end;

Dann hab ich die Fehlermeldung. Wenn ich die Werte, die in die Variablen geschrieben werden mit ShowMessage ansehe stehen dort die richtigen Werte. An der Demo wurde auch so weit nichts geändert.

Hier mal die ShowMessage:


ShowMessage ('Summen 002'+ #13#13 +
'inv.LineAmount: ' + FloatToStr(inv.LineAmount, FormatSettings) + #13#13 +
'inv.AllowanceTotalAmount: ' + FloatToStr(inv.AllowanceTotalAmount, FormatSettings) + ' Abzuege' + #13#13 +
'inv.ChargeTotalAmount: ' + FloatToStr(inv.ChargeTotalAmount, FormatSettings) + ' Zuschlaege' + #13#13 +
'---------------------' + #13#13 +
'inv.TaxAmountSubtotals[0].TaxableAmount: ' + FloatToStr(inv.TaxAmountSubtotals[0].TaxableAmount, FormatSettings) + #13#13 +
'inv.TaxAmountSubtotals[0].TaxAmount: ' + FloatToStr(inv.TaxAmountSubtotals[0].TaxAmount, FormatSettings) + #13#13 +
'---------------------' + #13#13 +
'inv.TaxAmountSubtotals[1].TaxableAmount: ' + FloatToStr(inv.TaxAmountSubtotals[1].TaxableAmount, FormatSettings) + #13#13 +
'inv.TaxAmountSubtotals[1].TaxAmount: ' + FloatToStr(inv.TaxAmountSubtotals[1].TaxAmount, FormatSettings) + #13#13 +
'---------------------' + #13#13 +
'inv.TaxAmountTotal: ' + FloatToStr(inv.TaxAmountTotal, FormatSettings) + #13#13 +
'inv.TaxExclusiveAmount: ' + FloatToStr(inv.TaxExclusiveAmount, FormatSettings) + #13#13 +
'inv.TaxInclusiveAmount: ' + FloatToStr(inv.TaxInclusiveAmount, FormatSettings) + #13#13 +
'inv.PayableAmount: ' + FloatToStr(inv.PayableAmount, FormatSettings));

Ich kann gern die Demo, wie ich sie verwende zur Verfügung stellen, wenn es hilft Licht ins Dunkle zu bringen.
  Mit Zitat antworten Zitat