Skip to content

Commit

Permalink
Add Default Conversion Type When Conversion Type from Source Document Is
Browse files Browse the repository at this point in the history
Null
  • Loading branch information
carlosaparadam committed Aug 10, 2022
1 parent 86698d3 commit 24ed54a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/spin/model/MWHWithholding.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,12 @@ && getSourceOrder_ID() > 0)
maybeSourceDocument.ifPresent(sourceDocument -> {
if (getC_Currency_ID() == 0)
setC_Currency_ID(sourceDocument.get_ValueAsInt(MWHWithholding.COLUMNNAME_C_Currency_ID));
if (getC_ConversionType_ID() == 0)
setC_ConversionType_ID(sourceDocument.get_ValueAsInt(MWHWithholding.COLUMNNAME_C_ConversionType_ID));
if (getC_ConversionType_ID() == 0) {
int C_ConversionType_ID = sourceDocument.get_ValueAsInt(MWHWithholding.COLUMNNAME_C_ConversionType_ID);
if (C_ConversionType_ID == 0)
C_ConversionType_ID = MConversionType.getDefault(getAD_Client_ID());
setC_ConversionType_ID(C_ConversionType_ID);
}
if (getC_BPartner_Location_ID() == 0 )
setC_BPartner_Location_ID(sourceDocument.get_ValueAsInt(MWHWithholding.COLUMNNAME_C_BPartner_Location_ID));
if (getDateAcct() == null)
Expand Down

0 comments on commit 24ed54a

Please sign in to comment.