Good Morning,
Would anyone be willing to take a look at my code and tell me why my
returned values will not display the decimal places? For example the
last line of code "
setDecimalValue("OrderDtl.NUMBER-FIELD_6.SCRVALUE":U, 1.05)." will only
display 1. Not 1.05. Any help would be much appreciated.
Ron Newell
IT Manager
Neon Products
1695 Sargent Ave.
Winnipeg, MB R3H 0C4
http://www.neon-products.com/
mailto:rnewell@...
/***********************************************************************
***
*/
/* include vbp/vb.i so VantageBasic functions are accessible. */
{vbp/vb.i}
/* Here define variables */
DEFINE VARIABLE EstimatedSalePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE Terms AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompLeasePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE SaleLeasePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompLcr AS DECIMAL NO-UNDO.
DEFINE VARIABLE Lcr AS DECIMAL NO-UNDO.
DEFINE VARIABLE Maintenance AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompFinance AS DECIMAL NO-UNDO.
DEFINE VARIABLE Finance AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompDefdAdmin AS DECIMAL NO-UNDO.
DEFINE VARIABLE DefdAdmin AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompCsv AS DECIMAL NO-UNDO.
DEFINE VARIABLE SaleCsv AS DECIMAL NO-UNDO.
DEFINE VARIABLE Sale-CUT AS DECIMAL NO-UNDO.
DEFINE VARIABLE SalesCsv-Val AS DECIMAL NO-UNDO.
/* GET SCREEN VALUES AND SAVE INTO WORKING VARIABLES*/
ASSIGN EstimatedSalePrice =
getDecimalValue("OrderDtl.CHAR-FIELD_4.SCRVALUE":U)
Terms = getDecimalValue("OrderDtl.CHAR-FIELD_5.SCRVALUE":U)
SaleLeasePrice =
getDecimalValue("OrderDtl.CHAR-FIELD_7.SCRVALUE":U)
CompLcr =
getDecimalValue("OrderDtl.NUMBER-FIELD_5.SCRVALUE":U).
/* do the calculation */
CompDefdAdmin = CompLcr * .04.
SalesCsv-Val = (EstimatedSalePrice * Terms).
/* Set the screen value. */
setDecimalValue("OrderDtl.NUMBER-FIELD_10.SCRVALUE":U, SalesCsv-Val).
setDecimalValue("OrderDtl.NUMBER-FIELD_7.SCRVALUE":U, CompDefdAdmin).
setDateValue("OrderDtl.DATE-FIELD_1.SCRVALUE":U, TODAY).
setDecimalValue("OrderDtl.NUMBER-FIELD_6.SCRVALUE":U, 1.05).
RETURN.
This information sent is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or talking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any storage devices.
This message was checked by Norton AntiVirus for all known Viruses .
www.neon-products.com
Would anyone be willing to take a look at my code and tell me why my
returned values will not display the decimal places? For example the
last line of code "
setDecimalValue("OrderDtl.NUMBER-FIELD_6.SCRVALUE":U, 1.05)." will only
display 1. Not 1.05. Any help would be much appreciated.
Ron Newell
IT Manager
Neon Products
1695 Sargent Ave.
Winnipeg, MB R3H 0C4
http://www.neon-products.com/
mailto:rnewell@...
/***********************************************************************
***
*/
/* include vbp/vb.i so VantageBasic functions are accessible. */
{vbp/vb.i}
/* Here define variables */
DEFINE VARIABLE EstimatedSalePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE Terms AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompLeasePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE SaleLeasePrice AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompLcr AS DECIMAL NO-UNDO.
DEFINE VARIABLE Lcr AS DECIMAL NO-UNDO.
DEFINE VARIABLE Maintenance AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompFinance AS DECIMAL NO-UNDO.
DEFINE VARIABLE Finance AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompDefdAdmin AS DECIMAL NO-UNDO.
DEFINE VARIABLE DefdAdmin AS DECIMAL NO-UNDO.
DEFINE VARIABLE CompCsv AS DECIMAL NO-UNDO.
DEFINE VARIABLE SaleCsv AS DECIMAL NO-UNDO.
DEFINE VARIABLE Sale-CUT AS DECIMAL NO-UNDO.
DEFINE VARIABLE SalesCsv-Val AS DECIMAL NO-UNDO.
/* GET SCREEN VALUES AND SAVE INTO WORKING VARIABLES*/
ASSIGN EstimatedSalePrice =
getDecimalValue("OrderDtl.CHAR-FIELD_4.SCRVALUE":U)
Terms = getDecimalValue("OrderDtl.CHAR-FIELD_5.SCRVALUE":U)
SaleLeasePrice =
getDecimalValue("OrderDtl.CHAR-FIELD_7.SCRVALUE":U)
CompLcr =
getDecimalValue("OrderDtl.NUMBER-FIELD_5.SCRVALUE":U).
/* do the calculation */
CompDefdAdmin = CompLcr * .04.
SalesCsv-Val = (EstimatedSalePrice * Terms).
/* Set the screen value. */
setDecimalValue("OrderDtl.NUMBER-FIELD_10.SCRVALUE":U, SalesCsv-Val).
setDecimalValue("OrderDtl.NUMBER-FIELD_7.SCRVALUE":U, CompDefdAdmin).
setDateValue("OrderDtl.DATE-FIELD_1.SCRVALUE":U, TODAY).
setDecimalValue("OrderDtl.NUMBER-FIELD_6.SCRVALUE":U, 1.05).
RETURN.
This information sent is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or talking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any storage devices.
This message was checked by Norton AntiVirus for all known Viruses .
www.neon-products.com