Purchase Order Report (Excise and Tax problem)
Markandey_Pandey
Member Posts: 178
Hi all,
i am using the blanket purchase order report. here Excise and tax is getting calculated only for the first line and is not calculated for the rest of the lines.
i am using the blanket purchase order report. here Excise and tax is getting calculated only for the first line and is not calculated for the rest of the lines.
OBJECT Report 50065 Blanket Purchase Order Main
{
OBJECT-PROPERTIES
{
Date=15/12/09;
Time=[ 6:48:44 PM];
Modified=Yes;
Version List=NAVW16.00;
}
PROPERTIES
{
CaptionML=ENU=Blanket Purchase Order MEW;
TopMargin=1000;
BottomMargin=0;
LeftMargin=1000;
HorzGrid=210;
}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table38;
DataItemTableView=SORTING(Document Type,No.)
WHERE(Document Type=CONST(Blanket Order));
NewPagePerRecord=Yes;
ReqFilterHeadingML=ENU=Blanket Purchase Order;
OnAfterGetRecord=BEGIN
CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");
CompanyInfo.GET;
IF RespCenter.GET("Responsibility Center") THEN BEGIN
FormatAddr.RespCenter(CompanyAddr,RespCenter);
CompanyInfo."Phone No." := RespCenter."Phone No.";
CompanyInfo."Fax No." := RespCenter."Fax No.";
END ELSE
FormatAddr.Company(CompanyAddr,CompanyInfo);
DocDim1.SETRANGE("Table ID",DATABASE::"Purchase Header");
DocDim1.SETRANGE("Document Type","Purchase Header"."Document Type");
DocDim1.SETRANGE("Document No.","Purchase Header"."No.");
IF "Purchaser Code" = '' THEN BEGIN
SalesPurchPerson.INIT;
PurchaserText := '';
END ELSE BEGIN
SalesPurchPerson.GET("Purchaser Code");
PurchaserText := Text000
END;
IF "Your Reference" = '' THEN
ReferenceText := ''
ELSE
ReferenceText := FIELDCAPTION("Your Reference");
IF "VAT Registration No." = '' THEN
VATNoText := ''
ELSE
VATNoText := FIELDCAPTION("VAT Registration No.");
FormatAddr.PurchHeaderPayTo(VendAddr,"Purchase Header");
IF "Shipment Method Code" = '' THEN
ShipmentMethod.INIT
ELSE BEGIN
ShipmentMethod.GET("Shipment Method Code");
ShipmentMethod.TranslateDescription(ShipmentMethod,"Language Code");
END;
//Markandey 23/nov/09
IF "Payment Terms Code" = '' THEN
PaymentTerms.INIT
ELSE BEGIN
PaymentTerms.GET("Payment Terms Code");
PaymentTerms.TranslateDescription(PaymentTerms,"Language Code");
END;
FormatAddr.PurchHeaderShipTo(ShipToAddr,"Purchase Header");
IF LogInteraction THEN
IF NOT CurrReport.PREVIEW THEN
SegManagement.LogDocument(
12,"No.",0,0,DATABASE::Vendor,"Pay-to Vendor No.","Purchaser Code",'',"Posting Description",'');
END;
ReqFilterFields=No.,Buy-from Vendor No.,No. Printed;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=1;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number);
NewPagePerRecord=Yes;
DataItemVarName=CopyLoop;
OnPreDataItem=BEGIN
IF ISSERVICETIER THEN
OutputNo := 1;
NoOfLoops := ABS(NoOfCopies) + 1;
CopyText := '';
SETRANGE(Number,1,NoOfLoops);
END;
OnAfterGetRecord=BEGIN
CLEAR(PurchLine);
CLEAR(PurchPost);
PurchLine.DELETEALL;
PurchPost.GetPurchLines("Purchase Header",PurchLine,0);
IF Number > 1 THEN BEGIN
CopyText := Text001;
IF ISSERVICETIER THEN
OutputNo += 1;
END;
CurrReport.PAGENO := 1;
END;
OnPostDataItem=BEGIN
IF NOT CurrReport.PREVIEW THEN
PurchCountPrinted.RUN("Purchase Header");
END;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=2;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=CONST(1));
DataItemVarName=PageLoop;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Header;
PrintOnEveryPage=Yes;
SectionWidth=19320;
SectionHeight=8883;
OnPreSection=BEGIN
"Purchase Header".RESET;
"Purchase Header".SETRANGE("Purchase Header"."No.","Purchase Line"."Document No.");
IF "Purchase Header"."Shortcut Dimension 1 Code"='ARB' THEN
ProfitCentre:='Anti Roll Assembly'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='BA' THEN
ProfitCentre:='Brake Assembly'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='CS' THEN
ProfitCentre:='Coil Spring'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='ARB/BA' THEN
ProfitCentre:='Anti Roll Assembly/Brake Assembly'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='ARB/CS' THEN
ProfitCentre:='Anti Roll Assembly/Coil Spring'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='BA/CS' THEN
ProfitCentre:='Brake Assembly/Coil Spring'
ELSE IF "Purchase Header"."Shortcut Dimension 1 Code"='ALL' THEN
ProfitCentre:='All Profit Centres';
END;
}
CONTROLS
{
{ 4 ;TextBox ;840 ;5076 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[1];
DataSetFieldName=VendAddr_1_ }
{ 5 ;TextBox ;10710;423 ;7770 ;423 ;HorzAlign=Left;
FontSize=12;
FontBold=Yes;
SourceExpr=CompanyAddr[1];
DataSetFieldName=CompanyAddr_1_ }
{ 6 ;TextBox ;840 ;5499 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[2];
DataSetFieldName=VendAddr_2_ }
{ 7 ;TextBox ;10710;846 ;7770 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=CompanyAddr[2];
DataSetFieldName=CompanyAddr_2_ }
{ 8 ;TextBox ;840 ;5922 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[3];
DataSetFieldName=VendAddr_3_ }
{ 9 ;TextBox ;10710;1269 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=CompanyAddr[3];
DataSetFieldName=CompanyAddr_3_ }
{ 10 ;TextBox ;840 ;6345 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[4];
DataSetFieldName=VendAddr_4_ }
{ 11 ;TextBox ;12600;1269 ;4200 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=CompanyInfo.City;
DataSetFieldName=CompanyAddr_4_ }
{ 12 ;TextBox ;840 ;6768 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[5];
DataSetFieldName=VendAddr_5_ }
{ 13 ;Label ;10710;2115 ;1680 ;423 ;ParentControl=14;
HorzAlign=Left;
FontSize=9;
FontBold=Yes;
DataSetFieldName=CompanyInfo__Phone_No__Caption }
{ 14 ;TextBox ;12600;2115 ;4830 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Phone No.;
SourceExpr=CompanyInfo."Phone No.";
DataSetFieldName=CompanyInfo__Phone_No__ }
{ 15 ;TextBox ;840 ;7191 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[6];
DataSetFieldName=VendAddr_6_ }
{ 20 ;Label ;6720 ;3384 ;4200 ;423 ;Visible=Yes;
HorzAlign=Center;
FontSize=10;
FontBold=Yes;
CaptionML=ENU=PURCHASE ORDER;
DataSetFieldName=CompanyInfo__Giro_No__Caption }
{ 26 ;Label ;10920;4653 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Purchase Order Date;
DataSetFieldName=Purchase_Header___Pay_to_Vendor_No__Caption }
{ 28 ;TextBox ;15120;4653 ;1890 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."Document Date";
DataSetFieldName=FORMAT__Purchase_Header___Document_Date__0_4_ }
{ 35 ;Label ;10920;4230 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Purchase Order No.;
DataSetFieldName=Blanket_Purchase_Order_No_Caption }
{ 36 ;TextBox ;15120;4230 ;2100 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."No.";
DataSetFieldName=Purchase_Header___No__ }
{ 3 ;TextBox ;840 ;7614 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[7];
DataSetFieldName=VendAddr_7_ }
{ 74 ;TextBox ;840 ;8037 ;6300 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=VendAddr[8];
DataSetFieldName=VendAddr_8_ }
{ 75 ;TextBox ;12390;1692 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=CompanyInfo."Post Code";
DataSetFieldName=CompanyAddr_5_ }
{ 76 ;TextBox ;14070;1692 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=Text006;
DataSetFieldName=CompanyAddr_6_ }
{ 1000000000;TextBox;2310 ;423 ;4200 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."E.C.C. No." }
{ 1000000001;Label ;840 ;423 ;1470 ;423 ;ParentControl=1000000000;
VertAlign=Bottom;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=ECC No. }
{ 1000000002;TextBox;2310 ;846 ;5880 ;423 ;HorzAlign=Left;
FontName=8;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."C.E. Range" }
{ 1000000003;Label ;840 ;846 ;1470 ;423 ;ParentControl=1000000002;
VertAlign=Bottom;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Range }
{ 1000000004;TextBox;2310 ;1269 ;5670 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."C.E. Division" }
{ 1000000005;Label ;840 ;1269 ;1470 ;423 ;ParentControl=1000000004;
VertAlign=Bottom;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Division }
{ 1000000006;TextBox;2310 ;1692 ;3570 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."C.S.T No." }
{ 1000000007;Label ;840 ;1692 ;1470 ;423 ;ParentControl=1000000006;
VertAlign=Bottom;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=CST No. }
{ 1000000008;TextBox;2310 ;2115 ;3570 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."T.I.N. No." }
{ 1000000009;Label ;840 ;2115 ;1470 ;423 ;ParentControl=1000000008;
VertAlign=Bottom;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=TIN No. }
{ 1000000010;TextBox;15960;1692 ;1890 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=Text007 }
{ 1000000011;TextBox;11760;2538 ;3150 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
SourceExpr=CompanyInfo."E-Mail" }
{ 1000000012;Label ;10710;2538 ;1050 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Email :- }
{ 1000000013;TextBox;2310 ;2538 ;3570 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=CompanyInfo."P.A.N. No." }
{ 1000000014;Label ;840 ;2538 ;1470 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
CaptionML=ENU=PAN No. }
{ 1000000016;Label ;10710;1692 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Pin Code:;
DataSetFieldName=CompanyInfo__Phone_No__Caption_ }
{ 1000000017;Label ;12180;1269 ;210 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=, }
{ 1000000018;Label ;13860;1692 ;210 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=, }
{ 1000000019;Label ;15750;1692 ;210 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=, }
{ 1000000015;Label ;10920;5499 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Enquiry No }
{ 1000000020;Label ;10920;5922 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Enquiry Date }
{ 1000000021;Label ;10920;6768 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Quotation Date }
{ 1000000022;Label ;10920;6345 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Quotation No. }
{ 1000000023;Label ;10920;7191 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Amendment No./Date }
{ 1000000024;Label ;10920;7614 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Rate With Effect From }
{ 1000000025;Label ;10920;8037 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
FontBold=Yes;
CaptionML=ENU=Responsibility Center }
{ 1000000026;TextBox;15120;7191 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."Amendment No." }
{ 1000000027;TextBox;16800;7191 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."Amendment Date" }
{ 1000000028;TextBox;15120;8037 ;3990 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr=ProfitCentre }
{ 1000000029;TextBox;15120;7614 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."Rate With Effect From" }
{ 1000000036;Shape ;210 ;0 ;18900;4230 }
{ 1000000047;Shape ;210 ;3384 ;18900;5499 }
{ 1000000049;Shape ;8820 ;5076 ;10290;423 ;ShapeStyle=HorzLine }
{ 1000000050;Shape ;8400 ;4230 ;840 ;4653 ;ShapeStyle=VertLine }
{ 1000000052;TextBox;15120;6345 ;2310 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Header"."Quote No." }
}
}
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=FILTER(1..));
DataItemVarName=DimensionLoop1;
OnPreDataItem=BEGIN
IF NOT ShowInternalInfo THEN
CurrReport.BREAK;
END;
OnAfterGetRecord=BEGIN
IF Number = 1 THEN BEGIN
IF NOT DocDim1.FIND('-') THEN
CurrReport.BREAK;
END ELSE
IF NOT Continue THEN
CurrReport.BREAK;
CLEAR(DimText);
Continue := FALSE;
REPEAT
OldDimText := DimText;
IF DimText = '' THEN
DimText := STRSUBSTNO(
'%1 - %2',DocDim1."Dimension Code",DocDim1."Dimension Value Code")
ELSE
DimText :=
STRSUBSTNO(
'%1; %2 - %3',DimText,
DocDim1."Dimension Code",DocDim1."Dimension Value Code");
IF STRLEN(DimText) > MAXSTRLEN(OldDimText) THEN BEGIN
DimText := OldDimText;
Continue := TRUE;
EXIT;
END;
UNTIL (DocDim1.NEXT = 0);
END;
DataItemLinkReference=Purchase Header;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table39;
DataItemTableView=SORTING(Document Type,Document No.,Line No.);
OnPreDataItem=BEGIN
CurrReport.BREAK;
END;
DataItemLinkReference=Purchase Header;
DataItemLink=Document Type=FIELD(Document Type),
Document No.=FIELD(No.);
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number);
DataItemVarName=RoundLoop;
OnPreDataItem=BEGIN
MoreLines := PurchLine.FIND('+');
WHILE MoreLines AND (PurchLine.Description = '') AND (PurchLine."Description 2"= '') AND
(PurchLine."No." = '') AND (PurchLine.Quantity = 0) AND
(PurchLine.Amount = 0)
DO
// "Purchase Line".RESET;
// "Purchase Line".SETRANGE("Purchase Line"."Document No.","Purchase Header"."No.");
BEDAmt:= BEDAmt+"Purchase Line"."BED Amount";
eCessAmt:=eCessAmt+"Purchase Line"."eCess Amount";
SHECessAmt:=SHECessAmt+"Purchase Line"."SHE Cess Amount";
PkgCharge:="Purchase Line"."Charges To Vendor";
TotalExcise:= BEDAmt+ eCessAmt+SHECessAmt;
TaxAmt:="Purchase Line"."Tax Amount";
StAmt:="Purchase Line"."Service Tax Amount";
TotalValue:="Purchase Line".Amount+ TotalExcise+ PkgCharge+TaxAmt+ StAmt;
// RepCheck.InitTextVariable;
// RepCheck.FormatNoText(NoText,TotalValue,"Purchase Header"."Currency Code");
MoreLines := PurchLine.NEXT(-1) <> 0;
IF NOT MoreLines THEN
CurrReport.BREAK;
PurchLine.SETRANGE("Line No.",0,PurchLine."Line No.");
SETRANGE(Number,1,PurchLine.COUNT);
{
MoreLines := PurchLine.FIND('+');
WHILE MoreLines AND (PurchLine.Description = '') AND (PurchLine."Description 2"= '') AND
(PurchLine."No." = '') AND (PurchLine.Quantity = 0) AND
(PurchLine.Amount = 0) DO
MoreLines := PurchLine.NEXT(-1) <> 0;
IF NOT MoreLines THEN
CurrReport.BREAK;
PurchLine.SETRANGE("Line No.",0,PurchLine."Line No.");
SETRANGE(Number,1,PurchLine.COUNT);
CurrReport.CREATETOTALS(PurchLine."Line Amount",PurchLine."Inv. Discount Amount",
PurchLine."Excise Amount",PurchLine."Tax Amount",PurchLine."Service Tax Amount",
PurchLine."Service Tax eCess Amount",PurchLine."Total TDS Including SHE CESS",PurchLine."Work Tax Amount",
PurchLine."Amount To Vendor");
CurrReport.CREATETOTALS(PurchLine."Service Tax SHE Cess Amount");
}
END;
OnAfterGetRecord=VAR
StructureLineDetails@1000000000 : Record 13795;
BEGIN
IF Number = 1 THEN
PurchLine.FIND('-')
ELSE
PurchLine.NEXT;
"Purchase Line" := PurchLine;
DocDim2.SETRANGE("Table ID",DATABASE::"Purchase Line");
DocDim2.SETRANGE("Document Type","Purchase Line"."Document Type");
DocDim2.SETRANGE("Document No.","Purchase Line"."Document No.");
DocDim2.SETRANGE("Line No.","Purchase Line"."Line No.");
{
IF Number = 1 THEN
PurchLine.FIND('-')
ELSE
PurchLine.NEXT;
"Purchase Line" := PurchLine;
IF NOT "Purchase Header"."Prices Including VAT" AND
(PurchLine."VAT Calculation Type" = PurchLine."VAT Calculation Type"::"Full VAT")
THEN
PurchLine."Line Amount" := 0;
IF (PurchLine.Type = PurchLine.Type::"G/L Account") AND (NOT ShowInternalInfo) THEN
"Purchase Line"."No." := '';
StructureLineDetails.RESET;
StructureLineDetails.SETRANGE(StructureLineDetails.Type,StructureLineDetails.Type::Purchase);
StructureLineDetails.SETRANGE(StructureLineDetails."Document Type",PurchLine."Document Type");
StructureLineDetails.SETRANGE(StructureLineDetails."Document No.",PurchLine."Document No.");
StructureLineDetails.SETRANGE(StructureLineDetails."Item No.",PurchLine."No.");
StructureLineDetails.SETRANGE("Line No.",PurchLine."Line No.");
IF StructureLineDetails.FIND('-') THEN
REPEAT
IF NOT StructureLineDetails."Payable to Third Party" THEN BEGIN
IF StructureLineDetails."Tax/Charge Type" = StructureLineDetails."Tax/Charge Type"::Charges THEN
ChargesAmount := ChargesAmount + ROUND(StructureLineDetails.Amount);
IF StructureLineDetails."Tax/Charge Type" = StructureLineDetails."Tax/Charge Type"::"Other Taxes" THEN
OtherTaxesAmount := OtherTaxesAmount + ROUND(StructureLineDetails.Amount);
END;
UNTIL StructureLineDetails.NEXT = 0;
IF ISSERVICETIER THEN
AllowInvDisctxt := FORMAT("Purchase Line"."Allow Invoice Disc.");
}
END;
OnPostDataItem=BEGIN
PurchLine.DELETEALL;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Header;
SectionWidth=19320;
SectionHeight=846;
}
CONTROLS
{
{ 44 ;Label ;13650;0 ;1680 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Rate;
DataSetFieldName=Purchase_Line___Expected_Receipt_Date__Control55Caption }
{ 43 ;Label ;11130;0 ;2520 ;423 ;ParentControl=54;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
DataSetFieldName=Purchase_Line___Unit_of_Measure__Control54Caption }
{ 42 ;Label ;9240 ;0 ;1890 ;423 ;ParentControl=53;
HorzAlign=Left;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
DataSetFieldName=Purchase_Line__Quantity_Control53Caption }
{ 41 ;Label ;3570 ;0 ;5670 ;423 ;ParentControl=52;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
DataSetFieldName=Purchase_Line__Description_Control52Caption }
{ 40 ;Label ;1260 ;0 ;2310 ;423 ;ParentControl=51;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Part No.;
DataSetFieldName=Purchase_Line___No__Caption }
{ 39 ;Label ;420 ;0 ;630 ;423 ;ParentControl=50;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=SN;
DataSetFieldName=Purchase_Line___Vendor_Item_No__Caption }
{ 81 ;TextBox ;18690;0 ;150 ;423 ;Name=ShowInternalInfo;
Visible=No;
ForeColor=65535;
SourceExpr=ShowInternalInfo;
DataSetFieldName=ShowInternalInfo }
{ 83 ;TextBox ;18900;0 ;150 ;423 ;Name="Purchase Line".Type;
Visible=No;
ForeColor=65535;
SourceExpr=FORMAT("Purchase Line".Type,0,2);
DataSetFieldName=Purchase_Line__Type }
{ 1000000031;Label ;15330;0 ;1680 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Disc. %;
DataSetFieldName=Purchase_Line___Expected_Receipt_Date__Control }
{ 1000000032;Label ;17010;0 ;2100 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Value;
DataSetFieldName=Purchase_Line___Expected_Receipt_Date }
{ 1000000054;Shape ;0 ;0 ;420 ;423 ;ShapeStyle=VertLine }
{ 1000000030;Shape ;210 ;0 ;18900;846 }
}
}
{ PROPERTIES
{
SectionType=Body;
SectionWidth=19320;
SectionHeight=846;
OnPreSection=BEGIN
CASE PurchLine.Type OF
PurchLine.Type::Item:
Item.GET(PurchLine."No.");
PurchLine.Type::"Fixed Asset":
FA.GET(PurchLine."No.");
END;
CurrReport.SHOWOUTPUT(
(PurchLine.Type = PurchLine.Type::Item) OR
(PurchLine.Type = PurchLine.Type::"Fixed Asset") OR
((PurchLine.Type = PurchLine.Type::"G/L Account") AND ShowInternalInfo));
CurrReport.SHOWOUTPUT(PurchLine.Type > 0);
//PurchLine.RESET();
//PurchLine.SETRANGE();
//PurchHeader.RESET();
//PurchHeader.SETRANGE(PurchHeader."No.",PurchLine."Document No.");
// IF(PurchLine.FIND('-')) THEN
// BEGIN
// Qty:=PurchLine.Quantity;
// Rate:=PurchLine."Unit Price (LCY)";
// AssValue:=PurchLine."Assessable Value";
// DiscPercent:=PurchLine."Line Discount %";
// END;
IF "Purchase Header"."No."<>'' THEN
SNo:=SNo+1;
//PurchLine.RESET;
//PurchLine.SETRANGE(PurchLine."Document No.","Purchase Header"."No.");
END;
}
CONTROLS
{
{ 54 ;TextBox ;11340;0 ;2310 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Line"."Unit of Measure" }
{ 53 ;TextBox ;9450 ;0 ;1890 ;423 ;HorzAlign=Left;
FontSize=9;
BlankZero=Yes;
SourceExpr="Purchase Line".Quantity }
{ 52 ;TextBox ;3570 ;0 ;5880 ;423 ;FontSize=9;
SourceExpr="Purchase Line".Description }
{ 51 ;TextBox ;1260 ;0 ;2310 ;423 ;HorzAlign=Left;
FontSize=9;
CaptionML=ENU=Our No.;
SourceExpr="Purchase Line"."No." }
{ 50 ;TextBox ;420 ;0 ;420 ;423 ;HorzAlign=Left;
FontSize=9;
CaptionML=ENU=No.;
SourceExpr=SNo }
{ 1000000033;TextBox;13650;0 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Line"."Direct Unit Cost" }
{ 1000000034;TextBox;15330;0 ;1470 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Line"."Line Discount %" }
{ 1000000035;TextBox;16800;0 ;2310 ;423 ;HorzAlign=Left;
FontSize=9;
SourceExpr="Purchase Line"."Line Amount" }
}
}
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=FILTER(1..));
DataItemVarName=DimensionLoop2;
OnPreDataItem=BEGIN
IF NOT ShowInternalInfo THEN
CurrReport.BREAK;
END;
OnAfterGetRecord=BEGIN
IF Number = 1 THEN BEGIN
IF NOT DocDim2.FIND('-') THEN
CurrReport.BREAK;
END ELSE
IF NOT Continue THEN
CurrReport.BREAK;
CLEAR(DimText);
Continue := FALSE;
REPEAT
OldDimText := DimText;
IF DimText = '' THEN
DimText := STRSUBSTNO(
'%1 - %2',DocDim2."Dimension Code",DocDim2."Dimension Value Code")
ELSE
DimText :=
STRSUBSTNO(
'%1; %2 - %3',DimText,
DocDim2."Dimension Code",DocDim2."Dimension Value Code");
IF STRLEN(DimText) > MAXSTRLEN(OldDimText) THEN BEGIN
DimText := OldDimText;
Continue := TRUE;
EXIT;
END;
UNTIL (DocDim2.NEXT = 0);
END;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=CONST(1));
DataItemVarName=Total;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=19320;
SectionHeight=10575;
OnPreSection=VAR
RepCheck@1000000000 : Report 1401;
BEGIN
// "Purchase Line".RESET;
// "Purchase Line".SETRANGE("Purchase Line"."Document No.","Purchase Header"."No.");
BEDAmt:= BEDAmt+"Purchase Line"."BED Amount";
eCessAmt:=eCessAmt+"Purchase Line"."eCess Amount";
SHECessAmt:=SHECessAmt+"Purchase Line"."SHE Cess Amount";
PkgCharge:="Purchase Line"."Charges To Vendor";
TotalExcise:= BEDAmt+ eCessAmt+SHECessAmt;
TaxAmt:="Purchase Line"."Tax Amount";
StAmt:="Purchase Line"."Service Tax Amount";
TotalValue:="Purchase Line".Amount+ TotalExcise+ PkgCharge+TaxAmt+ StAmt;
RepCheck.InitTextVariable;
RepCheck.FormatNoText(NoText,TotalValue,"Purchase Header"."Currency Code");
END;
}
CONTROLS
{
{ 1000000043;Label ;12600;2115 ;2940 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=No;
MultiLine=Yes;
CaptionML=ENU=Excise Amount }
{ 1000000040;Label ;12600;2538 ;2940 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=No;
MultiLine=Yes;
CaptionML=ENU=Tax Amount }
{ 1000000042;Label ;12600;2961 ;2940 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=No;
MultiLine=Yes;
CaptionML=ENU=Service Tax Amount }
{ 1000000041;Label ;12600;3807 ;2940 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Total Value }
{ 1000000037;TextBox;16170;1692 ;2520 ;423 ;FontSize=9;
SourceExpr=PkgCharge }
{ 1000000038;Label ;12600;1692 ;2940 ;423 ;ParentControl=1000000037;
VertAlign=Bottom;
FontSize=9;
FontBold=No;
MultiLine=Yes;
CaptionML=ENU=Packing Charge }
{ 1000000039;TextBox;16170;2115 ;2520 ;423 ;FontSize=9;
SourceExpr=TotalExcise }
{ 1000000044;TextBox;16170;2538 ;2520 ;423 ;FontSize=9;
SourceExpr=TaxAmt }
{ 1000000045;TextBox;16170;2961 ;2520 ;423 ;FontSize=9;
SourceExpr=StAmt }
{ 1000000046;TextBox;15960;3807 ;2730 ;423 ;FontSize=9;
FontBold=Yes;
SourceExpr=TotalValue }
{ 1000000048;TextBox;420 ;1692 ;11130;1269 ;FontSize=9;
FontBold=Yes;
MultiLine=Yes;
SourceExpr=NoText[1] }
{ 1000000051;Shape ;0 ;4230 ;19110;1269 }
{ 65 ;Label ;210 ;4653 ;3990 ;423 ;FontSize=9;
FontBold=Yes;
CaptionML=ENU=TERMS AND CONDITIONS;
DataSetFieldName=Ship_to_AddressCaption }
{ 1000000068;Label ;210 ;5499 ;3360 ;423 ;ParentControl=1000000073;
VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=1. Payment Terms }
{ 1000000069;Label ;210 ;5922 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=2. Excise Term }
{ 1000000070;Label ;210 ;6345 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=3. Mode of Transport }
{ 1000000071;Label ;210 ;6768 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=4. Delivery At }
{ 1000000072;Label ;210 ;7191 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=5. Delivery Instruction }
{ 1000000073;TextBox;4200 ;5499 ;7350 ;423 ;FontSize=9;
SourceExpr=PaymentTerms.Description }
{ 1000000074;TextBox;4200 ;5922 ;7350 ;423 ;FontSize=9;
SourceExpr="Purchase Header"."Excise Term" }
{ 1000000075;TextBox;4200 ;6345 ;7350 ;423 ;FontSize=9;
SourceExpr=ShipmentMethod.Description }
{ 1000000077;TextBox;4200 ;7191 ;14490;423 ;FontSize=9;
FontBold=No;
SourceExpr="Purchase Header"."Delivery Instruction" }
{ 1000000078;Label ;210 ;8037 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=Remarks: }
{ 1000000079;Label ;210 ;7614 ;3360 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=6. General Remarks }
{ 1000000080;TextBox;4200 ;7614 ;14490;423 ;FontSize=9;
SourceExpr="Purchase Header"."General Remarks" }
{ 1000000081;TextBox;210 ;8460 ;9450 ;423 ;FontSize=9;
SourceExpr=Remarks1 }
{ 1000000082;TextBox;210 ;9306 ;9450 ;846 ;FontSize=9;
MultiLine=Yes;
SourceExpr=Remarks3 }
{ 1000000083;TextBox;210 ;8883 ;9450 ;423 ;FontSize=9;
SourceExpr=Remarks2 }
{ 1000000084;Shape ;0 ;5499 ;19110;5076 }
{ 1000000058;Label ;4200 ;6768 ;7350 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=No;
MultiLine=Yes;
CaptionML=ENU=AT Jamshedpur Works }
{ 1000000061;TextBox;12390;8883 ;6300 ;423 ;FontSize=10;
FontBold=Yes;
SourceExpr=Text004 }
{ 1000000062;TextBox;15120;9729 ;3570 ;423 ;FontSize=9;
SourceExpr=Text005 }
{ 1000000059;Label ;15540;1692 ;210 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=: }
{ 1000000060;Label ;15540;2115 ;210 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=: }
{ 1000000063;Label ;15540;2538 ;210 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=: }
{ 1000000064;Label ;15540;2961 ;210 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=: }
{ 1000000065;Label ;15540;3807 ;210 ;423 ;VertAlign=Bottom;
FontSize=9;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=: }
{ 1000000066;Shape ;12600;3384 ;6090 ;423 ;ShapeStyle=HorzLine }
}
}
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=CONST(1));
DataItemVarName=Total2;
OnPreDataItem=BEGIN
IF "Purchase Header"."Buy-from Vendor No." = "Purchase Header"."Pay-to Vendor No." THEN
CurrReport.BREAK;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=19320;
SectionHeight=0;
}
CONTROLS
{
}
}
}
}
{ PROPERTIES
{
DataItemIndent=3;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=CONST(1));
DataItemVarName=Total3;
OnPreDataItem=BEGIN
IF ("Purchase Header"."Sell-to Customer No." = '') AND (ShipToAddr[1] = '') THEN
CurrReport.BREAK;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=19320;
SectionHeight=0;
OnPreSection=BEGIN
CurrReport.SHOWOUTPUT := "Purchase Header"."Sell-to Customer No." <> '';
END;
}
CONTROLS
{
}
}
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=5060;
Height=1540;
SaveValues=Yes;
OnOpenForm=BEGIN
LogInteraction := SegManagement.FindInteractTmplCode(12) <> '';
RequestOptionsForm.LogInteraction.ENABLED(LogInteraction);
END;
}
CONTROLS
{
{ 1 ;TextBox ;3410 ;0 ;1650 ;440 ;CaptionML=ENU=No. of Copies;
SourceExpr=NoOfCopies }
{ 21 ;Label ;0 ;0 ;3300 ;440 ;ParentControl=1 }
{ 2 ;CheckBox ;3410 ;550 ;440 ;440 ;ShowCaption=No;
CaptionML=ENU=Show Internal Information;
SourceExpr=ShowInternalInfo }
{ 3 ;Label ;0 ;550 ;3300 ;440 ;ParentControl=2 }
{ 4 ;CheckBox ;3410 ;1100 ;440 ;440 ;Name=LogInteraction;
ShowCaption=No;
CaptionML=ENU=Log Interaction;
SourceExpr=LogInteraction }
{ 5 ;Label ;0 ;1100 ;3300 ;440 ;ParentControl=4 }
}
}
REQUESTPAGE
{
PROPERTIES
{
OnInit=BEGIN
LogInteractionEnable := TRUE;
END;
OnOpenPage=BEGIN
LogInteraction := SegManagement.FindInteractTmplCode(12) <> '';
LogInteractionEnable := LogInteraction;
END;
}
CONTROLS
{
{ 1900000001;0;Container;
ContainerType=ContentArea }
{ 1900000002;1;Group ;
CaptionML=ENU=Options }
{ 1 ;2 ;Field ;
CaptionML=ENU=No. of Copies;
SourceExpr=NoOfCopies }
{ 2 ;2 ;Field ;
CaptionML=ENU=Show Internal Information;
SourceExpr=ShowInternalInfo }
{ 4 ;2 ;Field ;
Name=LogInteraction;
CaptionML=ENU=Log Interaction;
SourceExpr=LogInteraction;
Enabled=LogInteractionEnable }
}
}
CODE
{
VAR
Text000@1000 : TextConst 'ENU=Purchaser';
Text001@1001 : TextConst 'ENU=COPY';
Text002@1002 : TextConst 'ENU=Blanket Purchase Order %1';
Text003@1003 : TextConst 'ENU=Page %1';
AllowInvDisctxt@1000000028 : Text[30];
OtherTaxesAmount@1000000027 : Decimal;
ChargesAmount@1000000026 : Decimal;
ProfitCentre@1000000020 : Text[30];
SNo@1000000019 : Integer;
TotalAmt@1000000011 : Decimal;
PurchHeader@1000000000 : Record 38;
eCessAmt@1000000024 : Decimal;
SHECessAmt@1000000025 : Decimal;
TotalExcise@1000000023 : Decimal;
Qty@1000000001 : Decimal;
Rate@1000000002 : Decimal;
DiscPercent@1000000003 : Decimal;
AssValue@1000000004 : Decimal;
BEDAmt@1000000005 : Decimal;
PkgCharge@1000000006 : Decimal;
TaxAmt@1000000007 : Decimal;
VatAmt@1000000008 : Decimal;
StAmt@1000000009 : Decimal;
TotalValue@1000000010 : Decimal;
Item@1004 : Record 27;
FA@1005 : Record 5600;
PaymentTerms@1000000016 : Record 3;
ShipmentMethod@1006 : Record 10;
SalesPurchPerson@1007 : Record 13;
CompanyInfo@1008 : Record 79;
PurchLine@1009 : TEMPORARY Record 39;
DocDim1@1010 : Record 357;
DocDim2@1011 : Record 357;
RespCenter@1012 : Record 5714;
Language@1013 : Record 8;
PurchCountPrinted@1014 : Codeunit 317;
PurchPost@1015 : Codeunit 90;
FormatAddr@1016 : Codeunit 365;
SegManagement@1032 : Codeunit 5051;
VendAddr@1017 : ARRAY [8] OF Text[50];
ShipToAddr@1018 : ARRAY [8] OF Text[50];
CompanyAddr@1019 : ARRAY [8] OF Text[50];
PurchaserText@1020 : Text[30];
VATNoText@1021 : Text[80];
ReferenceText@1022 : Text[80];
MoreLines@1023 : Boolean;
NoOfCopies@1024 : Integer;
NoOfLoops@1025 : Integer;
CopyText@1026 : Text[30];
DimText@1027 : Text[120];
OldDimText@1028 : Text[75];
ShowInternalInfo@1029 : Boolean;
Continue@1030 : Boolean;
LogInteraction@1031 : Boolean;
OutputNo@1033 : Integer;
LogInteractionEnable@1102601000 : Boolean INDATASET;
NoText@1000000012 : ARRAY [2] OF Text[100];
Remarks1@1000000013 : TextConst 'ENU=1. Please mention our purchase no. on all challan and bills.';
Remarks2@1000000014 : TextConst 'ENU=2. Without purchase order no material should be supplied.';
Remarks3@1000000015 : TextConst 'ENU="3. Pre Dispatch Inspection Report /Test Certificate should be sent with every invoice. "';
Text004@1000000017 : TextConst 'ENU=for MEW SUSPENSIONS PVT. LTD.';
Text005@1000000018 : TextConst 'ENU=Authorised Signatory';
Text006@1000000021 : TextConst 'ENU=Jharkhand';
Text007@1000000022 : TextConst 'ENU=India';
BEGIN
END.
}
RDLDATA
{
}
}
Markandey Pandey
0
Comments
-
Pandey,
Do not put the whole code of Navision into Mibuso. No body will go and read the whole code.Thanks & Regards
Santosh
Where Stones can be transformed to Gold0 -
santoshmkcet wrote:Pandey,
Do not put the whole code of Navision into Mibuso. No body will go and read the whole code.
hi,
actually i have seen people sending code like this nd this is the text format of the fob that i have sent.Markandey Pandey0 -
problem is resolvedMarkandey Pandey0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
