Supplier invoices

Hello !
I’m new to dolibarr.
I’m importing into Dolibarr my Access/Mysqldatabase with VBA-Code.
Everything is working fine … but I’m struggeling with the supplier invoices. In my source are a lot of pdf joined to the supllier invoice dataset – it would be very much work to do this manually.

So, according to the normal documents the target path should be like this :
/documents/fourn/facture/socid/ref/filename.pdf …
but
it seems to be not.
whe I do a manual uplaod … the destination path comes to
/documents/fourn/facture/0/someNumber/ref/filename.pdf and the database becomes to have a calculated ??Hash?? in two fields.

So … you would help me a lot if you explain me, how the destination path is calculated
(I was regarding in a lot of PHP … but I didn’t find any solution)
and how and what for the two values are calcualted.
Thank you !

/edit: typing mistakes.

No one who could have a hint ?
No one who could have an opinion ?
No Idea ?