Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038745
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajoralways2018-06-13 09:122018-06-13 09:15
ReporterguillermogilView Statuspublic 
Assigned ToRetail 
PriorityhighResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038745: In case currencyFormat is set a precision 0 foreign currency precision should override it

DescriptionIn case currencyFormat is set a precision 0 foreign currency precision should override it.
Steps To Reproduce- Configure Format.xml with 2 decimals
- Configure currency format as 0 decimals
- Set EUR currency as precision 0
- Set USD currency as precision 2

Login on WebPOS
Add a product
Pay with USD

We have lost all that information
Proposed SolutionIn will be needed to add a new parameter in OB.I18N.formatCurrency to send the precision of the currency.
e.g.-
  OB.I18N.formatCurrency = function (number, precision) {
     var maskNumeric = OB.Format.formats.priceInform,
         decSeparator = OB.Format.defaultDecimalSymbol,
         groupSeparator = OB.Format.defaultGroupingSymbol,
         groupInterval = OB.Format.defaultGroupingSize;
 
    if (precision) {
      var maskNumericSplitted = maskNumeric.split('.');
      if (maskNumericSplitted.length = 1 || maskNumericSplitted[1].length !== precision) {
        if (precision > 0) {
          maskNumeric = maskNumericSplitted[0] + '.' + ''.padStart(precision, 0);
        } else {
          maskNumeric = maskNumericSplitted[0];
        }
      }
    }

     maskNumeric = maskNumeric.replace(',', 'dummy').replace('.', decSeparator).replace('dummy', groupSeparator);
 
     return OB.Utilities.Number.JSToOBMasked(number, maskNumeric, decSeparator, groupSeparator, groupInterval);
   };
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0038743 closedadrianromero If there is a different currency precision on the foreign currency 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-06-13 09:12 guillermogil New Issue
2018-06-13 09:12 guillermogil Assigned To => Retail
2018-06-13 09:12 guillermogil Triggers an Emergency Pack => No
2018-06-13 09:12 guillermogil Relationship added related to 0038743
2018-06-13 09:15 guillermogil Proposed Solution updated


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker