Skip to content

Commit

Permalink
adopt logging
Browse files Browse the repository at this point in the history
  • Loading branch information
homebeaver committed Jan 27, 2021
1 parent a3c869e commit a953931
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/klst/einvoice/ubl/FinancialAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ private FinancialAccount(FinancialAccountType doc) {
FinancialAccount(PaymentMeans pm) {
this(pm.getPayeeFinancialAccount());
LOG.config("pm"+pm);
// LOG.info("PaymentAccountID:"+this.getPaymentAccountID());
paymentMeans = pm;
LOG.info("ctor:"+this);
LOG.config("ctor:"+this);
}

public String toString() {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/klst/einvoice/ubl/GenericInvoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ public Timestamp getEndDateAsTimestamp() {
public PaymentInstructions createPaymentInstructions(PaymentMeansEnum code, String paymentMeansText, String remittanceInformation
, List<CreditTransfer> creditTransferList, PaymentCard paymentCard, DirectDebit directDebit) {

LOG.info("creditTransferList:"+creditTransferList + " paymentCard:"+paymentCard + " directDebit:"+directDebit);
LOG.config("creditTransferList:"+creditTransferList + " paymentCard:"+paymentCard + " directDebit:"+directDebit);
return PaymentMeans.create(code, paymentMeansText, remittanceInformation, creditTransferList, paymentCard, directDebit);
}
// BG-16.BT-81 ++ 1..1 Payment means type code
Expand All @@ -968,7 +968,7 @@ public void setPaymentInstructions(PaymentMeansEnum code, String paymentMeansTex
@Override
public void setPaymentInstructions(PaymentInstructions paymentInstructions) {
PaymentMeans paymentMeans = (PaymentMeans)paymentInstructions;
LOG.info("paymentMeans:"+paymentMeans);
LOG.config("paymentMeans:"+paymentMeans);
if(isInvoiceType) {
if(paymentMeans.isCreditTransfer()) {
paymentMeans.pmList.forEach(pm -> {
Expand Down Expand Up @@ -1103,7 +1103,7 @@ private CreditTransfer addFinancialAccount(FinancialAccount fa, PaymentMeansEnum
fa.paymentMeans = (PaymentMeans)newPi;
((PaymentMeans)newPi).pmList = ((PaymentMeans)pi).pmList;
((PaymentMeans)newPi).addCreditTransfer(fa);
LOG.info("eingefügt in"+newPi);
LOG.info("FinancialAccount inserted into "+newPi);

this.removePaymentInstructions();
this.setPaymentInstructions(newPi);
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/klst/einvoice/ubl/PaymentMeans.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static PaymentInstructions create(List<PaymentMeansType> list) {
if(list.size()==1) {
return paymentMeans;
}
LOG.info("// bei mehreren Einträgen paymentMeans neu berechnen: ...");
LOG.fine("// bei mehreren Einträgen paymentMeans neu berechnen: ...");
paymentMeans = new PaymentMeans(list);
// LOG.info(">>>>>>>>>>> das erste el zurück");
return paymentMeans.pmList.get(0);
Expand Down Expand Up @@ -190,14 +190,14 @@ private PaymentMeans(PaymentMeansType doc, List<PaymentMeans> pmList) {
super.setPayerFinancialAccount(new FinancialAccount(this));
}

LOG.info("ctor:"+this);
LOG.config("ctor:"+this);
}

private PaymentMeans(List<PaymentMeansType> list) {
this();
LOG.info("more "+list.size()+" BG-17 CreditTransfer/PaymentMeans");
LOG.config("more "+list.size()+" BG-17 CreditTransfer/PaymentMeans");
list.forEach(pm -> {
LOG.info("CreditTransfer/PaymentMeans:"+pm);
LOG.config("CreditTransfer/PaymentMeans:"+pm);
addToPmList(new PaymentMeans(pm, pmList));
});
// LOG.info("ctor für mehrere "+list.size()+" fertig.:"+this.pmList.size());
Expand All @@ -219,7 +219,7 @@ private void init(PaymentMeansEnum code, String paymentMeansText, String remitta
// BG-17
if(creditTransfer!=null) {
creditTransfer.forEach(ct -> {
LOG.info("init add BG-17:"+ct);
LOG.config("init add BG-17:"+ct);
this.addCreditTransfer(ct);
});
} else {
Expand Down Expand Up @@ -340,7 +340,7 @@ public void addCreditTransfer(CreditTransfer creditTransfer) {

public FinancialAccount getFinancialAccount() {
int i = pmList.indexOf(this);
LOG.info("gefunden? i="+i);
LOG.fine("gefunden? i="+i);
if(i<0) return null;
return new FinancialAccount(pmList.get(i));
}
Expand Down

0 comments on commit a953931

Please sign in to comment.