Yes, Axapta use 2 decimals.. And you can't change this, if u only change EDT. Because 
many methods converts decimals to 2 digits with code, statically!! 
 
For ex, PriceDisc.Price() 
 
calls 
 
Currency::price(..)
 
and this calls :
 
currency.pricetypearound(..)
 
and if u can browse the code on this method :
 
switch (this.roundOffTypePrice)
    {
    case RoundOffType::Ordinary   : if (_unit)
                                        price = round(_price, _unit);
                                    else
                                        price = round(_price,0.01);        // this 
rounds to 2 digit..
                                    break;
       ...
       ...
       ...
    }
 
 
 
This is trouble, but if u want to change this, you must change methods on Axapta..
 
Regards,
 
 
An�l �zay
 
ERP Technical Consultant(Microsoft Axapta)
DataSistem Genel Otomasyon ve Sanayi Tic. A.�.
Web : <http://www.datasistem.com/> www.datasistem.com.tr 
<http://www.datasistem.com.tr/> 
Phone : (0232) 4631663 - 208
 
 

  _____  

From: Jens Strandberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 29, 2004 8:09 PM
To: [EMAIL PROTECTED] Com (E-mail)
Subject: [development-axapta] Decimals in Axapta


Hello there,

I am having some difficulties with decimals in Axapta.

It seems that Axapta will always use 2 decimals - everywhere...

A simple job like "(100 * 100.1)" will return a value of 10010.00; i.e. 2
decimals. Similarly, if you multiply 2 4-decimal values, Axapta will also
return only 2 decimals.

Another example:
Take a look at the initFromPriceDisc method of the table SalesLine:

void initFromPriceDisc(PriceDisc priceDisc)
{
    ;
    this.salesPrice         = priceDisc.price();
    this.priceUnit          = priceDisc.priceUnit();
    this.salesMarkup        = priceDisc.markup();
    this.confirmedDlv       = this.salesTable().deliveryDate;

    if (priceDisc.deliveryDays())
        this.confirmedDlv = max(systemdateGet() + priceDisc.deliveryDays(),
this.confirmedDlv);
}

this.salesPrice will always return 2 decimals, even though I have modified
the EDT (actually created a new one that extends the original one) to hold 4
decimals.

If I - for testing purposes - change to "this.SalesPrice         = 4.5678;",
this will return all 4 decimals.

All I want is to have the unit prices in SalesLine and PurchLine reflect the
relevant price in PriceDiscTable. Please note that all fields (SalesPrice,
PurchPrice etc.) have been setup to accept 4 decimals, but something goes
wrong in the above method.

What am I missing here... ?

Thanks in advance.

Best Regards,
Jens

Ax_30_SP1




Yahoo! Groups Sponsor   
ADVERTISEMENT
click here 
<http://us.ard.yahoo.com/SIG=129rn8e40/M=298184.5022502.6152625.3001176/D=groups/S=1705006764:HM/EXP=1088625807/A=2197946/R=0/SIG=11elgumq7/*http://www.netflix.com/Default?mqso=60183367>
   
 
<http://us.adserver.yahoo.com/l?M=298184.5022502.6152625.3001176/D=groups/S=:HM/A=2197946/rand=121097881>
      

  _____  

Yahoo! Groups Links


*       To visit your group on the web, go to:
        http://groups.yahoo.com/group/development-axapta/
          
*       To unsubscribe from this group, send an email to:
        [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
          
*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/development-axapta/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 


Reply via email to