MIsc.Charges Implementation in Inventory

Hi

I want to implement the Misc.Charges functionality in Inventory Management->periodics->transferOrder

Here we are transfering Items from One Wear House TO another WH.

for Type: Stock Transfer->setup(Button)-> i put Misc.Charges Form-> Here I am assigning Misc.Charges.

while doing TransferOrder(Type: Stock Transfer) → posting-> receive .

its has to affect to to perticular defined Misc.LEdger Account IN GL.

means once its received then I will check in Inquiries … there i can able to get the MIsc.Charges vouchers (Dr, Cr)

Please Any one help me…

you should set up a GL account for Misc. Charge so you can lookup this account name upon entering misc. charge in any transactions

In inventory management there is no Misc.Charges.

no, there is!

inventory management>common forms>item details>price/discount tab

take a look!

Haydee those are miscellaneous charges in a different way. The OP wants to add cost the inventory item based upon a stock transfer. There are add-ons that do this as standard Inventory II, Sable, SDS. Not easy to do I believe, but the only advice I can give is look at how the PO receipt works.

I checked in Po.

I started to do in transferOrder Form->

In transferOrder ->setup-> i placed Misc.Charger form.

I am trying to code in InventUpd_Financial Class → newInventTransferLineReceive();

I am getting the Misc.Charges values from that form.

next I want insert this values in to LedgerTrans.

In LedgerVoucher is the class → post()

I need to write how to do this can u help me…

This is the following code I did in :

InventUpd_Financial->newInventTransferLineReceive()

//added by Sunil 06-Mar-11

while select markupTrans //sum(value)

where markupTrans.TransTableId == tablenum(InventTransferLine)

&& markupTrans.TransRecId == inventTransferLine.RecId

{

_mark += markupTrans.Value;

}

//financial.parmMiscValue(_mark);

_ledgerVoucher.parmMarkupValue(_mark);

markupTable = MarkUPtable::find(markupTrans.ModuleType, markupTrans.MarkupCode);

_ledgerVoucher.parmVendAccount(markupTable.VendAccount);

// Sunil end

IN ledgerVoucher Class:

I took 2 parm Methods->

// sunil

MarkupValue parmMarkupValue(MarkupValue _locMarkupValue = _markupValue)

{

;

_markupValue = _locMarkupValue;

return _markupValue;

}

// sunil

LedgerAccount parmVendAccount(LedgerAccount _locLedgerAccount = _ledgerAccount)

{

;

_ledgerAccount = _locLedgerAccount;

return _ledgerAccount;

}

This is the code I tried in Post() method in LedgerVoucher Class

// Sunil Begin

if(_markupValue)

{

unchecked(Uncheck::TableSecurityPermission)

{

ledgerTrans.AccountNum = _ledgerAccount;

ledgerTrans.AmountCur = _markupValue;

ledgerTrans.Voucher = voucherOld;

ledgerTrans.TransDate = transDateOld;

ledgerTrans.CurrencyCode = “INR”;

ledgerTrans.doUpdate();

}

}

// Sunil end

but its getting error.

how to do this …

Sorry I am not a developer so I cannot help you in this.

Hi,

Are you getting the error in LedgerVoucher > Post method?

What is the error message that you get?

Hi check this file.

4722.Markup Error.docx (371 KB)

complie forward the object and try…

Now Parmmethod are working, may be cause of forwardCompiler.

Thanks

Naresh…

Hi Harish,

I can able to insert the Misc.Charges to ledger vouchers,

but its not affecting to the Dr. and Cr. accounts properly…

how to do this?

HI sunil,

As adam said it is not that much easy to do that. Yes you can post a Ledger Voucher but the if you want to add the Misc. Charges to the Item Cost that could be a big thing to do.[:)]

Hi Sunil,

I also have the same requirement for Transfer Orders in Ax 2012 R2. If you have done this, please help me out.

I struggled alot but not getting any solution. It’s very urgent.

Thanks in advance.