AsherB
4Penny.net
Points: 7383

9/7/2016 6:21:46 PM

ddf_FormattedQty - Formatted Quantities using DECPLQTY

* This article, and all our great SQL (General) documentation, Is available on the SQL (General) menu
Many of the companies that we work at have items that have varied DECPLQTY - The items might use 0 decimal places for the quantity, but some will use 1, or 2, or more.

This is a very difficult concept for .NET controls to grasp, so usually we just return all five decimal places.

This function will correctly format a decimal quantity to the required number of decimal places, and optionally add in the commas.

The return will be a string.

EDITED 12/23/2016 comma handling for negative numbers

4Penny.net
Version: All
Section: SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3