**** Header Part (Define PrintOCD=.t. for F6=Credit Notes, 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 **** SortedBy:="GP" for Group Code & Product Name Wise Sorting and SortedBy="TP" for Tax & Product Name Wise Sorting **** SortedBy:="P" for Product Name Wise Sorting and SortedBy:="PDSH" for Product ShelfId Wise & SortedBy:="GEN" for generic Product Wise **** PrintICD:=.t. for Incidental Charges & Discount Detail (IcArr)) **** PrintICD:=.t. for I.c. & Disc. Detail (IcArr[i]:Add/Less Rate OnRs. Amt.) **** CmReturn Block will be used for CmRepl Block in Case MultiCrNote:=.t. **** You Can Use Following function,you have to pass a Perticular Taxtype **** SI_SaleAmt(Taxtype);SI_ProdDiscAmt(Taxtype);SI_CrNoteAmt(Taxtype);SI_InvDiscAmt(Taxtype) **** SI_TaxAmt(Taxtype);SI_ScAmt(Taxtype);SI_AdScAmt(Taxtype);SI_NetAmt(Taxtype);SI_TaxableAmt(Taxtype) **** SI_FTaxableAmt(Taxtype),SI_FTaxAmt(Taxtype) **** SI_MrpValue(Taxtype),SI_FMrpValue(Taxtype) **** VTaxString,RTaxString,CTaxString,ETaxString **** Variables in detail part : mDSaleAmt,mamt,mDGrossAmt,mDTaxAmt,mdScAmt,mdAdScAmt,mabtamt,mDDiscount,mdSDiscount,mpromoamt,mMrpValue,mFMrpValue,mDBLRate,ChkDblMrp:=.f.,mDtChLnNo **** Variables in detail part : mShelfId,mShdDesc,mshdcode for Schedule Information **** PrintOSStr :=.f. For Calculate Outstanding Array And OSArray Return in this String {"InvDate BillNo DueDate DueDays Amount"} **** OSString Return in this String 0-30 Days,31-60 Days, 61-90 Days, > 90 **** Sales Person Commission use mSPComm , Print for ShortItem Qty =>ShortPdQty **** Variable avaiable for Input Tax Credit mITCTaxable,mITCAmt,mITCTaxPay,mITCDTaxable,mITCDTaxAmt **** CnArray as array details of adjusted entries and string variable mAdjStr for Adjusted Credit Note which is posting in A/c & Adjust in Invoice **** five elements are exist in CnArray is tdate:=x[i][1],tvhno:=x[i][2],tremark:=x[i][3],tamt:=x[i][4],trefno:=x[i][5] {||lines:=18,CMFooter:=19,PageLength:=72,PAGEWIDTH:=79,Printed:=.t.,MultiCrNote:=.t.,CmReturn:=5,CmRetDtl:=2,PrnShdCode:=.f.} {||QOUT(_EXP+PADC(ALLTRIM(MNAME),(PAGEWIDTH)/2)+_EXP_OFF),iif(start,cargo1:=0,nil)} {||qout(padc(ALLTRIM(MADDRESS1)+" "+Alltrim(maddress2),pagewidth))} {||qout("GSTIN : "+padr(MGSTNO,15)+padc(alltrim(mSTATION)+" "+alltrim(mpin),pagewidth-50)+" "+"TIN No."+padr(mrstno,15))} {||qout("DL.No:"+padr(ALLTRIM(mlicno)+","+ALLTRIM(mlicno2),18)+padc("Phone.No. :- "+mphone1,pagewidth-50)+" "+padr("FL.No:",6)+padR(alltrim(mfoodlic),15))} {||qout(TLCBAR+repl(HZBAR,pagewidth-33)+repl(HZBAR,14)+iif(start,repl(HZBAR,16),"Continued From "+str(invpg-1,1))+repl(HZBAR,1)+TRCBAR)} {||QOUT(PADR(alltrim("Name & Address of Consginee : "),pagewidth-37)+bar+padr("Inv. No. : ",8)+PrnInvSSR+Tran(PrnInvNo,"999999")+" "+"Date : "+dtoc4(INVDATE))} {||qout(padr(alltrim(&custtbl->cuname),pagewidth-37)+bar+padr("Order No. :",10)+padr(&hdrtbl->&hdrs.orderno,5)+" "+"Date : "+dtoc4(&hdrtbl->&hdrs.ordate))} {||qout(padr(alltrim(&custtbl->cuaddress1),pagewidth-37)+bar+padr("G.R.No.:",10)+padr(&hdrtbl->&hdrs.mtrno,5)+" "+"Date : "+dtoc4(&hdrtbl->&hdrs.mtrdate))} {||qout(padr(alltrim(&custtbl->custation),pagewidth-37)+bar+padr("Cases.:",10)+padr(&hdrtbl->&hdrs.cases,5)+" "+"Weight : ")} {||qout("Phone. "+padr(alltrim(&custtbl->cuphone),pagewidth-44)+bar+padr("Delivery.",10)+padr(&hdrtbl->&hdrs.spcode,10))} {||qout(padr("State Code:"+mcustatecd,pagewidth-37)+bar+padr("Transport.",10)+padr(&hdrtbl->&hdrs.trans,10))} {||qout(padr("DL.No. "+ALLTRIM(&CUSTTBL->CUdLNO)+" "+ALLTRIM(&CUSTTBL->CUDLNO1),pagewidth-37)+bar+padr("Document.",10)+padr(&hdrtbl->&hdrs.bank,10))} {||qout(padr("GSTIN : "+ALLTRIM(&CUSTTBL->CUGSTNO),pagewidth-37)+bar+padr("Du Date.",10)+padr(&hdrtbl->&hdrs.duedate,10))} {||qout(BLCBAR+repl(HZBAR,pagewidth-33)+INVTBAR+repl(HZBAR,12)+INVTBAR+repl(HZBAR,17)+BRCBAR)} {||qout(_compress+"Sr. "+iif(pagewidth>80,Padr("MFG Dt",Pagewidth-74),"")+Padr(" Description",30)+" HSN "+" Qty "+" Unit "+padr(" Batch ",14)+" Exp Dt. "+" MRP "+" Rate "+" Disc "+" Total "+" Taxable "+" IGST "+_comp_off)} {||qout(repl(HZBAR,pagewidth))} {||iif(!start,qout(space(pagewidth-26)+padr("Total b/f",17)+tran(totamt,"999999.99")),.t.)} {||iif(!start,linecount:=17,linecount:=16)} **** CMFooter 13 (Total Variables:TotItems,TotQty,TotFqty, Expiry Date:mdt, ChallanNo:mChallanNo) {||qout(repl(HZBAR,pagewidth))} {||qout(space(30)+"Total : "+space(16)+_compress+SPACE(8)+TRAN(MDISCOUNT,"9999.99")+" "+TRAN(TOTAMT,"999999.99")+TRAN(CARGO1,"99999.99")+""+TRAN(TAX+MSCAMT,"999999.99")+_comp_off)} {||qout(repl(HZBAR,pagewidth))} {||qout(iif(finished,iif(len(&NTTBL->NTNOTE)<=pagewidth-26,PADR(&NTTBL->NTNOTE,pagewidth-26),_COMPRESS+padr("",round((pagewidth-26)*1.7,0))+_COMP_OFF)+padr("TOTAL",17),space(pagewidth-26)+padr("Total c/f ",17))+tran(totamt,"9999999.99"))} {||qout(repl(HZBAR,pagewidth))} {||iif(Finished,qout(PADR("",pagewidth-26)+"LESS DISCOUNT "+tran(mdiscount+mCDISCAMT,"99999.99")),qout())} {||iif(Finished,qout(PADR("Freight "+padr(&hdrtbl->&hdrs.freight,6),pagewidth-26)+PADR("ADD IGST",17)+TRAN(TAX+MSCAMT,"999999.99")),qout())} {||iif(Finished,qout(iif(len(SurTaxString)<=pagewidth-26,PADR(Alltrim(SURTAXSTRING),pagewidth-26),_COMPRESS+padr(Alltrim(SURTAXSTRING),round((pagewidth-26)*1.7,0))+_COMP_OFF)+iif((totcdamt-INVFreight-INVOctroi)<=0,"CR ","DR ")+"Note. "+tran(abs(totcdamt-INVFreight-INVOctroi),"99999.99")),qout(space(pagewidth-28)+_EXP+"Continued on "+str(invpg,1)+_EXP_OFF))} {||iif(Finished,qout(PADR("SGST"+SubStr(VTAXSTRING,14),pagewidth-26)+PADR("Round Off ",17)+TRAN(mrnddiff,"999999.99")),qout())} {||iif(Finished,qout(padr(mamtwords,pagewidth-26)+_DS+"G. Total"+_EXP+tran(PRNNETAMT+INVOTHADJ,"99999.99")+_EXP_OFF+_DS_OFF),qout())} {||iif(finished,qout(repl(HZBAR,pagewidth)),qout())} {||iif(finished,qout(padr("Declaration ",pagewidth-15)+" Signature"),qout())} {||iif(finished,qout(),qout())} {||iif(finished,qout(padr("Signatory ",pagewidth-27)+" Name of designation/Station"),qout())} {||iif(finished,qout(),qout())} {||iif(finished,qout(padr("Electronic Reference Number ",pagewidth-15)+"Date"),qout())} {||qout(repl(HZBAR,pagewidth))} {||iif(finished,qout(),qout())} {||linecount:=linecount+18} **** CmReturn 5 * 2 Lines for Header, Line for Detail depend on CmRetdtl (Default 2 (1 for credit/debit and 1 for others) ), 1 Line for Total,mRemark {||qout(_COMPRESS+PADR(" Sales Return Slip Detail",74)+_COMP_OFF),Linecount:=LineCount+1} {||.T.} {||qout(_compress+iif(!empty(&STOCKTBL->stchseqno),_UL,"")+PADC(&DTBL->CDTYPE,3)+" "+iif(pagewidth>80,Padc(mMfgDt,Pagewidth-74),"")+iif(Alltrim(&STOCKTBL->STPART)="Fr.Product",chr(159)," ")+padr(&PRODTBL->PDname,29)+" "+Padr(&PRODTBL->PDHSN,4)+" "+tran(&dtbl->cdqty,"99999")+" "+padr(mpack,7)+" "+padr(&dTBL->cdBHno,14)+" "+padr(&dtbl->cdexpiry,5)+" "+tran(&dtbl->cdmrp,"99999.99")+" "+tran(mcdprice,"9999.99")+" "+tran(&cdtbl->cddiscOUNT,"99.99")+" "+tran(ABS(&DTBL->CDAMOUNT),"@z 99999.99")+" "+tran(mamt,"99999.99")+" "+tran(&taxtbl->txschrg+&taxtbl->txrstrate,"99%")+_comp_OFF),linecount:=linecount+1} {||.T.} {||.T.} **** CMDetail 1 * Use mrate to print discounted rates, mdt to print expiry, mmfgcode,mmfgname to print group code and name {||qout(_compress+iif(!empty(&STOCKTBL->stchseqno),_UL,"")+tran(totitems,"999")+" "+iif(pagewidth>80,Padc(mMfgDt,Pagewidth-74),"")+iif(Alltrim(&STOCKTBL->STPART)="Fr.Product",chr(159)," ")+padr(&PRODTBL->PDname,29)+" "+Padr(&PRODTBL->PDHSN,4)+" "+mqty+" "+padr(mpack,7)+" "+iif(!empty(&STOCKTBL->stchseqno),"$"," ")+padr(&STOCKTBL->STBHno,14)+" "+mdt+" "+mrp+" "+vrate+" "+tran(&STOCKTBL->STDISCOUNT,"99.99")+" "+tran(mvalue,"99999.99")+" "+tran(mamt,"99999.99")+" "+tran(&taxtbl->txschrg+&taxtbl->txrstrate,"99%")+_COMP_OFF)} **** End of File