Negative TDS Amount while calculating TDS

amol_dj_007amol_dj_007 Member Posts: 14
Query : While doing calculate TDS negative TDS amount is getting calculated on Purchase Invoice Line.

Scenerio :
A perticular vendor V001 is selected. NOD Lines setup are created for the respective vendor.
Threshold overlook is set TRUE
TDS Threshold Amount set to a perticular value say 75000 for that TDS group
Per contract value set to perticular value say 30000 for that TDS group

Data Entry part:
Four different invoices are prepared for vendor V001 on different posting dates.
1. Amount = 32000 ;TDS deducted = YES
2. Amount = 4000 ;TDS deducted = No
3. Amount = 6000 ;TDS deducted = No
4. Amount = 12000 ;TDS deducted = No

Now while preparing the 5th Invoice for Amount 68000/- the TDS calculated is negative. Also TDS % is calculated wrong.

Reason: TDS Buffer[1] not cleared.
InsertTDSBuf(TDSEntry : Record "TDS Entry";PostingDate : Date;CalculateSurcharge : Boolean;CalculateTDS : Boolean)
WITH TDSEntry DO BEGIN
  TDSBuf[1]."TDS Nature of Deduction" := "TDS Nature of Deduction";
  TDSBuf[1]."Assessee Code" := "Assessee Code";
  TDSBuf[1]."Party Code" := "Party Code";
  TDSBuf[1]."Party Type" := "Party Type";
  IF CalculateTDS THEN BEGIN
    TDSBuf[1]."TDS Base Amount" := "Invoice Amount" + "Service Tax Including eCess";
    IF TDSEntry."Per Contract" THEN
      TDSBuf[1]."Contract TDS Ded. Base Amount" := "Invoice Amount" + "Service Tax Including eCess";

Just add as "CLEAR(TDSBuf[1]);" follows
InsertTDSBuf(TDSEntry : Record "TDS Entry";PostingDate : Date;CalculateSurcharge : Boolean;CalculateTDS : Boolean)
CLEAR(TDSBuf[1]);
WITH TDSEntry DO BEGIN
  TDSBuf[1]."TDS Nature of Deduction" := "TDS Nature of Deduction";
  TDSBuf[1]."Assessee Code" := "Assessee Code";
  TDSBuf[1]."Party Code" := "Party Code";
  TDSBuf[1]."Party Type" := "Party Type";
  IF CalculateTDS THEN BEGIN
    TDSBuf[1]."TDS Base Amount" := "Invoice Amount" + "Service Tax Including eCess";
    IF TDSEntry."Per Contract" THEN
      TDSBuf[1]."Contract TDS Ded. Base Amount" := "Invoice Amount" + "Service Tax Including eCess";
Sign In or Register to comment.