Delphi-PRAXiS
Seite 6 von 6   « Erste     456   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi und XRechnung (https://www.delphipraxis.net/204583-delphi-und-xrechnung.html)

dpKlaus 12. Dez 2023 09:10

AW: Delphi und XRechnung
 
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.

dpKlaus 12. Dez 2023 09:40

AW: Delphi und XRechnung
 
Ist es möglich, das das Prüfprogram das Problem ist?
Kann man die xml-Datei noch irgendwohin senden zum Prüfen?
Ich werde mal suchen.
Zunächst werde ich mal die Werte von 5 € und dazugehöriger MwSt für eine Rabattart ändern.

dpKlaus 12. Dez 2023 10:23

AW: Delphi und XRechnung
 
Es wird immer verwirrender:

ich hab zwei Rabatte eingeschaltet

//Nachlass zur Position
MultiplierFactorNumeric := 10; //10 Prozent auf 50 EUR
Amount := 5.00;
// MultiplierFactorNumeric := 16; //16 Prozent auf 50 EUR
// Amount := 8.00;

'Nachlass 2 ohne Angabe von Basisbetrag und Nachlassprozente.
MultiplierFactorNumeric := 0;
Amount := 5.00;
TaxPercent := 19.0;

Und im Variablenblock für beide Rabatte folgendes eingetragen

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;
inv.TaxInclusiveAmount := inv.TaxInclusiveAmount - 5.00 - 0.95 - 5.00 - 0.95;
inv.PayableAmount := inv.TaxInclusiveAmount;
end;

Keine Fehlermeldung, das Prüfprogramm akzeptiert die xml-Datei

Dann Werte bei Nachlass zur Position geändert:

//Nachlass zur Position
// MultiplierFactorNumeric := 10; //10 Prozent auf 50 EUR
// Amount := 5.00;
MultiplierFactorNumeric := 16; //16 Prozent auf 50 EUR
Amount := 8.00;

und bei

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

Fehlermeldung, das Prüfprogramm akzeptiert die xml-Datei nicht

Nochma wie gesagt, wenn ich nur eine der beiden oben im ersten Test genutzen Rabatte freischalte erhalte ich jeweils eine Fehlermeldung. Beide zusammen wie obengezeigt geht (????)

sh17 12. Dez 2023 10:28

AW: Delphi und XRechnung
 
wie gesagt, siehe PN, so kann ich hier nicht erkennen, was da wie gerechnet wird.


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:17 Uhr.
Seite 6 von 6   « Erste     456   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz