-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathintf.ZUGFeRDTradeAllowanceCharge.pas
115 lines (105 loc) · 4.18 KB
/
intf.ZUGFeRDTradeAllowanceCharge.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.}
unit intf.ZUGFeRDTradeAllowanceCharge;
interface
uses
intf.ZUGFeRDCharge,intf.ZUGFeRDCurrencyCodes,
intf.ZUGFeRDAllowanceOrChargeIdentificationCodes,
intf.ZUGFeRDSpecialServiceDescriptionCodes
;
type
/// <summary>
/// Zu- und Abschlag
///
/// Beispiel:
/// <SpecifiedTradeAllowanceCharge>
/// <ChargeIndicator>false</ChargeIndicator>
/// <BasisAmount currencyID="EUR">137.30</BasisAmount>
/// <ActualAmount>13.73</ActualAmount>
/// <Reason>Sondernachlass</Reason>
/// <CategoryTradeTax>
/// <TypeCode>VAT</TypeCode>
/// <CategoryCode>S</CategoryCode>
/// <ApplicablePercent>7</ApplicablePercent>
/// </CategoryTradeTax>
/// </SpecifiedTradeAllowanceCharge>
/// </summary>
TZUGFeRDTradeAllowanceCharge = class(TZUGFeRDCharge)
private
FChargeIndicator: Boolean;
FReason: string;
FBasisAmount: Currency;
FCurrency: TZUGFeRDCurrencyCodes;
FActualAmount: Currency;
FChargePercentage: Currency;
FReasonCodeAllowance: TZUGFeRDAllowanceOrChargeIdentificationCodes;
FReasonCodeCharge: TZUGFeRDSpecialServiceDescriptionCodes;
public
constructor Create;
public
/// <summary>
/// Switch for discount and surcharge
///
/// false: Discount
/// true: Surcharge
///
/// In case of a discount (BG-27) the value of the ChargeIndicators has to be "false". In case of a surcharge (BG-28) the value of the ChargeIndicators has to be "true".
/// </summary>
property ChargeIndicator: Boolean read FChargeIndicator write FChargeIndicator;
/// <summary>
/// The reason code - one tag -> 2 Types
/// </summary>
property ReasonCodeAllowance : TZUGFeRDAllowanceOrChargeIdentificationCodes read FReasonCodeAllowance write FReasonCodeAllowance;
property ReasonCodeCharge : TZUGFeRDSpecialServiceDescriptionCodes read FReasonCodeCharge write FReasonCodeCharge;
/// <summary>
/// The reason for the surcharge or discount in written form
/// </summary>
property Reason: string read FReason write FReason;
/// <summary>
/// The base amount that may be used in conjunction with the percentage of the invoice line discount to calculate the amount of the invoice line discount
/// </summary>
property BasisAmount: Currency read FBasisAmount write FBasisAmount;
/// <summary>
/// Currency that is used for representing BasisAmount and ActualAmount
/// </summary>
property Currency: TZUGFeRDCurrencyCodes read FCurrency write FCurrency;
/// <summary>
/// The amount of the discount / surcharge or discount without VAT
/// </summary>
property ActualAmount: Currency read FActualAmount write FActualAmount;
/// <summary>
/// The percentage that may be used in conjunction with the document level discount base amount, to calculate the
/// document level discount amount.
/// BT-101
/// </summary>
property ChargePercentage : Currency read FChargePercentage write FChargePercentage;
end;
implementation
{ TZUGFeRDTradeAllowanceCharge }
constructor TZUGFeRDTradeAllowanceCharge.Create;
begin
inherited Create;
FChargeIndicator:= false;
FReason:= '';
FBasisAmount:= 0;
FCurrency:= TZUGFeRDCurrencyCodes.Unknown;
FActualAmount:= 0;
FChargePercentage:= 0;
FReasonCodeAllowance:= TZUGFeRDAllowanceOrChargeIdentificationCodes.Unknown;
FReasonCodeCharge := TZUGFeRDSpecialServiceDescriptionCodes.Unknown;
end;
end.