[Vtigercrm-developers] Strip prefix from Invoice No.

IT-Solutions4You info at its4you.sk
Fri Sep 18 08:27:40 GMT 2015


Yes it's works. You cann use all PHP as vtiger function also.
[CUSTOMFUNCTION|getUserName|$USERID$|CUSTOMFUNCTION].
We don't know if it's "secure" to inform about it on documentation.
Our Partners know it and use it ;-)

Matus



Dňa 17. 9. 2015 o 13:00 Preexo napísal(a):
> Wow, if that actually works, there would be no need to actually write the
> wrapper as I suggested before anymore... Maybe you should add this
> information to your PDFmaker documentary, have not seen that bit anywhere ;)
>
>
> its4you 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/
>
>
>
>
>
> --
> View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Strip-prefix-from-Invoice-No-tp17357p17361.html
> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
>
> _______________________________________________
> http://www.vtiger.com/
>




More information about the vtigercrm-developers mailing list