In my application i have few documents types Inovice
, Order
, Shipping
. All this types need to have own prefix in database with number of document. Somthing like ID
auto increment but not that.
When i create order i need to auto generate order number like SO-000001
and next time when i create again new order must be SO-000001
. The some for Inovice and Shipping documents. This is not auto increment. How to to create this? Does i must create trigger or i need that to do via code in my app?