Hello Community,

In the subject service, there's the following comment and line of code
that's located in GeneralLedgerServices line 2195.

My question is why is invoiceItemTypeId being passed as a parameter to
glAccountTypeId? As what I noticed in subsequent services that decide the
GlAccountId starting from getGlAccoutFromAccountType that an
invoiceItemTypeId like 'INV_FPROD_ITEM' or 'ITM_PROMOTION_ADJ' is used as a
glAccountTypeId which I believe won't return any data - as per my basic
understanding.

As the demo data doesn't come with many 'GL overrides' in tables like
ProductGlAccount, PartyGlAccount, etc I was not able to track a complete
example but I understand that any configuration in such tables will use an
actual GlAccountTypeId that when compared with an invoiceItemTypeId won't
return any data. Also, the comments in the code below are not clear to me.

Thanks in advance if you can shed some light on this,

Regards
Emad


<!-- 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"/>

Reply via email to