******************** Sales Invoice Header , Define PrintDuplicate=.t. to print duplictae massage ******************** SortedItems:=.t. for sorted printing,SortedBy=>"G" for Group Wise Sorting and SortedBy="T" for Tax Wise Sorting ******************** PrintAllPendingOrder:=.t. will be used for Showing all pending order of a customer ******************** MrpValue,FMrpValue,SI_AdScAmt,SI_CrNoteAmt,SI_FMrpValue,SI_FTaxableAmt,SI_FTaxAmt,SI_InvDiscAmt,SI_MrpValue,SI_NetAmt,SI_ProdDiscAmt,SI_SaleAmt,SI_ScAmt,SI_TaxableAmt,SI_TaxAmt {||topline:=23,itemline:=1,CFline:=2,BFLine:=1,sireturn:=5,SiRetDtl:=2,SiRepl:=0,CnLine:=0,DiscLine:=0,taxline:=0,frtline:=0,; replline:=0,crline:=0,netline:=0,bottomline:=19,msgline:=0,SortedItems:=.f.,PrintAllPendingOrder:=.f.,POrderLine:=0,printocd:=.t.} {||ROUT("Goverment of India/ ",PAGEWIDTH()/2,_CENTER,_exp)} {||ROUT("Department of "+alltrim(mstate),PAGEWIDTH()-2,_CENTER),IIF(TOTAMT=0,CARGO1:=CARGO2:=0,NIL)} {||ROUT("Form GST INV -1",PAGEWIDTH()-2,_CENTER)} {||ROUT("(See Rule......................)",PAGEWIDTH()-2,_CENTER)} {||ROUT("Application for Electronic Reference Number of an invoice",PAGEWIDTH()/2,_CENTER,_EXP)} {||ROUT("")} {||ROUT("1.GSTIN",18),; RROUT(ALLTRIM(mgstno),50)} {||ROUT("2.Name",18),; RROUT(ALLTRIM(Mname),50)} {||ROUT("3.Address",18),; RROUT(ALLTRIM(MADDRESS1)+" "+Alltrim(maddress2)+","+AllTrim(MSTATION)+" "+ALLTRIM(MPIN),pagewidth()-18)} {||ROUT("4.Sr.No.of Invoice",18),; RROUT(tran(prninvno,"9999999"),50)} {||ROUT("5.Date of Invoice",18),; RROUT(Dtoc(InvDate),50)} {||ROUT("")} {||ROUT("Detail of Receiver (Billed to)",pagewidth()-40,_left,{"Time Roman"}),; RROUT("Detail of Consignee (Shipped to)",pagewidth()-40,_left,{"Time roman"})} {||ROUT("Name "+alltrim(fv(custtbl,"cuname")),pagewidth()-40),; RROUT("Name "+alltrim(fv(custtbl,"cuname")),pagewidth()-40)} {||ROUT("Address "+alltrim(fv(custtbl,"cuaddress1")),pagewidth()-40),; RROUT("Address "+alltrim(fv(custtbl,"cuaddress1")),pagewidth()-40)} {||ROUT("State:"+mcustate,pagewidth()-40),; RROUT("State:"+mcustate,pagewidth()-40)} {||ROUT("State Code:"+mcustatecd,pagewidth()-40),; RROUT("State Code:"+mcustatecd,pagewidth()-40)} {||ROUT("GSTIN/Unique ID "+alltrim(FV(CUSTTBL,"CUGSTNO")),pagewidth()-40),; RROUT("GSTIN/Unique ID "+alltrim(FV(CUSTTBL,"CUGSTNO")),pagewidth()-40)} {||ROut(""),; barout(_hzbar,pagewidth()-3)} {||ROut(""),; RROut("Sr.",7,_CENTER,_compress),; RROut("Description",22,,_compress),; RROut("HSN",7,,_compress),; RROut("Qty ",7,_CENTER,_compress),; RROut("Unit ",10,,_compress),; RROut("Rate",7,_Right,_compress),; RROut("Total ",8,_RIGHT,_compress),; RROut("Disc",8,_Right,_compress),; RROut("Taxable",10,_Center,_compress),; RROut("CGST",17,_CENTER,_compress),; RROut("SGST",17,_CENTER,_compress),; RROut("IGST",17,_CENTER,_compress)} {||ROut(""),; RROut("No.",7,_CENTER,_compress),; RROut("of Goods",22,,_compress),; RROut("",7,,_compress),; RROut(" ",7,_CENTER,_compress),; RROut(" ",10,_CENTER,_compress),; RROut("(Per",7,_Right,_compress),; RROut(" ",8,_RIGHT,_compress),; RROut("ount",8,_Right,_compress),; RROut("Value",10,_Center,_compress),; barout(_HZBAR,17,_CENTER,_compress),; barout(_HZBAR,17,_CENTER,_compress),; barout(_HZBAR,12,_CENTER,_compress)} {||ROut(""),; RROut("",7,_CENTER,_compress),; RROut("",22,_CENTER,_compress),; RROut("",7,_CENTER,_compress),; RROut(" ",7,_CENTER,_compress),; RROut(" ",10,_CENTER,_compress),; RROut("Item)",7,_Right,_compress),; RROut(" ",8,_RIGHT,_compress),; RROut("",8,_Right,_compress),; RROut(" ",10,_Center,_compress),; Rrout("Rate",7.3,_CENTER,_compress),; Rrout("Amt.",8,_CENTER,_compress),; Rrout("Rate",7.3,_CENTER,_compress),; Rrout("Amt.",8,_CENTER,_compress),; Rrout("Rate",7.3,_CENTER,_compress),; Rrout("Amt.",8,_CENTER,_compress)} {||ROut(""),; barout(_hzbar,pagewidth()-3)} ******************** Sales Invoice : Print Detail *Use mdt for exp.dt. mrate for discounted rate {||ROut(""),; RROut(TRAN(TOTITEMS,"999"),7,_CENTER,_compress),; RROut(ALLTRIM(FV(PRODTBL,"PDNAME")),22,,_compress),; RROut(FV(PRODTBL,"PDHSN"),7,,_compress),; RROut(ALLTRIM(MQTY),7,_CENTER,_compress),; RROut(ALLTRIM(MPACK),10,,_compress),; RROut(TRAN(FV(STOCKTBL,"STRATE"),"999.99"),7,_Right,_compress),; RROut(TRAN(MVALUE,"99999.99"),8,_RIGHT,_compress),; RROut(TRAN(FV(STOCKTBL,"STDISCOUNT"),"99.99"),8,_Right,_compress),; RROut(TRAN(MAMT,"99999.99"),10,_rIGHT,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I","",ctaxrate),7.3,_CENTER,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I","",TRAN(MDTAXAMT,"99999.99")),8,_RIGHT,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I","",ctaxrate),7.3,_CENTER,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I","",TRAN(MDTAXAMT,"99999.99")),8,_RIGHT,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I",ctaxrate,""),7.3,_CENTER,_compress),; Rrout(iif(left(alltrim(fv(taxtbl,"txseqno")),1)="I",TRAN(MDTAXAMT,"99999.99"),""),8,_RIGHT,_compress),CARGO1:=CARGO1+MAMT} *****Description Line*** **********************Description Line*** ******************** Sals Invoice : Print C/f Amount and Continued on next page. {||ROut("",Pagewidth()-13),RROut("------------",12,_RIGHT)} {||ROut("Continued On "+PadR(Pagecount()+1,2),15,_LEFT,_EXP), RROut("",Pagewidth()-43), RROut(Tran(iif(!Finished,mtotvalue,total),"999999999.99"),12,_RIGHT)} ******************** Sals Invoice : Print b/f Amount on next page. {||ROut("Continued from "+PadR(Pagecount()-1,2),Pagewidth()-38), RROut("Total b/f",25), RROut(Tran(iif(!finished,mtotvalue,total),"999999999.99"),12,_RIGHT)} {||ROUT("SALE RETURN")} {||.T.} {||.T.} {||ROut(""),; RROut(FV(DTBL,"CDTYPE"),7,_CENTER,_compress),; RROut(ALLTRIM(FV(PRODTBL,"PDNAME")),22,,_compress),; RROut(FV(PRODTBL,"PDHSN"),7,,_compress),; RROut(TRAN(FV(DTBL,"CDQTY"),"99999"),7,_CENTER,_compress),; RROut(ALLTRIM(MPACK),10,,_compress),; RROut(TRAN(FV(DTBL,"CDPRICE"),"999.99"),7,_Right,_compress),; RROut(TRAN(FV(DTBL,"CDAMOUNT"),"99999.99"),8,_RIGHT,_compress),; RROut(TRAN(FV(DTBL,"CDDISCOUNT"),"99.99"),8,_Right,_compress),; RROut("",10,_rIGHT,_compress),; Rrout(" ",7.3,_CENTER,_compress),; Rrout("",8,_RIGHT,_compress),; Rrout("",7.3,_CENTER,_compress),; Rrout("",8,_RIGHT,_compress),; Rrout(CTAXRATE,7.3,_CENTER,_compress),; Rrout(TRAN(MDTAXAMT,"99999.99"),8,_RIGHT,_compress)} {||.T.} {||ROut(""),; barout(_hzbar,pagewidth()-3)} {||ROut(""),; RROut("",32,,_compress),; RROut("TOTAL",24.3,_RIGHT,_compress),; RROut(TRAN(MTOTVALUE,"99999.99"),8.2,_RIGHT,_compress),; RROut(TRAN(MDISCOUNT,"9999.99"),7.7,,_compress),; RROut(TRAN(CARGO1,"999999.99"),10.2,_RIGHT,_compress),; BarOut("",7.3,,_compress),; RrOut("",9.7,,_compress),; RrOut("",17,_CENTER,_compress),; BarOut("",7,,_compress),; RROut(TRAN(TAX,"999999.99"),10,_CENTER,_compress)} {||ROut(""),; barout(_hzbar,pagewidth()-3)} {||ROUT(""),; BAROUT(_BAR),; RROUT("",PAGEWIDTH()-3),; BAROUT(_BAR)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Freight "+tran(ABS(invfreight),"99999.99"),pagewidth()-3),; barout(_bar)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Insurance ",pagewidth()-3),; barout(_bar)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Packing and Forwarding Charges ",pagewidth()-3),; barout(_bar)} {||ROUT(""),; BAROUT(_BAR),; BAROUT(_HZBAR,PAGEWIDTH()-3),; BAROUT(_BAR)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Total Invoice Value (In Figure)",25),; RROUT(TRAN(TOTAL,"999999.99"),PAGEWIDTH()-32),; BAROUT(_BAR)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Total Invoice Value (In Words) ",25),; RROUT(alltrim(mamtwords),(PAGEWIDTH()-32)*1.7,,_COMPRESS),; BAROUT(_BAR)} {||ROUT(""),; BAROUT(_BAR),; RROUT("Amount of Tax Subject to Reverse charge 0.00 ",Pagewidth()-3),; BAROUT(_BAR)} {||ROut(""),; BarOut(_BLCBAR),; BAROUT(_HZBAR,Pagewidth()-3),; BarOut(_BRCBAR)} {||ROUT(""),; RROUT("Declaration",pagewidth()-45),; RROUT("Signature ",pagewidth()-40)} {||ROUT("")} {||ROUT("")} {||ROUT(""),; RROUT("Signatory",pagewidth()-45),; RROUT("Name of the Designation / Status ",pagewidth()-40)} {||ROUT("")} {||ROUT("")} {||ROUT(""),; RROUT("Electronic Reference Number",pagewidth()-45),; RROUT("Date :- ",pagewidth()-40)} {||ROUT("")} *****LastLine*** *********************LastLine***