Improved: Added TODO comments to document the architectural
weaknesses: glAccountTypeId is not persisted after it is used to decode the
account id for the invoice item
@@ -2041,6 +2041,9 @@ under the License.
<set field="debitEntry.productId" from-field="invoiceItem.productId"/>
<!-- glAccountTypeId is overloaded. For sales and purchase invoices, it has the invoiceItemTypeId,
and the getGlAccountFromAccountType service knows that -->
+ <!-- TODO: the system will use the information if the field glAccountTypeId to decode an actual
+ account id but will not be able to persist it because the values in GlAccountType are different
+ from the ones in InvoiceItemType; we will have to find a way to persist this information -->
<set field="debitEntry.glAccountTypeId" from-field="invoiceItem.invoiceItemTypeId"/>
<set field="debitEntry.glAccountId" from-field="invoiceItem.overrideGlAccountId"/>
<if-compare field="amountFromOrder" operator="greater" value="0" type="BigDecimal">
@@ -2212,6 +2215,9 @@ under the License.
<set field="creditEntry.debitCreditFlag" value="C"/>
<!-- glAccountTypeId is overloaded. For sales and purchase invoices, it has the invoiceItemTypeId,
and the getGlAccountFromAccountType service knows that -->
+ <!-- TODO: the system will use the information if the field glAccountTypeId to decode an actual
+ account id but will not be able to persist it because the values in GlAccountType are different
+ from the ones in InvoiceItemType; we will have to find a way to persist this information -->
<set field="creditEntry.glAccountTypeId" from-field="invoiceItem.invoiceItemTypeId"/>
<set field="creditEntry.organizationPartyId" from-field="invoice.partyIdFrom"/>
<set field="creditEntry.productId" from-field="invoiceItem.productId"/>
