correction of interface based intra community supply
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
/**
|
||||
* *********************************************************************
|
||||
* <p>
|
||||
* Copyright 2018 Jochen Staerk
|
||||
*
|
||||
* <p>
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* <p>
|
||||
* Licensed 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.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************** */
|
||||
* <p>
|
||||
* **********************************************************************
|
||||
*/
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -78,7 +80,7 @@ public interface IZUGFeRDExportableProduct {
|
||||
/**
|
||||
* Get the ID that had been assigned by the seller to
|
||||
* identify the product
|
||||
*
|
||||
*
|
||||
* @return seller assigned product ID
|
||||
*/
|
||||
default String getSellerAssignedID() {
|
||||
@@ -88,33 +90,34 @@ public interface IZUGFeRDExportableProduct {
|
||||
/**
|
||||
* Get the ID that had been assigned by the buyer to
|
||||
* identify the product
|
||||
*
|
||||
*
|
||||
* @return buyer assigned product ID
|
||||
*/
|
||||
default String getBuyerAssignedID() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* VAT percent of the product (e.g. 19, or 5.1 if you like)
|
||||
*
|
||||
* @return VAT percent of the product
|
||||
*/
|
||||
BigDecimal getVATPercent();
|
||||
|
||||
|
||||
default boolean isIntraCommunitySupply() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
default String getTaxCategoryCode() {
|
||||
if (getVATPercent().equals(new BigDecimal(0))) {
|
||||
if (isIntraCommunitySupply()) {
|
||||
return "K";
|
||||
} else if (getVATPercent().equals(new BigDecimal(0))) {
|
||||
return "Z"; // zero rated goods
|
||||
} else if (isIntraCommunitySupply()) {
|
||||
return "K";
|
||||
} else {
|
||||
return "S"; // one of the "standard" rates (not neccessarily a default rate, even a deducted VAT is standard calculation)
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return "S"; // one of the "standard" rates (not neccessarily a default rate, even a deducted VAT is standard calculation)
|
||||
}
|
||||
}
|
||||
|
||||
default String getTaxExemptionReason() {
|
||||
if (isIntraCommunitySupply())
|
||||
return "Intra-community supply";
|
||||
|
||||
Reference in New Issue
Block a user