Show the posted sales invoice page 'unit of measure' to report

Jacob1227Jacob1227 Member Posts: 128
Hi All,

In the sales invoice report, 'unit of measure' is not available(empty) in the 'sales invoice line table' but the 'unit of measure' is present(available) in the 'posted sales invoice page' for the same item.

I used to show the 'unit of measure' field from 'sales invoice line' table. But it's empty now.

So, How can I show the 'Unit of measure' in the report from the 'Posted sale invoice page'(Posted sales invoice subform) for the particular item?


Thanks,
Jacob.A.

Answers

  • mucamuca Member Posts: 42
    edited 2019-12-11
    Not know in which navision version, but this code should be from Financials times
      IF NOT UnitOfMeasure.GET("Unit of Measure Code") THEN
        UnitOfMeasure.INIT;
      "Unit of Measure" := UnitOfMeasure.Description;
      GetSalesHeader;
      IF SalesHeader."Language Code" <> '' THEN BEGIN
        UnitOfMeasureTranslation.SETRANGE(Code,"Unit of Measure Code");
        UnitOfMeasureTranslation.SETRANGE("Language Code",SalesHeader."Language Code");
        IF UnitOfMeasureTranslation.FINDFIRST THEN
          "Unit of Measure" := UnitOfMeasureTranslation.Description;
      END;
    
    I think You Get it because You do not have descriptions for unit of measure codes
    also when You have Invoices using language then You should check unit of measure translations (field Description)

    In existing situation for Posted Invoices I think the train is gone/
    possible in similar way You can update the existing posted sales lines....
    OR
    change page/report on after get sales line.
Sign In or Register to comment.