|
|
|
|
@@ -0,0 +1,358 @@
|
|
|
|
|
/**
|
|
|
|
|
* *********************************************************************
|
|
|
|
|
* <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 static org.mustangproject.ZUGFeRD.ZUGFeRDDateFormat.DATE;
|
|
|
|
|
import static org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants.CORRECTEDINVOICE;
|
|
|
|
|
import static org.mustangproject.ZUGFeRD.model.TaxCategoryCodeTypeConstants.CATEGORY_CODES_WITH_EXEMPTION_REASON;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.logging.Level;
|
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
|
|
|
|
|
import org.mustangproject.*;
|
|
|
|
|
|
|
|
|
|
public class DAPullProvider extends ZUGFeRD2PullProvider implements IXMLProvider {
|
|
|
|
|
|
|
|
|
|
protected IExportableTransaction trans;
|
|
|
|
|
private String paymentTermsDescription;
|
|
|
|
|
protected Profile profile = Profiles.getByName(EStandard.deliveradvice,"pilot", 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void generateXML(IExportableTransaction trans) {
|
|
|
|
|
this.trans = trans;
|
|
|
|
|
boolean hasDueDate = false;
|
|
|
|
|
final SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
|
|
|
|
|
|
|
|
|
final String exemptionReason = "";
|
|
|
|
|
|
|
|
|
|
String senderReg = "";
|
|
|
|
|
if (trans.getOwnOrganisationFullPlaintextInfo() != null) {
|
|
|
|
|
senderReg = "<ram:IncludedNote><ram:Content>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getOwnOrganisationFullPlaintextInfo()) + "</ram:Content>"
|
|
|
|
|
+ "<ram:SubjectCode>REG</ram:SubjectCode></ram:IncludedNote>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String subjectNote = "";
|
|
|
|
|
if (trans.getSubjectNote() != null) {
|
|
|
|
|
subjectNote = "<ram:IncludedNote><ram:Content>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getSubjectNote()) + "</ram:Content>"
|
|
|
|
|
+ "</ram:IncludedNote>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final String typecode = "220";
|
|
|
|
|
/*if (trans.getDocumentCode() != null) {
|
|
|
|
|
typecode = trans.getDocumentCode();
|
|
|
|
|
}*/
|
|
|
|
|
String notes = "";
|
|
|
|
|
if (trans.getNotes() != null) {
|
|
|
|
|
for (final String currentNote : trans.getNotes()) {
|
|
|
|
|
notes += "<ram:IncludedNote><ram:Content>" + XMLTools.encodeXML(currentNote) + "</ram:Content></ram:IncludedNote>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String testBooleanStr="true";
|
|
|
|
|
String xml = "<SCRDMCCBDACIDAMessageStructure\n" +
|
|
|
|
|
" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:25\"\n" +
|
|
|
|
|
" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:101\"\n" +
|
|
|
|
|
" xmlns:px=\"urn:un:unece:uncefact:data:standard:SCRDMCCBDACIDAMessageStructure:1\">\n"
|
|
|
|
|
// + "
|
|
|
|
|
// xsi:schemaLocation=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100
|
|
|
|
|
// ../Schema/ZUGFeRD1p0.xsd\""
|
|
|
|
|
+ "<px:ExchangedDocumentContext>"
|
|
|
|
|
// + "
|
|
|
|
|
+" <ram:TestIndicator><udt:Indicator>"+testBooleanStr+"</udt:Indicator></ram:TestIndicator>\n"
|
|
|
|
|
//
|
|
|
|
|
+ "<ram:BusinessProcessSpecifiedDocumentContextParameter>"
|
|
|
|
|
+ "<ram:ID>" + getProfile().getID() + "</ram:ID>"
|
|
|
|
|
+ "</ram:BusinessProcessSpecifiedDocumentContextParameter>"
|
|
|
|
|
+ "</px:ExchangedDocumentContext>"
|
|
|
|
|
+ "<px:ExchangedDocument>"
|
|
|
|
|
+ "<ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>"
|
|
|
|
|
// + " <ram:Name>RECHNUNG</ram:Name>"
|
|
|
|
|
// + "<ram:TypeCode>380</ram:TypeCode>"
|
|
|
|
|
+ "<ram:TypeCode>" + typecode + "</ram:TypeCode>"
|
|
|
|
|
+ "<ram:IssueDateTime>"
|
|
|
|
|
+ DATE.udtFormat(trans.getIssueDate()) + "</ram:IssueDateTime>" // date
|
|
|
|
|
+ notes
|
|
|
|
|
+ subjectNote
|
|
|
|
|
+ senderReg
|
|
|
|
|
|
|
|
|
|
+ "</px:ExchangedDocument>"
|
|
|
|
|
+ "<px:SupplyChainTradeTransaction>";
|
|
|
|
|
int lineID = 0;
|
|
|
|
|
for (final IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
|
|
|
|
lineID++;
|
|
|
|
|
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
|
|
|
|
// exemptionReason = "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
|
|
|
|
}
|
|
|
|
|
notes = "";
|
|
|
|
|
if (currentItem.getNotes() != null) {
|
|
|
|
|
for (final String currentNote : currentItem.getNotes()) {
|
|
|
|
|
notes = notes + "<ram:IncludedNote><ram:Content>" + XMLTools.encodeXML(currentNote) + "</ram:Content></ram:IncludedNote>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
final LineCalculator lc = new LineCalculator(currentItem);
|
|
|
|
|
xml += "<ram:IncludedSupplyChainTradeLineItem>" +
|
|
|
|
|
"<ram:AssociatedDocumentLineDocument>"
|
|
|
|
|
+ "<ram:LineID>" + lineID + "</ram:LineID>"
|
|
|
|
|
+ notes
|
|
|
|
|
+ "</ram:AssociatedDocumentLineDocument>"
|
|
|
|
|
|
|
|
|
|
+ "<ram:SpecifiedTradeProduct>";
|
|
|
|
|
// + " <GlobalID schemeID=\"0160\">4012345001235</GlobalID>"
|
|
|
|
|
if (currentItem.getProduct().getSellerAssignedID() != null) {
|
|
|
|
|
xml += "<ram:SellerAssignedID>"
|
|
|
|
|
+ XMLTools.encodeXML(currentItem.getProduct().getSellerAssignedID()) + "</ram:SellerAssignedID>";
|
|
|
|
|
}
|
|
|
|
|
if (currentItem.getProduct().getBuyerAssignedID() != null) {
|
|
|
|
|
xml += "<ram:BuyerAssignedID>"
|
|
|
|
|
+ XMLTools.encodeXML(currentItem.getProduct().getBuyerAssignedID()) + "</ram:BuyerAssignedID>";
|
|
|
|
|
}
|
|
|
|
|
String allowanceChargeStr = "";
|
|
|
|
|
if (currentItem.getItemAllowances() != null && currentItem.getItemAllowances().length > 0) {
|
|
|
|
|
for (final IZUGFeRDAllowanceCharge allowance : currentItem.getItemAllowances()) {
|
|
|
|
|
allowanceChargeStr += getAllowanceChargeStr(allowance, currentItem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (currentItem.getItemCharges() != null && currentItem.getItemCharges().length > 0) {
|
|
|
|
|
for (final IZUGFeRDAllowanceCharge charge : currentItem.getItemCharges()) {
|
|
|
|
|
allowanceChargeStr += getAllowanceChargeStr(charge, currentItem);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xml += "<ram:Name>" + XMLTools.encodeXML(currentItem.getProduct().getName()) + "</ram:Name>"
|
|
|
|
|
+ "<ram:Description>" + XMLTools.encodeXML(currentItem.getProduct().getDescription())
|
|
|
|
|
+ "</ram:Description>"
|
|
|
|
|
+ "</ram:SpecifiedTradeProduct>"
|
|
|
|
|
|
|
|
|
|
+ "<ram:SpecifiedLineTradeDelivery>"
|
|
|
|
|
+ "<ram:DespatchedQuantity unitCode=\"" + XMLTools.encodeXML(currentItem.getProduct().getUnit()) + "\">"
|
|
|
|
|
+ quantityFormat(currentItem.getQuantity()) + "</ram:DespatchedQuantity>"
|
|
|
|
|
+ "</ram:SpecifiedLineTradeDelivery>"
|
|
|
|
|
+ "<ram:SpecifiedLineTradeSettlement>";
|
|
|
|
|
if ((currentItem.getDetailedDeliveryPeriodFrom() != null) || (currentItem.getDetailedDeliveryPeriodTo() != null)) {
|
|
|
|
|
xml += "<ram:BillingSpecifiedPeriod>";
|
|
|
|
|
if (currentItem.getDetailedDeliveryPeriodFrom() != null) {
|
|
|
|
|
xml += "<ram:StartDateTime>" + DATE.udtFormat(currentItem.getDetailedDeliveryPeriodFrom()) + "</ram:StartDateTime>";
|
|
|
|
|
}
|
|
|
|
|
if (currentItem.getDetailedDeliveryPeriodTo() != null) {
|
|
|
|
|
xml += "<ram:EndDateTime>" + DATE.udtFormat(currentItem.getDetailedDeliveryPeriodTo()) + "</ram:EndDateTime>";
|
|
|
|
|
}
|
|
|
|
|
xml += "</ram:BillingSpecifiedPeriod>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xml += "<ram:SpecifiedTradeSettlementLineMonetarySummation>"
|
|
|
|
|
+ "<ram:LineTotalAmount>" + currencyFormat(lc.getItemTotalNetAmount())
|
|
|
|
|
+ "</ram:LineTotalAmount>" // currencyID=\"EUR\"
|
|
|
|
|
+ "</ram:SpecifiedTradeSettlementLineMonetarySummation>";
|
|
|
|
|
/* if (currentItem.getAdditionalReferencedDocumentID() != null) {
|
|
|
|
|
xml += "<ram:AdditionalReferencedDocument><ram:IssuerAssignedID>" + currentItem.getAdditionalReferencedDocumentID() + "</ram:IssuerAssignedID><ram:TypeCode>130</ram:TypeCode></ram:AdditionalReferencedDocument>";
|
|
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
xml += "</ram:SpecifiedLineTradeSettlement>"
|
|
|
|
|
+ "</ram:IncludedSupplyChainTradeLineItem>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xml += "<ram:ApplicableHeaderTradeAgreement>";
|
|
|
|
|
if (trans.getReferenceNumber() != null) {
|
|
|
|
|
xml += "<ram:BuyerReference>" + XMLTools.encodeXML(trans.getReferenceNumber()) + "</ram:BuyerReference>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
xml += "<ram:SellerTradeParty>"
|
|
|
|
|
+ getTradePartyAsXML(trans.getSender(), true, false)
|
|
|
|
|
+ "</ram:SellerTradeParty>"
|
|
|
|
|
+ "<ram:BuyerTradeParty>";
|
|
|
|
|
// + " <ID>GE2020211</ID>"
|
|
|
|
|
// + " <GlobalID schemeID=\"0088\">4000001987658</GlobalID>"
|
|
|
|
|
|
|
|
|
|
xml += getTradePartyAsXML(trans.getRecipient(), false, false);
|
|
|
|
|
xml += "</ram:BuyerTradeParty>";
|
|
|
|
|
|
|
|
|
|
if (trans.getSellerOrderReferencedDocumentID() != null) {
|
|
|
|
|
xml += "<ram:SellerOrderReferencedDocument>"
|
|
|
|
|
+ "<ram:IssuerAssignedID>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getSellerOrderReferencedDocumentID()) + "</ram:IssuerAssignedID>"
|
|
|
|
|
+ "</ram:SellerOrderReferencedDocument>";
|
|
|
|
|
}
|
|
|
|
|
if (trans.getBuyerOrderReferencedDocumentID() != null) {
|
|
|
|
|
xml += "<ram:BuyerOrderReferencedDocument>"
|
|
|
|
|
+ "<ram:IssuerAssignedID>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getBuyerOrderReferencedDocumentID()) + "</ram:IssuerAssignedID>"
|
|
|
|
|
+ "</ram:BuyerOrderReferencedDocument>";
|
|
|
|
|
}
|
|
|
|
|
if (trans.getContractReferencedDocument() != null) {
|
|
|
|
|
xml += "<ram:ContractReferencedDocument>"
|
|
|
|
|
+ "<ram:IssuerAssignedID>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getContractReferencedDocument()) + "</ram:IssuerAssignedID>"
|
|
|
|
|
+ "</ram:ContractReferencedDocument>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Additional Documents of XRechnung (Rechnungsbegruendende Unterlagen - BG-24 XRechnung)
|
|
|
|
|
if (trans.getAdditionalReferencedDocuments() != null) {
|
|
|
|
|
for (final FileAttachment f : trans.getAdditionalReferencedDocuments()) {
|
|
|
|
|
final String documentContent = new String(Base64.getEncoder().encodeToString(f.getData()));
|
|
|
|
|
xml += "<ram:AdditionalReferencedDocument>"
|
|
|
|
|
+ "<ram:IssuerAssignedID>" + f.getFilename() + "</ram:IssuerAssignedID>"
|
|
|
|
|
+ "<ram:TypeCode>916</ram:TypeCode>"
|
|
|
|
|
+ "<ram:Name>" + f.getDescription() + "</ram:Name>"
|
|
|
|
|
+ "<ram:AttachmentBinaryObject mimeCode=\"" + f.getMimetype() + "\"\n"
|
|
|
|
|
+ "filename=\"" + f.getFilename() + "\">" + documentContent + "</ram:AttachmentBinaryObject>"
|
|
|
|
|
+ "</ram:AdditionalReferencedDocument>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (trans.getSpecifiedProcuringProjectID() != null) {
|
|
|
|
|
xml += "<ram:SpecifiedProcuringProject>"
|
|
|
|
|
+ "<ram:ID>"
|
|
|
|
|
+ XMLTools.encodeXML(trans.getSpecifiedProcuringProjectID()) + "</ram:ID>";
|
|
|
|
|
if (trans.getSpecifiedProcuringProjectName() != null) {
|
|
|
|
|
xml += "<ram:Name >" + XMLTools.encodeXML(trans.getSpecifiedProcuringProjectName()) + "</ram:Name>";
|
|
|
|
|
}
|
|
|
|
|
xml += "</ram:SpecifiedProcuringProject>";
|
|
|
|
|
}
|
|
|
|
|
xml += "</ram:ApplicableHeaderTradeAgreement>"
|
|
|
|
|
+ "<ram:ApplicableHeaderTradeDelivery>";
|
|
|
|
|
if (this.trans.getDeliveryAddress() != null) {
|
|
|
|
|
xml += "<ram:ShipToTradeParty>" +
|
|
|
|
|
getTradePartyAsXML(this.trans.getDeliveryAddress(), false, true) +
|
|
|
|
|
"</ram:ShipToTradeParty>";
|
|
|
|
|
}
|
|
|
|
|
xml += " <ram:ActualDespatchSupplyChainEvent>\n" +
|
|
|
|
|
" <ram:OccurrenceDateTime>\n" +
|
|
|
|
|
" <udt:DateTimeString\n" +
|
|
|
|
|
" format=\"102\">"+ DATE.udtFormat(trans.getDeliveryDate() )+"</udt:DateTimeString>\n" +
|
|
|
|
|
" </ram:OccurrenceDateTime>\n" +
|
|
|
|
|
" </ram:ActualDespatchSupplyChainEvent>";
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
xml += "<ram:ActualDeliverySupplyChainEvent>"
|
|
|
|
|
+ "<ram:OccurrenceDateTime>";
|
|
|
|
|
|
|
|
|
|
if (trans.getDeliveryDate() != null) {
|
|
|
|
|
xml += DATE.udtFormat(trans.getDeliveryDate());
|
|
|
|
|
} else {
|
|
|
|
|
throw new IllegalStateException("No delivery date provided");
|
|
|
|
|
}
|
|
|
|
|
xml += "</ram:OccurrenceDateTime>\n";
|
|
|
|
|
xml += "</ram:ActualDeliverySupplyChainEvent>\n"
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
* + "<DeliveryNoteReferencedDocument>\n" +
|
|
|
|
|
* "<IssueDateTime format=\"102\">20130603</IssueDateTime>\n" +
|
|
|
|
|
* "<ID>2013-51112</ID>\n" +
|
|
|
|
|
* "</DeliveryNoteReferencedDocument>\n"
|
|
|
|
|
*/
|
|
|
|
|
xml+= "</ram:ApplicableHeaderTradeDelivery>\n";
|
|
|
|
|
// + " <IncludedSupplyChainTradeLineItem>"
|
|
|
|
|
// + " <AssociatedDocumentLineDocument>"
|
|
|
|
|
// + " <IncludedNote>"
|
|
|
|
|
// + " <Content>Wir erlauben uns Ihnen folgende Positionen aus der Lieferung Nr.
|
|
|
|
|
// 2013-51112 in Rechnung zu stellen:</Content>\n"
|
|
|
|
|
// + " </IncludedNote>\n"
|
|
|
|
|
// + " </AssociatedDocumentLineDocument>\n"
|
|
|
|
|
// + " </IncludedSupplyChainTradeLineItem>\n";
|
|
|
|
|
|
|
|
|
|
xml += "</px:SupplyChainTradeTransaction>"
|
|
|
|
|
+ "</SCRDMCCBDACIDAMessageStructure>";
|
|
|
|
|
|
|
|
|
|
final byte[] zugferdRaw;
|
|
|
|
|
try {
|
|
|
|
|
zugferdRaw = xml.getBytes("UTF-8");
|
|
|
|
|
|
|
|
|
|
zugferdData = XMLTools.removeBOM(zugferdRaw);
|
|
|
|
|
} catch (final UnsupportedEncodingException e) {
|
|
|
|
|
Logger.getLogger(OXPullProvider.class.getName()).log(Level.SEVERE, null, e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setProfile(Profile p) {
|
|
|
|
|
profile = p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Profile getProfile() {
|
|
|
|
|
return profile;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String buildPaymentTermsXml() {
|
|
|
|
|
|
|
|
|
|
final IZUGFeRDPaymentTerms paymentTerms = trans.getPaymentTerms();
|
|
|
|
|
if (paymentTerms == null) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
String paymentTermsXml = "<ram:SpecifiedTradePaymentTerms>";
|
|
|
|
|
|
|
|
|
|
final IZUGFeRDPaymentDiscountTerms discountTerms = paymentTerms.getDiscountTerms();
|
|
|
|
|
final Date dueDate = paymentTerms.getDueDate();
|
|
|
|
|
if (dueDate != null && discountTerms != null && discountTerms.getBaseDate() != null) {
|
|
|
|
|
throw new IllegalStateException(
|
|
|
|
|
"if paymentTerms.dueDate is specified, paymentTerms.discountTerms.baseDate has not to be specified");
|
|
|
|
|
}
|
|
|
|
|
paymentTermsXml += "<ram:Description>" + paymentTerms.getDescription() + "</ram:Description>";
|
|
|
|
|
if (dueDate != null) {
|
|
|
|
|
paymentTermsXml += "<ram:DueDateDateTime>";
|
|
|
|
|
paymentTermsXml += DATE.udtFormat(dueDate);
|
|
|
|
|
paymentTermsXml += "</ram:DueDateDateTime>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (discountTerms != null) {
|
|
|
|
|
paymentTermsXml += "<ram:ApplicableTradePaymentDiscountTerms>";
|
|
|
|
|
final String currency = trans.getCurrency();
|
|
|
|
|
final String basisAmount = currencyFormat(calc.getGrandTotal());
|
|
|
|
|
paymentTermsXml += "<ram:BasisAmount currencyID=\"" + currency + "\">" + basisAmount + "</ram:BasisAmount>";
|
|
|
|
|
paymentTermsXml += "<ram:CalculationPercent>" + discountTerms.getCalculationPercentage().toString()
|
|
|
|
|
+ "</ram:CalculationPercent>";
|
|
|
|
|
|
|
|
|
|
if (discountTerms.getBaseDate() != null) {
|
|
|
|
|
final Date baseDate = discountTerms.getBaseDate();
|
|
|
|
|
paymentTermsXml += "<ram:BasisDateTime>";
|
|
|
|
|
paymentTermsXml += DATE.udtFormat(baseDate);
|
|
|
|
|
paymentTermsXml += "</ram:BasisDateTime>";
|
|
|
|
|
|
|
|
|
|
paymentTermsXml += "<ram:BasisPeriodMeasure unitCode=\"" + discountTerms.getBasePeriodUnitCode() + "\">"
|
|
|
|
|
+ discountTerms.getBasePeriodMeasure() + "</ram:BasisPeriodMeasure>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
paymentTermsXml += "</ram:ApplicableTradePaymentDiscountTerms>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
paymentTermsXml += "</ram:SpecifiedTradePaymentTerms>";
|
|
|
|
|
return paymentTermsXml;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|