Journal entry error

hello, i have a problem when i want to link a debit entry to a sales order.
i have created a payment entry and specify the allocated amount that should be same as the debit, and then created a new journal entry, specified the debit amount and then open the debit info to specify the reference but the following error appears: Debit entry cannot be linked with a Sales Order. check pictures for more details.

plz can someone help me to solve this error.

1 Like

I’ve faced the same problem and I’ve been looking into it in the code and it makes no sense why that validation is there. Can someone comment on this validation error?

Hi @Perla

Try to change is Advance = Yes( I notyet test)


i tried to change it to yes, but another error is showing.
error: Advance against Customer must be credit.
So i don’t know want we should do to solve the problem, and i need to solve it asap.

Hi @Perla

You fill not correct Debit col and Credit Col

Receive money from SO need to fill in Credit.

i i cant put it in the credit field because:
Advance paid against Sales Order SO-03713 cannot be greater than Grand Total € 246.75
the SO is less than the total of the JV

Hi @Perla

I checked code, If you fill at Debit can not link to SO => you need to remove SO at Reference Type.
Next time When you make payment entry, system will show 2 rows: Journal Entry (13.8) and SO (576-13.8 =562.2 )

how can i add the JE before completing the PE. i want to make the payment entry, allocate the amount and by then make the journal entry

Hi @Perla

I don’t understand your question, Now you can submit your JE (after remove Reference SO) ?

yeah if i remove it i can submit, but you mean that i should submit the JE and by them make the PE and add this JE to it?

but you mean that i should submit the JE and by them make the PE and add this JE to it?


I’m not sure but does it have something to do with sales being credit but not debit.

okey so im gonna describe the case, and i hope someone will help me.
i have a sales order of 350$ and i make the payment entry by then, but the sales invoice is 300$, so after completing this i need to make a journal entry with a 50$ amount to return it to the client, and this journal entry Debit must be linked to the sales order, because in the sales order i allocated 50$ of the amount in the payment entry. so when i want to link it with sales order it will display the following error: Debit entry cannot be linked with a Sales Order, but i cant do it other way. so is there any help regarding this issue. or should i make it other way?

so i cant make the JE before the PE

Hi @Perla

You can change 50 at Debit to -50 at Credit


and you can check by view Ledger


it workedd!! thank you very much :slight_smile:

1 Like