add lines.item_number index on sale docs, refactor of edi to allow sending of creditnotas