by Izertis

Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.

Includes a 30 day guarantee
Try it Now

#1536 - Quantities without digits

Closed General Question created by WSiedler Verified Purchase 6 years ago

We are using SuiteCRM Version 7.8.10 with MailMergeReports 2.5.12 for creating documents in modules quotes and invoices in German language.

We are using product quotes (line elements) in Suite CRM standard including field product_qty which is type “decimal”. In SuiteCRM dialogue the quantity is shown without digits, but in MMR the quantity always gets two digits. This is wrong – the same rules of SuiteCRM should be used in MMR documents:

Error_15_1.jpg

Error_15_2.jpg

Error_15_3.jpg

How can we overcome this problem?

Regards, Wolf

  1. WSiedler member avatar

    WSiedler Verified Purchase

    6 years ago

    Screenshot 1 is the display within SuiteCRM.

    Screenshot 2 is from the M-M-R document.

    Schreeshots 3 belongs to the Microsoft Word definition file.

  2. dharma member avatar

    Izertis Provider

    6 years ago

    Hi Wolf,

    Try f_Decimals format funcion, introduced in v2.1.0: - New format function 'f_Decimals', format number of decimals of floats and decimal variables. Example: [a.numvar;onformat=~f_Decimals(1)]

    Function to format numbers with a certain number of decimals, to be used as onformat parameter. The decimals number parameter will be passed in parentheses to the function. By default the numbers are formatted using the number of decimals returned by $locale->getPrecision(). Important: If the number of decimals exceeds the value of $locale->getPrecision() then result will be filled with zeros, since at this point we do not have the complete actual value of the number.

    In your template, instead of [a_sub1.product_qty], try [a_sub1.product_qty;onformat=~f_Decimals(0)]

    Regards

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "It has improved our processes so much! Admin cut in half! We send a webform to clients to sign up straight into CRM then generate and print their paperwork to sign."

    Read More Reviews