[Vtigercrm-developers] Strip prefix from Invoice No.

Vladimir Karažija vladimir at kosacrta.hr
Thu Sep 17 22:44:26 GMT 2015


Hi Matus,

thank you for solution, it works ;)

regards, Vladimir


Vladimir Karažija
Kosa crta d.o.o.
Jagnedje 1
10090 Zagreb
OIB: 57724075047

t. +385 1 777 33 85
m. +385 91 122 0511
www.kosacrta.hr

On Thu, Sep 17, 2015 at 10:39 AM, IT-Solutions4You <info at its4you.sk> wrote:

> You can use PHP function direct in CUSTOMFUNCTION definition.
>
> [CUSTOMFUNCTION|functionname|param1|param2|…|CUSTOMFUNCTION].
> For your needs:
> [CUSTOMFUNCTION|substr|$INVOICE_INVOICE_NO$|3|CUSTOMFUNCTION].
>
>
> More infos:
>
> http://www.its4you.sk/en/pdf-maker/manual/21-pdf-maker/manual/82-custom-functions
>
> Matus
>
>
>
>
> Dňa 17. 9. 2015 o 5:12 Preexo napísal(a):
>
> I suggest writing your own custom functions and putting it into a file
>> under
>> "modules/PDFMaker/resources/functions/yourcustomfunctions.php".
>>
>> To achieve the stripping of the prefix, you can maybe just use a simple
>> str_replace, or you use substr to always remove the first three letters.
>>
>> Here is some example code for a custom function (untested):
>> if (!function_exists('strip_prefix')) {
>>      function strip_prefix($str) {
>>                 return substr($str, 3);
>>      }
>> }
>>
>> Good luck
>>
>>
>> Vladimir Karažija wrote
>>
>>> Hi,
>>>
>>> I am using PDF Maker Professional 600.8.2 from IT-Solutions4You with
>>> vtiger
>>> 6.3
>>>
>>> I have problem with displaying invoice number.
>>>
>>> I need to show only number from invoice, without prefix.
>>>
>>> Currently invoice number is INV1234, I want to display only 1234 , so I
>>> need a way to strip the prefix.
>>>
>>> This is only for export to PDF for printing.
>>>
>>> Is there PDF Maker custom function that I can use or I need to chnage
>>> vtiger crm code?
>>>
>>> I am using vtiger crm 6.3 version.
>>>
>>> regards, Vladimir
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Strip-prefix-from-Invoice-No-tp17357p17358.html
>> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150918/3cb464ad/attachment.html>


More information about the vtigercrm-developers mailing list