I am inserting unit price as 0 from Al code, and I want to update my subtotal value to 0, but field is showing blank, so is zero number displayed as blank?
This is code
// Create Return Order recordNo := cdu_EnquiriesAndReturns.createSalesReturnOrder(Rec); ToSalesReturnOrder.SetRange("No.", recordNo); if ToSalesReturnOrder.FindSet() then begin ToSalesReturnOrder."Document Date" := Today; ToSalesReturnOrder.Validate("Document Date"); ToSalesReturnOrder."Posting Date" := Today; ToSalesReturnOrder.Validate("Posting Date"); ToSalesReturnOrder."VAT Reporting Date" := Today; ToSalesReturnOrder.Validate("VAT Reporting Date"); ToSalesReturnOrder."Order Date" := Today; ToSalesReturnOrder.Validate("Order Date"); // ToSalesReturnOrder."Location Code" := 'ZRETURNS'; // ToSalesReturnOrder.Validate("Location Code"); ToSalesReturnOrder.Modify(true); end; rec_EnquiriesLineA.SetRange("Document No.", Rec.No); if rec_EnquiriesLineA.FindSet() then begin repeat rec_SalesLinesA.SetRange("Document No.", recordNo); rec_SalesLinesA.SetRange("Document Type", enum_DocumentType::"Return Order"); //rec_SalesLinesA.SetRange("Line No.", rec_EnquiriesLineA."Line No."); if rec_SalesLinesA.FindSet() then begin rec_SalesLinesA.Quantity := rec_EnquiriesLineA."Return/Replace"; rec_SalesLinesA.Validate(Quantity); rec_SalesLinesA."Return Qty. to Receive" := rec_EnquiriesLineA."Return/Replace"; rec_SalesLinesA.Validate("Return Qty. to Receive"); rec_SalesLinesA."Return Reason Code" := rec_EnquiriesLineA."Return Reason Code"; rec_SalesLinesA.Validate("Return Reason Code"); exitvalue := rec_SalesLinesA."Total Returned"; total := rec_EnquiriesLineA."Return/Replace"; rec_SalesLinesA."Unit Price" := 0.00; rec_SalesLinesA.Validate("Unit Price"); rec_SalesLinesA.Modify(true); rec_SalesLineRetuurned.SetRange("Document No.", recordNo); rec_SalesLineRetuurned.SetRange("Document Type", enum_DocumentType::"Return Order"); rec_SalesLineRetuurned.SetRange("Line No.", rec_EnquiriesLineA."Line No."); if rec_SalesLineRetuurned.FindFirst() then begin exitvalue := rec_SalesLineRetuurned."Total Returned"; rec_SalesLineRetuurned."Total Returned" := exitvalue + total; rec_SalesLineRetuurned.Modify(true); end;