Dear All,
 
I need your help to the following subject above. I found a problem in Reducing Blc Method calculation regarding my tax and accounting policy in my country, Indonesia. As I know depreciation always calculate 12 times = 1 years. Problem comes when acquisition date is not in beginning of the year e.q. Feb-Dec.  For example, Fixed asset bought in 01 April'04 to complete depreciation to one year it must be end to 31 March 05. Axapta calculation did not like that, it's always stop calculation in one year depending closing period 31 Dec 04 (means in 2004 only have 9 months).
If you have any suggestion without change the program it's be may pleasure. If not, the program must be change. For your information I'm not a programmer, so please-please help me to do some necessary change through the axapta program.
Thank you for your kind attention and help.
 
Regards,
 
Eko
 
Ilustration:
 
acquisition  1 April 04 = IDR 20.000.000
Mehtod Reducing Blc/Double Declining Blc
e-Life = 4 th
 
MUST BE
Year Date Acqusition %  Depre/Year   Depre/Month   Accum Dep   Book Value 
1 01-04-04 31-03-05  20,000,000.00 50%  10,000,000.00     833,333.33  10,000,000.00  10,000,000.00
2 01-04-05 31-03-06  10,000,000.00 50%    5,000,000.00     416,666.67    5,000,000.00    5,000,000.00
3 01-04-06 31-03-07    5,000,000.00 50%    2,500,000.00     208,333.33    2,500,000.00    2,500,000.00
4 01-04-07 31-03-08    2,500,000.00 50%    1,250,000.00     104,166.67    1,250,000.00    1,250,000.00
AXAPTA
Year Date Acqusition %  Depre/Year   Depre/Month   Accum Dep   Book Value 
1 01-04-04 31-12-04  20,000,000.00 50%  10,000,000.00     833,333.33    7,500,000.00  12,500,000.00
2 01-01-05 31-12-05  12,500,000.00 50%    6,250,000.00     520,833.33    6,250,000.00    6,250,000.00
3 01-01-06 31-12-06    6,250,000.00 50%    3,125,000.00     260,416.67    3,125,000.00    3,125,000.00
4 01-01-07
31-12-07
   3,125,000.00 50%    1,562,500.00     130,208.33    1,562,500.00    1,562,500.00
 
 
void run()
{
    AssetTableMethod        assetTableMethodPrimary;
    AmountCur               amountCurPrimary;
    AmountCur               amountCurPrimarySum;
    real                    depPeriodPrimary;
 
    AssetTableMethod        assetTableMethodSecondary;
    AmountCur               amountCurSecondary;
    AmountCur               amountCurSecondarySum;
    real                    depPeriodSecondary;
 
    AssetJournal            assetJournal;
    AssetTable              assetTable;
    AssetBook               assetBook;
    AssetTransDate          transDate;
 
    TransDate               depDate;
    real                    depPeriod;
    assetRevaluationAmount  revaluationAmount;
    AmountCur               amountCur;
 
    #avifiles
    ;
 
    assetJournal = new AssetJournal(journalNum,this.assetTransType());
//    assetJournal.parmLedgerJournalEngine(LedgerJournalEngine);
 
    queryRun.query().dataSourceTable(tableNum(AssetBook)).addRange(fieldNum(AssetBook,status)).value(queryValue(AssetStatus::Open)+','+queryValue(AssetStatus::NoAcquisition));
 
    ttsbegin;
 
    while (queryRun.next())
    {
        if (queryRun.changed(tableNum(AssetBook)))
        {
            assetBook = queryRun.get(tableNum(AssetBook));
 
            // Mono depreciation.
            if (!assetBook.DepreciationAltProfile())
            {
                if (assetBook.depreciationProfile().Method != AssetDepreciationMethod::Consumption)
                {
                    assetTableMethodPrimary = AssetTableMethod::construct(assetBook, assetTransDate, assetBudgetModelId);
 
                    amountCurPrimary = 0;
                    depPeriodPrimary = 0;
                    while (assetTableMethodPrimary.next())
                    {
                        amountCurPrimary += -assetTableMethodPrimary.calc();
                        depPeriodPrimary += assetTableMethodPrimary.depPeriod();
                        revaluationAmount = assetTableMethodPrimary.RevaluationAmount();
 
                        if (amountCurPrimary)
                        {
                            transDate = this.initFirstDate(assetTableMethodPrimary.depDate(),assetTable.assetId);
                            if (!this.budgetJournal() || (this.budgetJournal() && transdate >= assetDateFrom))
                                assetJournal.createTrans(amountCurPrimary,assetBook,transDate,assetBudgetModelId,assetTableMethodPrimary.depPeriod(),0,false,false,revaluationAmount);
                            amountCurPrimary = 0;
                        }
                    }
                }
            }
            else
            // Dual depreciation.
            {
                if (assetBook.depreciationProfile().Method != AssetDepreciationMethod::Consumption)
                {
                    assetTableMethodPrimary   = AssetTableMethod::construct(assetBook,assetTransDate,assetBudgetModelId,true);
                    assetTableMethodSecondary = AssetTableMethod::construct(assetBook,assetTransDate,assetBudgetModelId,true,true);
 
                    amountCurPrimary   = 0;
                    amountCurSecondary = 0;
                    depPeriodPrimary   = 0;
                    depPeriodSecondary = 0;
                    while (assetTableMethodPrimary.next() && assetTableMethodSecondary.next())
                    {
 
                        amountCurPrimary   = -(assetTableMethodPrimary.calc());
                        amountCurSecondary = -assetTableMethodSecondary.calc();
 
                        if (abs(amountCurPrimary) > abs(amountCurSecondary))
                        {
                            amountCurPrimarySum += amountCurPrimary;
                            revaluationAmount = assetTableMethodPrimary.RevaluationAmount();
 
                            assetTableMethodSecondary.addPrevDepAmountExternal(-(amountCurPrimary - amountCurSecondary));
                            depDate     = assetTableMethodPrimary.depDate();
                            depPeriod   = assetTableMethodPrimary.depPeriod();
                            depPeriodPrimary += depPeriod;
                            amountCur   = amountCurPrimary;
                        }
                        else
                        {
                            amountCurSecondarySum += amountCurSecondary;
                            revaluationAmount = assetTableMethodSecondary.RevaluationAmount();
 
                            assetTableMethodPrimary.addPrevDepAmountExternal(-(amountCurSecondary - amountCurPrimary));
                            depDate     = assetTableMethodSecondary.depDate();
                            depPeriod   = assetTableMethodSecondary.depPeriod();
                            depPeriodSecondary += depPeriod;
                            amountCur   = amountCurSecondary;
                        }
 
                        if (amountCur)
                        {
                            transDate = this.initFirstDate(depDate,assetTable.assetId);
                            if (!this.budgetJournal() || (this.budgetJournal() && transdate >= assetDateFrom))
                                assetJournal.createTrans(amountCur,assetBook,transDate,assetBudgetModelId,depPeriod);
                        }
                    }
 
                }
            }
        }
    }
    ttscommit;
}
 



Yahoo! Groups Links

Reply via email to