Knowledgebase
How can I add my invoice codes in the way they look in TO3000 into my custom queries (for example I-CCT0001)?
Posted by Alexey Sokolov (AIT) on 19 June 2014 05:12 PM

For this, you can use the following code in your custom queries: 

-------------------------------------------------

SELECT

'I-' || c.client_code || lpad(c8.cinv_numb, 4, '0')

FROM

clients c,
cinvoices c8

WHERE

c.client_id=c8.client_id

-------------------------------------------------

In this query:

'I-' is a string value which is used as the invoice prefix;

|| is a concatenation code which links several string values;

c.client_code is your client code;

lpad(c8.cinv_numb, 4, '0') is a code which will show your invoice number in the format "000X".

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).