Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   XRechnung Felder und Ihre Bedeutung (Skonto etc.) (https://www.delphipraxis.net/216107-xrechnung-felder-und-ihre-bedeutung-skonto-etc.html)

mlc42 29. Okt 2024 10:57

XRechnung Felder und Ihre Bedeutung (Skonto etc.)
 
Die Skonto Angabe in XRechnung wird ja im UBL in ein Note eingebettet.
In Beispielen finde ich immer 1 oder 2 Skontobedingungen.

Nun habe ich leider 3 Skontostufen z.B.: 8 Tage 3 %, 30 Tage 2%, 60 Tage netto.

In der Bibliothek von sh17 sind nur 2 möglich.
Ich hab das zunächstmal für UBL auf 3 erweitert. Das scheint auch zu klappen.
Spricht etwas dagegen ?

Martin

BlueStarHH 29. Okt 2024 11:17

AW: XRechnung Felder und Ihre Bedeutung (Skonto etc.)
 
Sicher, dass Du für Dein Beispiel 3 Stufen haben musst?

Reichen nicht 8 Tage 3 % und 30 Tage 2%?

Die 60 Tage netto dann als normale Fällgkeit hinterlegen.

mlc42 29. Okt 2024 11:22

AW: XRechnung Felder und Ihre Bedeutung (Skonto etc.)
 
Also das InvoiceDueDate auf 60 und nur die beiden anderen in die Skontoangabe.
Wäre denkbar, falls nicht einer meiner Anwender mal im dritten Skonto auch Prozente angegeben hat.
Vermutlich eher nicht. Ab weiß man schon was Anwender in Felder tippen die da sind ?

sh17 29. Okt 2024 12:03

AW: XRechnung Felder und Ihre Bedeutung (Skonto etc.)
 
Als laut Doku gibt es keine Einschränkung bezüglich der Anzahl.

mlc42 29. Okt 2024 13:53

AW: XRechnung Felder und Ihre Bedeutung (Skonto etc.)
 
So sehe ich das auch.

Hab dann mal die Typen geändert, Felder ergänzt und folgendes eingefügt:

//UNCEFAKT

iptt_CashDiscount3:
begin
AddChild('ram:Description').Text := Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount1Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount1Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount1Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount1Base)+'#','')+
#13#10+
Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount2Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount2Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount2Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount2Base)+'#','')+
#13#10+
Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount3Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount3Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount3Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount3Base)+'#','')+
#13#10;
end;



//UBL

iptt_CashDiscount3: //MLSQL 28.10.2024 Erweitert
begin
with xRoot.AddChild('cac:PaymentTerms') do
begin
AddChild('cbc:Note').Text := Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount1Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount1Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount1Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount1Base)+'#','')+
#13#10+

Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount2Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount2Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount2Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount2Base)+'#','')+#13#10+

Format('#SKONTO#TAGE=%d#PROZENT=%s#',
[_Invoice.PaymentTermCashDiscount3Days,
TXRechnungHelper.FloatToStr(_Invoice.PaymentTermCa shDiscount3Percent)])+
IfThen(_Invoice.PaymentTermCashDiscount3Base <> 0,'BASISBETRAG='+
TXRechnungHelper.AmountToStr(_Invoice.PaymentTermC ashDiscount3Base)+'#','')+#13#10;
end;
end;

Das Erzeugen funktioniert damit.

Die Loadfunktionen habe ich noch nicht angepasst.


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:49 Uhr.

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