[ http://tools.oasis-open.org/issues/browse/OFFICE-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21386#action_21386 ]
Andreas Guelzow commented on OFFICE-2258:
------------------------------------------
From Gnumeric's code:
gnm_float fCost, Cost
GDate *nDate, Purchase Date
GDate *nFirstPer, End of First Period
gnm_float fRestVal, Value after Depreciation
gint nPer, subject period
gnm_float fRate, depreciation rate
gint nBase calendar basis
gint n;
gnm_float fAmorCoeff, fNRate, fRest, fUsePer;
fUsePer = 1.0 / fRate;
if (fUsePer < 3.0)
fAmorCoeff = 1.0;
else if (fUsePer < 5.0)
fAmorCoeff = 1.5;
else if (fUsePer <= 6.0)
fAmorCoeff = 2.0;
else
fAmorCoeff = 2.5;
fRate *= fAmorCoeff; /* Adjustment of the depreciation rate */
fNRate = gnm_floor ( yearfrac( nDate, nFirstPer, nBase ) * fRate * fCost + 0.5 );
/* fNRate is depreciation during the partial period during the partial period. */
fCost -= fNRate; /* value after the partial period */
fRest = fCost - fRestVal; /* total amount left to depreciate*/
for ( n = 0 ; n < nPer ; n++ ) {
fNRate = gnm_floor( fRate * fCost + 0.5 );
fRest -= fNRate;
if ( fRest < 0.0 ) {
switch ( nPer - n ) {
case 0:
case 1:
return (gnm_floor ( fCost * 0.5 + 0.5) );
default:
return 0.0;
}
}
fCost -= fNRate;
}
return value_new_float (fNRate);
}
> AMORDEGRC - french accounting system? (also in AMORLINC)
> --------------------------------------------------------
>
> Key: OFFICE-2258
> URL: http://tools.oasis-open.org/issues/browse/OFFICE-2258
> Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
> Issue Type: Bug
> Components: OpenFormula
> Reporter: Patrick Durusau
> Assignee: Robert Weir
> Fix For: ODF 1.2 CD 06
>
>
> Now reads: "Calculates the amortization value for the French accounting system using linear depreciation."
> I assume it should read: "Calculates the amortization value for an asset using linear depreciation."
> But that is just a guess on my part. (Same replacement in AMORLINC.)
> I don't know anything about French accounting systems so if someone will confirm my suggested correction I can enter it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira