Current cost

Developers
2013-02-07
2013-03-08
  • Hi,
    We have a business partner who wants that the current cost takes into acccount the freight cost.
    Today, we enter two separates invoices for the product and for the freight because the vendors are not the same.
    Today, the current cost and freight cost are calculated separatly.

    But we want to know if there is the possibility to update the current cost with the two values?

    M_Cost.currentcostprice = cost of the product + freight cost.

    Thanks in advance for your help.

    Regards

     
  • nberisha
    nberisha
    2013-02-07

    Hi  fichtercap,

    I am not an accountant but  while developing user requirements and implementing ADempiere for my clients what I learned from accountants  costing is very important in accounting.
    Every material transaction, like material movement etc,  requires to have exact costing of material in order to have proper accounting transactions.

    Now, before giving you any help, in which case or for what purpose you need to have currentcostprice =cost of the product + freight cost, and not as it is now, as you described it in your question?

    B.R.
    Naim

     
  • Hi Naim,

    Thank you for your answer.
    Regarding the accounting, i understand and it is all right to write the material movement in an account and freight cost (or others) in an other one.
    But the need is to have a inventory evaluation calculated with the cost of the product + freight cost (landed cost).
    It is not an accounting problem but a logistic problem.
    The user wants to be sure that the inventory have the good currentcostprice (cost of the product + freight cost).

    If you can help me on this point. I thank you in advance.

    Christophe

     
  • nberisha
    nberisha
    2013-02-07

    Hi Christophe,

    I had similar requirement at beginning of my first implementation.
    Solution was to call a stored procedure that would update  current cost price for  products before displaying them in  Inventory Valuation report.

    I have modified InventoryValue class by adding following method, that was called to execute stored procedure "prc_averageinvoice" , which does what I described before.

    public void updatePriceCost() {
    Connection conn;
    String sqlUpdate = "{call prc_averageinvoice()}";

    CallableStatement cstmt = null;
    try {
    conn = DB.getConnectionID();
    cstmt = conn.prepareCall(sqlUpdate, ResultSet.TYPE_FORWARD_ONLY,
    ResultSet.CONCUR_READ_ONLY);
    cstmt.execute();

    } catch (Exception e) {
    log.log(Level.SEVERE, e.toString());
    } finally {
    DB.close(cstmt);
    cstmt = null;
    }
    }

    That was at beginning, actually I have done modification in costing so now I keep record of costing history per product and warehouse,and "current cost price" is always "cost of the product" +  "other costs", so I always know what was Inventory value at a specific date and warehouse (or in general, in client level) in the past.

    I use Weighted Average Invoice Costing in my implementations.

    I hope this will help you.

    Regards,
    Naim

     
  • Colin Rooney
    Colin Rooney
    2013-02-07

    @Christophe
    There have been lots of changes to costing in the last year - or since I last tested it at least - so do do some testing, but after that caveat there is landed cost functionality that is intended to do what you request.

    If you open the AP Invoice window, you will see there is a "Landed Costs" tab. Here you can register other AP Invoices that have been entered… for Freight for example and then allocate that AP Invoice's costs across the item on this AP Invoice (if that is not too confusing).  The distribution of the costs can by a variety of methods.

    Colin

     
  • Hi Colin and Naim

    Thanks for your help,

    I have checked with the customer and I have done all tests to find a standard solution but I think that the solution is to change the code.
    I explain why:
    I do a purchase process for my item (PO, Receipt and Invoice), the average po calculated is OK.
    My item have a currentcostprice=10.0455 for current and cumulatedqty = 200
    I do a invoice for my freight coast (an other Supplier). I have selected my cost element in the tab landed cost and my receipt of the first PO.
    In the cost detail tab, I have one line for this invoice.
    Currentcostprice = 0.9091
    But I would like to have one line to consolidate the cost of the first invoice + the freight cost.

    And in the cost detail, I would like to see:
    Currentcostprice of my item = 10.0455 + 0.9091 = 10.9546. In fact I would like to have one currentcostprice by receiptline.

    Is there a standard solution to do this or not?

    I try the examole giver by Colin but I have always to line.

     
  • ADAXA
    ADAXA
    2013-02-11

    Hi
    Have you looked at Costing Level in the Acct Schema window… Batch and Lot. Then select your preferred costing method. Could give one cost per receipt line or perhaps one for each PO or invoice line.
    If you test pls let us know the result.
    Regards

     
  • Hi all,

    We have all the cases but unfortunatly we did not find a standard solution to have a solution for my point. So we are checking the class MCost.java to manage this point. Have an average cost for a product that to take into account the purchase invoice and the freight invoice.
    I will you inform you if you are interested.

    Regards