در حسابداری، اسناد مرجع به مدارک و اطلاعاتی گفته میشود که برای ثبت و اثبات معاملات مالی استفاده میشوند. این اسناد نقش اصلی در ثبت رویدادهای مالی و بررسی صحت آنها دارند. به زبان ساده، این اسناد شواهدی هستند که نشان میدهند یک معامله واقعاً انجام شده است.به طور خلاصه، اسناد مرجع مثل رسید خرید در خریدهای روزمره هستند، ولی برای شرکتها و سازمانها.در برخی موارد امکان این وجود دارد که اسناد مرجع در سیستم حسابداری به ترتیب ثبت نشده (باگ از سمت دیتابیس) و برای اشخاصی که قصد تهیه گزارش یا بستن سال مالی را دارند مشکل ایجاد کند. این اسکریپت CTE ردیف های duplicate شده رو با یک شماره ترتیبی یکتا تولید میکند و مقادیر اصلی را با این شماره جایگزین میکند.
In accounting, reference documents refer to records and information used to record and substantiate financial transactions. These documents play a key role in documenting financial events and ensuring their accuracy. Simply put, these documents serve as evidence that a transaction has genuinely taken place.
In summary, reference documents are like purchase receipts in everyday transactions but are designed for companies and organizations.
In some cases, reference documents in the accounting system may not be recorded sequentially (due to a database bug), which can cause issues for individuals preparing reports or closing the fiscal year. This CTE script generates unique sequential numbers for duplicated rows and replaces the original values with these unique numbers.