Item charge assignment versus Transfer Order

RoelofRoelof Member Posts: 377
Hi,

It seems to be that in Navision 3.70 the Item charges for Transfer Orders doesn't work. If you create a Purchase Invoice and enter a line for Item charges and then go to the line button for the Item charge Assignment, there is an option to get Transfer Receipt Lines and then Suggest Item Charge Assignment. On Suggest Item Charge Assignment there are 2 options: Equally and Amount. Equally works but Amount does not work.

Anyone any ideas?

Thanks,
Roelof de Jong.

PS: I created the whole process in order to have my Transfer Receipt lines, that's not the issue.
Roelof de Jonghttp://www.wye.com

Comments

  • ecclecticecclectic Member Posts: 176
    hi Roelof,

    did you manage to apply the charges on transfer order. i've tried to apply charges on a transfer order in version 4.0. The suggest item charge only works when it is applied equally.

    any suggestions?

    thanks
  • RoelofRoelof Member Posts: 377
    Hi,

    No, we dropped it. We added a new function 'Weight'. Weight will apply the itemcharges based on their quantities.

    Roelof.
    Roelof de Jonghttp://www.wye.com
  • jversusjjversusj Member Posts: 489
    Codeunit 5805 SuggestAssgnt2(PurchLine2,TotalQtyToAssign,Selection)
    
    IF NOT ItemChargeAssgntPurch2.PurchLineInvoiced THEN BEGIN
        TempItemChargeAssgntPurch.INIT;
        TempItemChargeAssgntPurch := ItemChargeAssgntPurch2;
        CASE ItemChargeAssgntPurch2."Applies-to Doc. Type" OF
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::Quote,
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::Order,
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::Invoice,
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Return Order",
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Credit Memo":
                  BEGIN
                    PurchLine.GET(
                      ItemChargeAssgntPurch2."Applies-to Doc. Type",
                      ItemChargeAssgntPurch2."Applies-to Doc. No.",
                      ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                    TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                      ABS(PurchLine."Line Amount");
                  END;
             ItemChargeAssgntPurch2."Applies-to Doc. Type"::Receipt:
                  BEGIN
                   PurchRcptLine.GET(
                      ItemChargeAssgntPurch2."Applies-to Doc. No.",
                      ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                   CurrencyCode := PurchRcptLine.GetCurrencyCodeFromHeader;
                   IF CurrencyCode = PurchHeader."Currency Code" THEN
                    TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                        ABS(PurchRcptLine."Item Charge Base Amount")
                   ELSE
                    TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                        CurrExchRate.ExchangeAmtFCYToFCY(
    PurchHeader."Posting Date",CurrencyCode,PurchHeader."Currency Code",
                          ABS(PurchRcptLine."Item Charge Base Amount"));
                  END;
           ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Return Shipment":
                  BEGIN
                    ReturnShptLine.GET(
                      ItemChargeAssgntPurch2."Applies-to Doc. No.",
                      ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                    CurrencyCode := ReturnShptLine.GetCurrencyCode;
                    IF CurrencyCode = PurchHeader."Currency Code" THEN
                      TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                        ABS(ReturnShptLine."Item Charge Base Amount")
                    ELSE
                      TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                        CurrExchRate.ExchangeAmtFCYToFCY(
                          PurchHeader."Posting Date",CurrencyCode,PurchHeader."Currency Code",
                          ABS(ReturnShptLine."Item Charge Base Amount"));
                  END;
                 ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Sales Shipment":
                   BEGIN
                     SalesShptLine.GET(
                       ItemChargeAssgntPurch2."Applies-to Doc. No.",
                       ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                     CurrencyCode := SalesShptLine.GetCurrencyCode;
                     IF CurrencyCode = PurchHeader."Currency Code" THEN
                       TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                         ABS(SalesShptLine."Item Charge Base Amount")
                     ELSE
                       TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                         CurrExchRate.ExchangeAmtFCYToFCY(
                           PurchHeader."Posting Date",CurrencyCode,PurchHeader."Currency Code",
                           ABS(SalesShptLine."Item Charge Base Amount"));
                   END;
              ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Return Receipt":
                   BEGIN
                     ReturnRcptLine.GET(
                       ItemChargeAssgntPurch2."Applies-to Doc. No.",
                       ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                     CurrencyCode := ReturnRcptLine.GetCurrencyCode;
                     IF CurrencyCode = PurchHeader."Currency Code" THEN
                       TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                         ABS(ReturnRcptLine."Item Charge Base Amount")
                     ELSE
                       TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                         CurrExchRate.ExchangeAmtFCYToFCY(
                           PurchHeader."Posting Date",CurrencyCode,PurchHeader."Currency Code",
                           ABS(ReturnRcptLine."Item Charge Base Amount"));
                   END;
              END;
    

    If you read through this, you will see there is no code to execute when the Apply-to document type = Transfer Receipt. Therefore, the TempItemChargeAssgntPurch fields don't get calculated and cannot be assigned in the next trigger which handles that aspect.

    Anyone know why Navision doesn't include the transfer receipt in this logic? We are trying to assigned costs to a particular transfer receipt by amount and are having the same trouble the earlier postings mention.
    kind of fell into this...
  • LibertyMountainLibertyMountain Member Posts: 94
    We are on NAV 2009 RTM version. this bug still seems to exist. I can apply equally, but I cannot apply by amount when my document lines are a transfer receipt.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    We are on NAV 2009 RTM version. this bug still seems to exist. I can apply equally, but I cannot apply by amount when my document lines are a transfer receipt.

    The reason is because there is no amount in the transfer records.
  • LibertyMountainLibertyMountain Member Posts: 94
    yes. but you read throught the online documentation and it suggests you should be able to apply to a transfer document, and the suggest an application either by amount or equally.

    besides, the transfer line has FK to the item ledger entry where you can figure the cost.

    Here's the additional CASE statement that I think should exist, if anyone wants to provide input:
                //2010-027 BEGIN
                ItemChargeAssgntPurch2."Applies-to Doc. Type"::"Transfer Receipt":
                  BEGIN
                    TransRcptLine.GET(
                      ItemChargeAssgntPurch2."Applies-to Doc. No.",
                      ItemChargeAssgntPurch2."Applies-to Doc. Line No.");
                    ItemLedgerEntry.GET(TransRcptLine."Item Rcpt. Entry No.");
                    ItemLedgerEntry.CALCFIELDS("Item Cost Amount (Actual)");
                    // "Item Cost Amount (Actual)" is a custom field that sums value entries where "Item Charge" is blank.
                    TempItemChargeAssgntPurch."Applies-to Doc. Line Amount" :=
                      ABS(ItemLedgerEntry."Item Cost Amount (Actual)");
                  END;
                //2010-027 END
    
  • LibertyMountainLibertyMountain Member Posts: 94
    This seems to work. however, a piece of logic is necessary to weed out receipt lines where quantity received (base) = 0. those records have "Item Rcpt. Entry No." = 0. and the "Item Ledger Entry".GET will fail. or similarly do an IF on the ile.GET to error handle this.
  • mrc_hanmrc_han Member Posts: 11
    Short of making a code modification and depending on the number of lines on the Transfer Receipt, one work around is to do an invoice line for each Transfer Receipt Line. Then applying "equally" is the full amount for one line. May be cumbersome if you have quite a lot of Transfer Receipt Lines but is a valid work-around.
Sign In or Register to comment.