Leading Zeros

Hello,
we (dizalica.hr) are trying to adjust Erpnext forms to Croatian legislative. Printed documents numerations (naming series) should not contain leading zeros. Also, instead prefix for naming series, there should be a suffix (for example, instead of QTN00005, there should be 5QTN, or 5/P1/1, and next would be 6/P1/1 and so on).
Is there a way to modify or enable somehow above mentioned?
Thank You,
Ferenc



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     
Ferenc, you can remove zeros by using a single "#" in the autoname property.

e.g.

#.QTN

See this function for more info:

https://github.com/webnotes/wnframework/blob/master/webnotes/model/doc.py#L519

You will have to set this directly in the DocType, Naming Series is only for suffixes!


T: @rushabh_mehta

On 16-Jul-2013, at 12:35 AM, Ferenc <fe...@gmail.com> wrote:

Hello,
we (dizalica.hr) are trying to adjust Erpnext forms to Croatian legislative. Printed documents numerations (naming series) should not contain leading zeros. Also, instead prefix for naming series, there should be a suffix (for example, instead of QTN00005, there should be 5QTN, or 5/P1/1, and next would be 6/P1/1 and so on).
Is there a way to modify or enable somehow above mentioned?
Thank You,
Ferenc




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     

Thank You,
Ferenc

On Tuesday, July 16, 2013 7:40:12 AM UTC+2, rushabh wrote:

Ferenc, you can remove zeros by using a single “#” in the autoname property.

e.g.

#.QTN

See this function for more info:


You will have to set this directly in the DocType, Naming Series is only for suffixes!



T: @rushabh_mehta

On 16-Jul-2013, at 12:35 AM, Ferenc <fe...@gmail.com> wrote:

Hello,
we (dizalica.hr) are trying to adjust Erpnext forms to Croatian legislative. Printed documents numerations (naming series) should not contain leading zeros. Also, instead prefix for naming series, there should be a suffix (for example, instead of QTN00005, there should be 5QTN, or 5/P1/1, and next would be 6/P1/1 and so on).
Is there a way to modify or enable somehow above mentioned?
Thank You,
Ferenc




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.