Skip to content

Commit

Permalink
Fixing #15 for CreditNotes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Sep 28, 2022
1 parent 3e8648d commit 2a6276e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ public InvoiceType convertToInvoice (@Nonnull final CrossIndustryInvoiceType aCI
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrossPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down Expand Up @@ -2144,7 +2144,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
bUsePrice ? aUBLPrice::setPriceAmount : null);

// Allowance charge
final TradePriceType aTradePrice = aLineAgreement.getNetPriceProductTradePrice ();
final TradePriceType aTradePrice = aLineAgreement.getGrossPriceProductTradePrice ();
if (aTradePrice != null)
for (final TradeAllowanceChargeType aPriceAllowanceCharge : aTradePrice.getAppliedTradeAllowanceCharge ())
{
Expand All @@ -2156,7 +2156,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrossPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ public InvoiceType convertToInvoice (@Nonnull final CrossIndustryInvoiceType aCI
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrossPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down Expand Up @@ -2141,7 +2141,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
bUsePrice ? aUBLPrice::setPriceAmount : null);

// Allowance charge
final TradePriceType aTradePrice = aLineAgreement.getNetPriceProductTradePrice ();
final TradePriceType aTradePrice = aLineAgreement.getGrossPriceProductTradePrice ();
if (aTradePrice != null)
for (final TradeAllowanceChargeType aPriceAllowanceCharge : aTradePrice.getAppliedTradeAllowanceCharge ())
{
Expand All @@ -2153,7 +2153,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrossPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ public InvoiceType convertToInvoice (@Nonnull final CrossIndustryInvoiceType aCI
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrosstPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down Expand Up @@ -2142,7 +2142,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
bUsePrice ? aUBLPrice::setPriceAmount : null);

// Allowance charge
final TradePriceType aTradePrice = aLineAgreement.getNetPriceProductTradePrice ();
final TradePriceType aTradePrice = aLineAgreement.getGrossPriceProductTradePrice ();
if (aTradePrice != null)
for (final TradeAllowanceChargeType aPriceAllowanceCharge : aTradePrice.getAppliedTradeAllowanceCharge ())
{
Expand All @@ -2154,7 +2154,7 @@ public CreditNoteType convertToCreditNote (@Nonnull final CrossIndustryInvoiceTy
"SupplyChainTradeTransaction",
"IncludedSupplyChainTradeLineItem",
"SpecifiedLineTradeAgreement",
"NetPriceProductTradePrice",
"GrossPriceProductTradePrice",
"AppliedTradeAllowanceCharge" },
"Failed to determine if AppliedTradeAllowanceCharge is an Allowance or a Charge"));
if (eIsCharge.isDefined ())
Expand Down

0 comments on commit 2a6276e

Please sign in to comment.