cancel
Showing results for 
Search instead for 
Did you mean: 

Corrupt Credit Note created via DI API

Private_Member_145664
Participant
0 Kudos

Hello,

when i try to create a credit note via di api i get the error message "one of the base documents has been closed", even if the source document is not closed. But this is not the main problem. After this i have a corrupt credit memo in my system, that means a credit memo with out any detail lines. The error occurs only on one customer systems, on a lot of other systems the creation of credit notes works fine. Had anybody the same effect or clue what causes this problem.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Eneveux
Product and Topic Expert
Product and Topic Expert
0 Kudos

Ingo,

Since this issue only seems to happen at one of your clients, did you verify that the DI API on the client is the same one that you compiled the add-on against as far as the patch level?

Eddy

Private_Member_145664
Participant
0 Kudos

Hi Eddy,

we use late binding for our program to link the DI-API. But i let the customer check the versions.

Thanks

Private_Member_145664
Participant
0 Kudos

Hello,

this problem happens only on belgium databases.

Regards

Answers (1)

Answers (1)

Private_Member_145664
Participant
0 Kudos

Hello we found the problem, i can reproduce it on a belgium database.

I want you to inform about a critical error in the SBO_SP_TransactionNotification.

If you check the line data of a document and send an error for this data the front end works fine. But if you use the DI-API the header data of document will be saved and the lines will be not saved.

-


if @object_type in ('14','19') and @transaction_type = 'A'

begin

declare @corrCRD as varchar(8)

if @object_type = '14'

set @corrCRD = (select distinct(correction) from ovtg where code in (select vatgroup from RIN1 where docentry = @list_of_cols_val_tab_del) and correction = 'N')

else if @object_type = '19'

set @corrCRD = (select distinct(correction) from ovtg where code in (select vatgroup from RPC1 where docentry = @list_of_cols_val_tab_del) and correction = 'N')

if @corrCRD = 'N'

begin

set @error = 1

set @error_message = 'You have entered a regular VAT Code on the document, this is not allowed'

end

end

-


bart_decattelle
Explorer
0 Kudos

Dear all,

I have a similar problem when trying to add a credit note via DI API.

The problem is that at the moment you create a credit note via DI API the document is added with a regular VAT code. This is the same behavior as when you add a credit note via User Interface.

To solve this we have (in Belgium) added a check in the transaction notification to display an error message to the customer in this case. So this is working fine in the User Interface. But if you are trying to add a creditnote via DI API, you get the same (correct) error message.

Can you set the VAT CODE via DI API ? Or is there another solution?

Kind regards

Bart