Question: How To Reset The Sale No

How To Reset The Sale No

Hi, how to reset the Sale No ? not reference number or order_ref

MB

Mehdi boudhir

Asked
Hi, how to reset the Sale No ?
not reference number or order_ref
  • EG

    Enyinnaya Gift

    Answered
    Do you mean, Sale ID?
  • MS

    Mian Saleem

    Answered
    Hello,

    The sale number is the `sma_sales` table AI. If you have sales, you can't reset it. Otherwise feel free to update your database table as you need.

    Thank you
  • MB

    Mehdi boudhir

    Answered
    I have no sales, sma_sales is empty but when I make a sale the invoice number starts from 72
  • MS

    Mian Saleem

    Answered
    Hello,

    **_Table `AI` won't be reset if you delete records._**

    You will need to reset it manually on your table. _This isn't anything that is related to SMA but your database._ You can reset it as you like. There could be multiple way to doing this, delete table and creating it again or truncate it or alter to update.

    ```sql
    ALTER TABLE `sma_sales` AUTO_INCREMENT = 1;
    ```

    OR truncate table

    ```sql
    TRUNCATE TABLE `sma_sales`;
    ```
    Thank you
  • Login to Reply