Code: ;;************************************************************************** ;;------------------------------------------ DAY BOOK START ---------------- ;;__________________________________________________________________________ [System: Formula] MyDayBook : "Day Book with Balance" [#Menu: banking ] Add : Item : after : @@locDayBook: @@MyDayBook : Display : IdealDaybook : NOT $$IsEmpty:$$SelectedCmps ;Control : @@MyDayBook: $AssesseeTaxCode:Company:##SVCurrentCompany contains "D" [Report:IdealDaybook] Use : DSP Template Variables : SV CurrentCompany, SV FromDate, SV ToDate, SV SortMethod Variable : ExplodeFlag, ExplodeNarrFlag, VoucherTypeName, FamilyVoucherFlag Variable : OnlyAccVouchers, OnlyInvVouchers Variables : DBBillExplodeFlag, DBCostExplodeFlag, DBInvExplodeFlag, OptionalFlag1, OptionalFlag2, OptionalFlag3 Set : ExplodeFlag : if $$InPrintMode then "Yes" else "No" Set : SV From Date : if $$InPrintMode then $$MonthStart:##SVCurrentDate else ##SVCurrentDate Set : SV To Date : if $$InPrintMode then $$MonthEnd:##SVCurrentDate else ##SVCurrentDate Set : VoucherTypeName : $$SysName:AllItems Set : SV Sort Method : "Default" Set : BalancingMethod : "Daily" Set : IsRestoreMode : No Set : ExplodeFlag : Yes Set : OptionalFlag1 : if @@InCopyMode then $IsOptional:VoucherType:##SVVoucherType else $IsOptional Local : Collection : Specific Vouchers of Company : Filter : ForexVouchers Local : Collection : Filtered Vouchers of Company : Filter : ForexVouchers Filtered : Yes Print : AccurateDYBKPrintConfigure Form : IdealDaybook PrintSet : Report Title : "Day Book" Title : "Day Book with Cash Balance" [Form:IdealDaybook] Use : Extra VchKeys ;; insert,or add or duplicate voucher Fullwidth : yes BackGround : White,Light Autumn Green Button : ExplodeFlag, PrintButton, UploadButton, MailButton, ChangePeriod Button : ChangeDybkDate,ChangeCompany, DYBK ChgVchType,MyLedger BottomButton : Optional Button3, Blank Buttona3, Optional Button2, Blank Buttona2, Optional Button1, Blank Buttona1, InvReports BottomButton : AcctReports, DYBKCBConfigure, FilterButton Local:Button: DYBKConfigure:Action : Execute:DYBKConfigure ;;*Not use this...... Use : DSP Template Height : 100% Page Width : 100% Page Space Bottom : 0 MMS Part : DSP AccTitles, DSP AccurateVchTitle, AccurateDybkpart, DSP AccurateAccdetail BottomPart : AccurateDBBotPart Page Break : DB ClPageBreak, DB OpPageBreak Balancing : DSP CBCLBal : @@BalancingBreak OpeningBal : DSP CBOPBal Keys : IncrementDate, DecrementDate Option : DBKPageSetting : $$InPrintmode [!Form : DBKPageSetting] Space Left : 1% Page Space Right : 1% Page [#Part : DSP AccTitles] Space top : 1 [Part : DB ClPageBreak] Line : DSP ContLine order : Full Thin Top [Part : DB OpPageBreak] Parts : DSP OpCompanyName, DSP OpReportTitle, DSP AccurateVchTitle Vertical : Yes Space Top : 1 ;;3 [Part : DSP AccurateVchTitle] Line : DSP AccurateDBDate, Accurate DBMainTitle1 [Line : DSP AccurateDBDate] RightField : DSP AccurateDBDateTitle, DSP Dateline Invisible : $$InPrintmode [Field: DSP AccurateDBDateTitle] set as : "for" style : Normal Bold [Field: DSP Dateline] set as : @@DSPTODATE style : Normal Bold [Line : AccurateDBMainTitle1] Field : DSP AccurateVchDateTitle, DSP AccurateVchDBAcctTitle RightField : DSP AccurateVchTypeTitle, DSP AccurateVchNumberTitle,DSP AccurateDYDRTitle,DSP AccurateDYCRTitle Border : Thin Column Titles [Field: DSP AccurateVchDateTitle] Use : Short Date Field Info : " Date" Style : Normal Bold width : 10% Page Align : Centre ;;Left [Field: DSP AccurateVchDBAcctTitle] Use : Name Title Field Info : "Particulars" ;Indent : 4 Style : Normal Bold Space left : 1 Width : 35% Page Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchTypeTitle] Info : "Type " Style : Normal Bold Width : 13% Page Space left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchNumberTitle] Info : "Number" Style : Normal Bold Align : Right width : 10% Page Space Right : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateDYDRTitle] Use : Amount Title Field Info : "Debit" Style : Normal Bold Width : 15% Page Space Right : 1 Border : Thin Left Right : NOT $$Inprintmode [Field: DSP AccurateDYCRTitle] Use : Amount Title Field Info : "Credit " Style : Normal Bold Width : 15% Page ;------------------------------------------------------------- [Part : AccurateDybkpart] Line : DSP CBOPBal, DSP AccurateVCHDBDetail Repeat : DSP AccurateVCHDBDetail: Mydaybookcollection Scroll : Vertical Total : MJ AccurateDrAmt, MJ AccurateCrAmt, DSP AccurateDrAmt, DSP AccurateCrAmt Balancing : Yes Common Borders : Yes Float : Yes ;;Yes = means avoid blank lines No = full page Option : SPC Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND (NOT ##FamilyVoucherFlag OR NOT $IsReserved:VoucherType:##VoucherTypeName)) Option : FLT Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND ##FamilyVoucherFlag) Option : AccurateDyk PrintClBal: $$InPrintMode [!Part: SPC Accuratepart] Repeat : DSP AccurateVchDBDetail : Specific Vouchers of Company ;;;; to filter the vouchers under particular vch type eg. only my sale voucher among all salesvch under salesvchtype [!Part: FLT Accuratepart] Repeat : DSP AccurateVchDBDetail : Filtered Vouchers of Company ;;;; to filter the vouchers of particular vch type eg. all purchase vouchers [!Part: AccurateDyk PrintClBal] Add : Bottom Line : DSP CBCLBal Add : Lines : Before : DSP AccurateVchDBDetail : DSP CBOPBal [Line : DSP CBOPBal] Fields : DSP AccurateVchDate, DSP AccurateAccname RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDrAmt, DSP AccurateCrAmt, + MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Local:Field : DSP AccurateVchDate : set as: "" Local:Field : DSP AccurateVchNumber : set as: "" Local:Field : DSP AccurateVchType : set as: "" Local:Field : DSP AccurateAccname : set as: "Opening Balance" Local:Field : DSP AccurateDrAmt : set as: $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : MJ AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : MJ AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateAccname:color : Blue Local:Field : DSP AccurateCrAmt:color : Red Local:Field : DSP AccurateDrAmt:color : Blue Local:Field : DSP AccurateDrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : DSP AccurateCrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Invisible : $$IsEmpty:mad:@OpeningCBDrCrAmt Space Top : 0.25 ;Space Bottom : 0.25 Next Page : $$LineNumber = $$LastLineNumber Invisible : if ##OptionalFlag2 then "Yes" else "No" [Line : DSP AccurateVCHDBDetail] Fields : DSP VchDate,DSP AccurateVchDate, DSP AccurateAccname ;;DSP AccurateVchDate RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDBAmt, DSP AccurateDrAmt, DSP AccurateCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Next Page : NOT $$DoExplosionsFit OR (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Explode : DSP AccurateAccdetail : $$IsVoucher AND NOT $IsDeleted AND NOT $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP AccurateAccExplosion : $$IsVoucher AND NOT $IsDeleted AND $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : MJDSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Add: Explode : At beginning : DBFirstBIL Explosion : @@DBFirstBillExplodable Add: Explode : At Beginning : DBFirstNAR Explosion : ($$KeyExplode OR ##ExplodeFlag) AND ($$KeyExplode OR ##ExplodeNarrFlag) AND NOT $$IsEmpty:$$CollectionField:$Narration:1:AllLedgerEntries Add: Explode : At Beginning : DBFirstINV Explosion : @@DBFirstInvExplodable Add: Explode : At Beginning : DBFirstCST Explosion : @@DBFirstCostExplodable Option : DSP AccurateVChDate2 : $$InPrintmode Local:Field : DSP VchDate : Invisible : Yes ;;********************************************************************** Option : AlterOnEnter : $$IsVoucher AND NOT $IsDeleted ;; manu jose Option : AlterOnEnter : ##ExplodeFlag AND $$IsVoucher AND NOT $IsDeleted ;;********************************************************************** [!Line: DSP AccurateVchDate2] Local:Field:DSP VCH Date:set as:$Date [Field: DSP AccurateVchDate2] Use : Short Date Field width : 10% Page Style : If $$InPrintmode then "Normal" else "Normal bold" Space left : 1 Set as : if NOT $$IsVoucher then @@DSPToDate else + if NOT $$InPrintMode or not ##IsDaybook then $Date else + if $$LineNumber = $$FirstLineNumber then $Date else + if $$PrevLineVisible AND $$PrevLine:$Date = $Date then "" else $Date [Field: DSP AccurateVchDate] Use : Short Date Field width : 10% Page Set as : $Date ;;If $$InPrintmode then " " else $Date Align : Centre style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" [Field: DSP AccurateAccname] Set as : $$Upper:$DSPAccName:Ledger:$LedgerName Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Small Bold" else "Normal" width : 37% Page Space Left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchType] width : 13% Page Border : Thin Left : NOT $$Inprintmode Style : Normal ;;If $$InPrintmode then "Normal" else "Normal Bold" Space Left : 1 Set as : if NOT $$IsVoucher then "" else + if NOT $$InPixelMode then $AdditionalName:VoucherType:$VoucherTypeName else $CurLangVoucherTypeName [Field: DSP AccurateVchNumber] Width : 10% Page Border : Thin Left : NOT $$Inprintmode Space Right : 1 Style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" Align : Right Set as : If $$IsPurchase:$VoucherTypeName then @MjVchNo Else + If NOT $$IsVoucher then "" else @OptStr + $VoucherNumber MjVchNo : if ##OptionalFlag3 then $Reference else $VoucherNumber OptStr : if $IsOptional then $$LocaleString:"(Optional) " else " " Invisible : ##BankRecMode OR NOT $$InPixelMode Option : DSP VchNumberSpace : ##IsDayBook ;;************************ [Field: DSP AccurateDrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal Bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Thin Left Right : NOT $$Inprintmode Space Right : 1 set as : if ##ExplodeFlag then @manuDr else @babuDr manuDr : if $$IsDr:$Amount then $$AsPositive:$Amount else 0 babuDr : If @@JournalDr then $$AsPositive:mad:DrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositive:mad:DrValAmt2 else + If @@SalesDr then $$AsPositive:mad:DrValAmt2 else + If @@ContraCr then 0 else + If @@CrNotesCr then 0 else + If @@PurchaseCr then 0 else $$AsPositive:mad:DrValAmt100 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount [Field: DSP AccurateCrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right set as : if ##ExplodeFlag then @manuCr else @babuCr manuCr : if $$IsDr:$Amount then 0 else $$AsPositive:$Amount babuCr : If @@ContraCr then $$AsPositive:mad:CrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositive:mad:CrValAmt2 else + If @@PurchaseCr then $$AsPositive:mad:CrValAmt2 else + If @@JournalDr then 0 else + If @@DrNotesDr then 0 else + If @@SalesDr then 0 else $$AsPositive:mad:CrValAmt2 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount ;;xxxxxxxxxxxxxxxxxx [Field: MJ AccurateDrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@JournalDr then $$AsPositive:mad:DrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositive:mad:DrValAmt2 else + If @@SalesDr then $$AsPositive:mad:DrValAmt2 else + 0 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositive:mad:DrValAmt2 else 0 [Field: MJ AccurateCrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@ContraCr then $$AsPositive:mad:CrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositive:mad:CrValAmt2 else + If @@PurchaseCr then $$AsPositive:mad:CrValAmt2 else + 0 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositive:mad:CrValAmt2 else 0 ;;********************************** [Field: DSPAccurateDBAmt] Use : Amount Field Invisible : Yes Storage : Amount : All Ledger Entries : First Width : 5 [Field: DSPAccurateDBDrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfDr:#DSPAccurateDBAmt Style : Small Bold [Field: DSPAccurateDBCrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfCr:#DSPAccurateDBAmt Style : Small Bold ;; Narration ;; ========= [Part : MJDSP NarrExplode] Lines : MJDSP VchNarr [Line : MJDSP VchNarr] Indent : @@ShortDateWidth + 9 Fields : MJDSP VchNarr Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) [Field: MJDSP VchNarr] Use : Name Field Width : 37% Page Lines : 0 Set as : $Narration Style : Small Italic Align : Justified ;;############################ [Part : DSP AccurateAccdetail] Line : DSP AccurateAccdetail Repeat : DSP AccurateAccdetail:All Ledger Entries Total : MJ AccurateDrAmt, MJ AccurateCrAmt ;=================================================== [Line : DSP AccurateAccdetail] Fields : DSP AccurateVchDate,ACC VchExplAccount,DSP AccurateExplAmt RightField : DSP VchType,DSP VchNumber,DSP AccurateExplDrAmt, DSP AccurateExplCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt Explode : AccurateDBVCHINVAlloc Explosion : @@DBInvExplodable Explode : VCHLEDNarr Explosion : (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : AccurateDBVCHBILAlloc Explosion : @@DBBillExplodable Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Local : Field : DSP AccurateVchDate : set as : "" Local : Field : DSP VchNumber : set as : "" Local : Field : DSP VchDate : set as : "" Local : Field :MJ AccurateDrAmt: set as : "" Local : Field :MJ AccurateCrAmt: set as : "" Empty : $$PrevLine:$LedgerName = $$Upper:$$AccountName AND $$PrevLine:$Amount = $Amount [Field: ACC VchExplAccount] Use : Name Field width : 37% Page Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash then "Small Bold" else "Normal" Space Left : 1 Set as : $$Upper:$$AccountName QuickSearch : Yes [Field: DSP AccurateExplDrAmt] Use : DSP AccurateDrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then $$AsPositive:$Amount else 0 [Field: DSP AccurateExplCrAmt] Use : DSP AccurateCrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then 0 else $$AsPositive:$Amount ;;************************************************************************** [Field: DSP AccurateExplAmt] Use : Short Name Field Style : Small Bold Align : Right Set as : $$String:$Amount:mad:@DrCrFmt [!Part: DSP AccurateAccExplosion] Use:DSP AccurateAccdetail ;[Part: DSP AccurateAccExplosion] ;Use:DSP AccurateAccdetail [Part : AccurateDBVCHINVAlloc Explosion] Use : VCHINVAlloc Explosion Option : Non Bold Part Local : Line : STKALL Details : Delete : Explode : STKALL ActualQty Local : Line : STKALL Details : Add : Field : At beginning:DSP VchDate Local : Field : DSP VchDate : set as : "" [Part : AccurateDBVCHBILAlloc Explosion] Use : VCHBILAlloc Explosion Option : Non Bold Part Local : Line : VCHBILL ExplLine:Indent : @@DBIndentByLevel [Part : AccurateDBBotPart] Line : DSP CBCLBal Invisible : $$InPrintmode [Line : DSP CBCLBal] Lines : DBTotalline, DSP AccurateCBCLBal , DBGrndTotalline ;*************************************************************************** [Line : DBTotalline] Space Top : 0.5 Fields : DSP AccurateVchDate, DSP VchAcctTitle Right Fields : LV SubDrTotal1, LV SubCrTotal1 Border : Thin Column Titles : NOT $$Inprintmode ;; Cash Total : Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : if ##ExplodeFlag then "Cash Total" Else "Sub Total" Space Bottom : 0.1 Space Top : 0.2 Next Page : $$LineNumber = $$LastLineNumber Local:Field : DSP VchAcctTitle : Style : Normal [Field: LV SubDrTotal1] Use : DSP AccurateDrAmt Set as : if ##ExplodeFlag then @@AccurateDrTotal else @@DSPAcratDrTotal Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Full Thin Top:$$Inprintmode Space Right : 1 [Field: LV SubCrTotal1] Use : DSP AccurateCrAmt Set as : if ##ExplodeFlag then @zzz else @xxx Format : "NoZero,Decimals:2" Border : Full Thin Top:$$Inprintmode Width : 15% Page Align : Right xxx : @@MaxTotDrCrAmt02 - $$IfDr:mad:@AccurateDYBkbal zzz : @@MaxTotDrCrAmt01 - $$IfDr:mad:@AccurateDYBkbal [Line : DSP AccurateCBCLBal] Fields : DSP AccurateVchDate, DSP VchAcctTitle ,DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal , DSP AccurateDrAmt, DSP AccurateCrAmt Border : Thick Box : NOT $$Inprintmode Local:Field : DSP AccurateVchDate : set as : "" Local:Field : DSP VchAcctTitle : Info : "Closing Balance" Local:Field : LV SubCrTotal : set as : $$IfDr:mad:@AccurateDYBkbal Local:Field : LV SubDrTotal : set as : $$IfCr:mad:@AccurateDYBkbal Local:Field : DSP AccurateCrAmt : set as : $$IfDr:mad:@AccurateDYBkbal Local:Field : DSP AccurateDrAmt : set as : $$IfCr:mad:@AccurateDYBkbal Local:Field : LV SubDrTotal : Width : 15% Page Local:Field : LV SubDrTotal : space Right : 1 Local:Field : LV SubCrTotal : Width : 15% Page Local:Field : DSP VchAcctTitle:color : Blue Local:Field : LV SubDrTotal:color : Red Local:Field : LV SubCrTotal:color : Blue Space Bottom : 0.1 Space Top : 0.1 Local:Field : DSP VchAcctTitle : Style : Normal Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Local:Field : DSP AccurateCrAmt : Invisible : Yes Local:Field : DSP AccurateDrAmt : Invisible : Yes [Line : DBGrndTotalline] Fields : DSP AccurateVchDate, DSP VchAcctTitle ;;DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : "Grand Total" Local : Field : LV SubDrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : LV SubCrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : DSP VchAcctTitle : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubCrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Width : 15% Page Local : Field : LV SubDrTotal : space Right : 1 Local : Field : LV SubCrTotal : Width : 15% Page Space Bottom : 0.2 Space Top : 0.1 Local : Style : Default: Bold : No Invisible : $$IsEmpty:mad:@MaxTotCBDrCrAmt ;;-------------------------------------------------------------------------- ;;;;;;; Print config including daily balancing option ;;;;;;;;;;;;;;;;;;;;;; [Report:AccurateDYBKPrintConfigure] Use:DYBKPrintConfigure Local:part:DYBKCFG Print Common:Add:Line:At Beginning:BalancingMethod [Report: DYBKCB Configure] Use:DYBKConfigure Local:part: DYBKCFG Common:add:line:At beginning:BalancingMethod [Button: DYBKCBConfigure] Key : F12 Action : Execute:DYBKCBConfigure Title : Configure [Collection:Mydaybookcollection] Use : Vouchers of Company Delete : Filter:DaybookFilter Filter : MyDBFilter Filter : MyDBFilter1 Filter : MyDBFilter2 ;Filter : MyDBFilter3 [Button:MyLedger] Title : Ledger Key : F5 Action : DisplayCollection :Monthly Ledger [Button: Optional Button1] Key : Ctrl + O Action : Set : OptionalFlag1 : NOT ##OptionalFlag1 Title : if ##OptionalFlag1 then $$LocaleString:"General" else $$LocaleString:"Optional" Inactive : NOT @@IsOptionalAllowed [Button: Optional Button2] Key : Ctrl + W Action : Set : OptionalFlag2 : NOT ##OptionalFlag2 Title : if ##OptionalFlag2 then $$LocaleString:"With Opeing " else $$LocaleString:"Without Op." [Button: Optional Button3] Key : Ctrl + R Action : Set : OptionalFlag3 : NOT ##OptionalFlag3 Title : if ##OptionalFlag3 then $$LocaleString:"Voucher No" else $$LocaleString:"With Ref. No" [Button: Blank Buttona1] Title : " " [Button: Blank Buttona2] Title : " " [Button: Blank Buttona3] Title : " " [Variable: CashFlag] Type : String [Variable: OptionalFlag1] Type : Logical Volatile : No [Variable: OptionalFlag2] Type : Logical Volatile : No [Variable: OptionalFlag3] Type : Logical Volatile : No [System:Formula] MyDBFilter : Not @@IsVchInvVch MyDBFilter1 : Not @@IsOrdInvVch MyDBFilter2 : if ##OptionalFlag1 then @@IsOtherVchs else Not @@IsOtherVchs MyLedger : "YES" [System:UDF] TransType:String:1000 [System:Formula] AccurateDrTotal : $$AsPositive:$$Total:MJAccurateDrAmt AccurateCrTotal : $$AsPositive:$$Total:MJAccurateCrAmt DSPAcratDrTotal : $$AsPositive:$$Total:DSPAccurateDrAmt DSPAcratCrTotal : $$AsPositive:$$Total:DSPAccurateCrAmt ;*************** [System:Formula] IsOrdInvVch : $$IsInventoryVch:$VoucherTypeName AND $$IsSalesOrder:$VoucherTypeName Or $$IsPurcOrder:$VoucherTypeName IsVchAccVch : Not $$IsInventoryVch:$VoucherTypeName AND $$IsContra:$VoucherTypeName and $Ledgername = $$CashAccountname or $$IsPayment:$VoucherTypeName or $$IsPurchase:$VoucherTypeName OR $$IsSales:$VoucherTypeName IsOtherVchs : $$IsRevJrnl:$VoucherTypeName OR $$IsMemo:$VoucherTypeName OR $IsOptional ;;OR ($$IsPayment:$VoucherTypeName AND $IsOptional) IsOptnlVchs : if ##OptionalFlag1 then Not $IsOptional Else $IsOptional CshLed1 : $$IsLedOfGrp:mad:@CName1:$$GroupCash CshLed2 : $$IsLedOfGrp:mad:@CName2:$$GroupCash CName1 : $$CollectionField:$LedgerName:1:LedgerEntries CName2 : $$CollectionField:$LedgerName:2:LedgerEntries Cname : if $$IsJournal:$VoucherTypeName then @@Cname2 else + if $$IsContra:$VoucherTypeName then @@Cname2 else + if $$IsReceipt:$VoucherTypeName then @@Cname2 else + if $$IsPayment:$VoucherTypeName then @@Cname2 else + "ABC" CashLed1 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed1 CashLed2 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed2 ContraCr : $$IsContra:$VoucherTypeName AND (@@CashLed1 = "Yes") CrNotesCr : $$IsCreditNote:$VoucherTypeName AND (@@CashLed1 = "Yes") DrNotesDr : $$IsDebitNote:$VoucherTypeName AND (@@CashLed1 = "Yes") JournalDr : $$IsJournal:$VoucherTypeName AND (@@CashLed1 = "Yes") SalesDr : $$IsSales:$VoucherTypeName AND (@@CashLed1 = "Yes") PurchaseCr : $$IsPurchase:$VoucherTypeName AND (@@CashLed1 = "Yes") RevJornlDr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) RevJornlCr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) IsMemoDr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) IsMemoCr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) [System:Formula] AccurateDYBkbal : $$NettAmount:mad:@AccurateCrTotal:mad:@AccurateDrTotal OpeningCBDrCrAmt : if $$IsVoucher OR $IsForexLine then $$PrevLine:mad:@AccurateDYBkbal else @@CBOpening CBOpening : if NOT ##DSPWithOpening then $$AsAmount:0 else + if NOT $$IsEmpty:$$ParentPeriodFrom AND $$ParentPeriodFrom < @@DSPFromDate then + $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$TBalClosing:Group:$$GroupCash else + $TBalOpening:Group:$$GroupCash MaxTotCBDrCrAmt : $$Max:mad:@AccurateCrTotal:mad:@AccurateDrTotal MaxTotDrCrAmt01 : $$Max:mad:@AccurateCrTotal:mad:@AccurateDrTotal MaxTotDrCrAmt02 : $$Max:mad:@DSPAcratCrTotal:mad:@DSPAcratDrTotal [Button:CashBankBook] Key : F1 Action : Display:Bank Group Summary [#Key: IncrementDate] Keys : Plus ;;, PgUp [#Key: DecrementDate] Key : Minus ;;------------------------------------------------------------ DAY BOOK OVER ;;__________________________________________________________________________ this code has total error plss help ;;************************************************************************** ;;------------------------------------------ DAY BOOK START ---------------- ;;__________________________________________________________________________ [System: Formula] MyDayBook : "Day Book with Balance" [#Menu: banking ] Add : Item : after : @@locDayBook: @@MyDayBook : Display : IdealDaybook : NOT $$IsEmpty:$$SelectedCmps ;Control : @@MyDayBook: $AssesseeTaxCode:Company:##SVCurrentCompany contains "D" [Report:IdealDaybook] Use : DSP Template Variables : SV CurrentCompany, SV FromDate, SV ToDate, SV SortMethod Variable : ExplodeFlag, ExplodeNarrFlag, VoucherTypeName, FamilyVoucherFlag Variable : OnlyAccVouchers, OnlyInvVouchers Variables : DBBillExplodeFlag, DBCostExplodeFlag, DBInvExplodeFlag, OptionalFlag1, OptionalFlag2, OptionalFlag3 Set : ExplodeFlag : if $$InPrintMode then "Yes" else "No" Set : SV From Date : if $$InPrintMode then $$MonthStart:##SVCurrentDate else ##SVCurrentDate Set : SV To Date : if $$InPrintMode then $$MonthEnd:##SVCurrentDate else ##SVCurrentDate Set : VoucherTypeName : $$SysName:AllItems Set : SV Sort Method : "Default" Set : BalancingMethod : "Daily" Set : IsRestoreMode : No Set : ExplodeFlag : Yes Set : OptionalFlag1 : if @@InCopyMode then $IsOptional:VoucherType:##SVVoucherType else $IsOptional Local : Collection : Specific Vouchers of Company : Filter : ForexVouchers Local : Collection : Filtered Vouchers of Company : Filter : ForexVouchers Filtered : Yes Print : AccurateDYBKPrintConfigure Form : IdealDaybook PrintSet : Report Title : "Day Book" Title : "Day Book with Cash Balance" [Form:IdealDaybook] Use : Extra VchKeys ;; insert,or add or duplicate voucher Fullwidth : yes BackGround : White,Light Autumn Green Button : ExplodeFlag, PrintButton, UploadButton, MailButton, ChangePeriod Button : ChangeDybkDate,ChangeCompany, DYBK ChgVchType,MyLedger BottomButton : Optional Button3, Blank Buttona3, Optional Button2, Blank Buttona2, Optional Button1, Blank Buttona1, InvReports BottomButton : AcctReports, DYBKCBConfigure, FilterButton Local:Button: DYBKConfigure:Action : ExecuteYBKConfigure ;;*Not use this...... Use : DSP Template Height : 100% Page Width : 100% Page Space Bottom : 0 MMS Part : DSP AccTitles, DSP AccurateVchTitle, AccurateDybkpart, DSP AccurateAccdetail BottomPart : AccurateDBBotPart Page Break : DB ClPageBreak, DB OpPageBreak Balancing : DSP CBCLBal : @@BalancingBreak OpeningBal : DSP CBOPBal Keys : IncrementDate, DecrementDate Option : DBKPageSetting : $$InPrintmode [!Form : DBKPageSetting] Space Left : 1% Page Space Right : 1% Page [#Part : DSP AccTitles] Space top : 1 [Part : DB ClPageBreak] Line : DSP ContLine order : Full Thin Top [Part : DB OpPageBreak] Parts : DSP OpCompanyName, DSP OpReportTitle, DSP AccurateVchTitle Vertical : Yes Space Top : 1 ;;3 [Part : DSP AccurateVchTitle] Line : DSP AccurateDBDate, Accurate DBMainTitle1 [Line : DSP AccurateDBDate] RightField : DSP AccurateDBDateTitle, DSP Dateline Invisible : $$InPrintmode [Field: DSP AccurateDBDateTitle] set as : "for" style : Normal Bold [Field: DSP Dateline] set as : @@DSPTODATE style : Normal Bold [Line : AccurateDBMainTitle1] Field : DSP AccurateVchDateTitle, DSP AccurateVchDBAcctTitle RightField : DSP AccurateVchTypeTitle, DSP AccurateVchNumberTitle,DSP AccurateDYDRTitle,DSP AccurateDYCRTitle Border : Thin Column Titles [Field: DSP AccurateVchDateTitle] Use : Short Date Field Info : " Date" Style : Normal Bold width : 10% Page Align : Centre ;;Left [Field: DSP AccurateVchDBAcctTitle] Use : Name Title Field Info : "Particulars" ;Indent : 4 Style : Normal Bold Space left : 1 Width : 35% Page Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchTypeTitle] Info : "Type " Style : Normal Bold Width : 13% Page Space left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchNumberTitle] Info : "Number" Style : Normal Bold Align : Right width : 10% Page Space Right : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateDYDRTitle] Use : Amount Title Field Info : "Debit" Style : Normal Bold Width : 15% Page Space Right : 1 Border : Thin Left Right : NOT $$Inprintmode [Field: DSP AccurateDYCRTitle] Use : Amount Title Field Info : "Credit " Style : Normal Bold Width : 15% Page ;------------------------------------------------------------- [Part : AccurateDybkpart] Line : DSP CBOPBal, DSP AccurateVCHDBDetail Repeat : DSP AccurateVCHDBDetail: Mydaybookcollection Scroll : Vertical Total : MJ AccurateDrAmt, MJ AccurateCrAmt, DSP AccurateDrAmt, DSP AccurateCrAmt Balancing : Yes Common Borders : Yes Float : Yes ;;Yes = means avoid blank lines No = full page Option : SPC Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND (NOT ##FamilyVoucherFlag OR NOT $IsReserved:VoucherType:##VoucherTypeName)) Option : FLT Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND ##FamilyVoucherFlag) Option : AccurateDyk PrintClBal: $$InPrintMode [!Part: SPC Accuratepart] Repeat : DSP AccurateVchDBDetail : Specific Vouchers of Company ;;;; to filter the vouchers under particular vch type eg. only my sale voucher among all salesvch under salesvchtype [!Part: FLT Accuratepart] Repeat : DSP AccurateVchDBDetail : Filtered Vouchers of Company ;;;; to filter the vouchers of particular vch type eg. all purchase vouchers [!Part: AccurateDyk PrintClBal] Add : Bottom Line : DSP CBCLBal Add : Lines : Before : DSP AccurateVchDBDetail : DSP CBOPBal [Line : DSP CBOPBal] Fields : DSP AccurateVchDate, DSP AccurateAccname RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDrAmt, DSP AccurateCrAmt, + MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Local:Field : DSP AccurateVchDate : set as: "" Local:Field : DSP AccurateVchNumber : set as: "" Local:Field : DSP AccurateVchType : set as: "" Local:Field : DSP AccurateAccname : set as: "Opening Balance" Local:Field : DSP AccurateDrAmt : set as: $$IfDr@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: $$IfCr@OpeningCBDrCrAmt Local:Field : DSP AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr@OpeningCBDrCrAmt Local:Field : MJ AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr@OpeningCBDrCrAmt Local:Field : MJ AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr@OpeningCBDrCrAmt Local:Field : DSP AccurateAccname:color : Blue Local:Field : DSP AccurateCrAmt:color : Red Local:Field : DSP AccurateDrAmt:color : Blue Local:Field : DSP AccurateDrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : DSP AccurateCrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Invisible : $$IsEmpty@OpeningCBDrCrAmt Space Top : 0.25 ;Space Bottom : 0.25 Next Page : $$LineNumber = $$LastLineNumber Invisible : if ##OptionalFlag2 then "Yes" else "No" [Line : DSP AccurateVCHDBDetail] Fields : DSP VchDate,DSP AccurateVchDate, DSP AccurateAccname ;;DSP AccurateVchDate RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDBAmt, DSP AccurateDrAmt, DSP AccurateCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Next Page : NOT $$DoExplosionsFit OR (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Explode : DSP AccurateAccdetail : $$IsVoucher AND NOT $IsDeleted AND NOT $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP AccurateAccExplosion : $$IsVoucher AND NOT $IsDeleted AND $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : MJDSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Add: Explode : At beginning : DBFirstBIL Explosion : @@DBFirstBillExplodable Add: Explode : At Beginning : DBFirstNAR Explosion : ($$KeyExplode OR ##ExplodeFlag) AND ($$KeyExplode OR ##ExplodeNarrFlag) AND NOT $$IsEmpty:$$CollectionField:$Narration:1:AllLedgerEntries Add: Explode : At Beginning : DBFirstINV Explosion : @@DBFirstInvExplodable Add: Explode : At Beginning : DBFirstCST Explosion : @@DBFirstCostExplodable Option : DSP AccurateVChDate2 : $$InPrintmode Local:Field : DSP VchDate : Invisible : Yes ;;********************************************************************** Option : AlterOnEnter : $$IsVoucher AND NOT $IsDeleted ;; manu jose Option : AlterOnEnter : ##ExplodeFlag AND $$IsVoucher AND NOT $IsDeleted ;;********************************************************************** [!Line: DSP AccurateVchDate2] Local:FieldSP VCH Date:set as:$Date [Field: DSP AccurateVchDate2] Use : Short Date Field width : 10% Page Style : If $$InPrintmode then "Normal" else "Normal bold" Space left : 1 Set as : if NOT $$IsVoucher then @@DSPToDate else + if NOT $$InPrintMode or not ##IsDaybook then $Date else + if $$LineNumber = $$FirstLineNumber then $Date else + if $$PrevLineVisible AND $$PrevLine:$Date = $Date then "" else $Date [Field: DSP AccurateVchDate] Use : Short Date Field width : 10% Page Set as : $Date ;;If $$InPrintmode then " " else $Date Align : Centre style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" [Field: DSP AccurateAccname] Set as : $$Upper:$DSPAccName:Ledger:$LedgerName Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Small Bold" else "Normal" width : 37% Page Space Left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchType] width : 13% Page Border : Thin Left : NOT $$Inprintmode Style : Normal ;;If $$InPrintmode then "Normal" else "Normal Bold" Space Left : 1 Set as : if NOT $$IsVoucher then "" else + if NOT $$InPixelMode then $AdditionalName:VoucherType:$VoucherTypeName else $CurLangVoucherTypeName [Field: DSP AccurateVchNumber] Width : 10% Page Border : Thin Left : NOT $$Inprintmode Space Right : 1 Style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" Align : Right Set as : If $$IsPurchase:$VoucherTypeName then @MjVchNo Else + If NOT $$IsVoucher then "" else @OptStr + $VoucherNumber MjVchNo : if ##OptionalFlag3 then $Reference else $VoucherNumber OptStr : if $IsOptional then $$LocaleString:"(Optional) " else " " Invisible : ##BankRecMode OR NOT $$InPixelMode Option : DSP VchNumberSpace : ##IsDayBook ;;************************ [Field: DSP AccurateDrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal Bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Thin Left Right : NOT $$Inprintmode Space Right : 1 set as : if ##ExplodeFlag then @manuDr else @babuDr manuDr : if $$IsDr:$Amount then $$AsPositive:$Amount else 0 babuDr : If @@JournalDr then $$AsPositiveDrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositiveDrValAmt2 else + If @@SalesDr then $$AsPositiveDrValAmt2 else + If @@ContraCr then 0 else + If @@CrNotesCr then 0 else + If @@PurchaseCr then 0 else $$AsPositiveDrValAmt100 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount [Field: DSP AccurateCrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right set as : if ##ExplodeFlag then @manuCr else @babuCr manuCr : if $$IsDr:$Amount then 0 else $$AsPositive:$Amount babuCr : If @@ContraCr then $$AsPositiveCrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositiveCrValAmt2 else + If @@PurchaseCr then $$AsPositiveCrValAmt2 else + If @@JournalDr then 0 else + If @@DrNotesDr then 0 else + If @@SalesDr then 0 else $$AsPositiveCrValAmt2 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount ;;xxxxxxxxxxxxxxxxxx [Field: MJ AccurateDrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@JournalDr then $$AsPositiveDrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositiveDrValAmt2 else + If @@SalesDr then $$AsPositiveDrValAmt2 else + 0 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositiveDrValAmt2 else 0 [Field: MJ AccurateCrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@ContraCr then $$AsPositiveCrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositiveCrValAmt2 else + If @@PurchaseCr then $$AsPositiveCrValAmt2 else + 0 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositiveCrValAmt2 else 0 ;;********************************** [Field: DSPAccurateDBAmt] Use : Amount Field Invisible : Yes Storage : Amount : All Ledger Entries : First Width : 5 [Field: DSPAccurateDBDrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfDr:#DSPAccurateDBAmt Style : Small Bold [Field: DSPAccurateDBCrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfCr:#DSPAccurateDBAmt Style : Small Bold ;; Narration ;; ========= [Part : MJDSP NarrExplode] Lines : MJDSP VchNarr [Line : MJDSP VchNarr] Indent : @@ShortDateWidth + 9 Fields : MJDSP VchNarr Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) [Field: MJDSP VchNarr] Use : Name Field Width : 37% Page Lines : 0 Set as : $Narration Style : Small Italic Align : Justified ;;############################ [Part : DSP AccurateAccdetail] Line : DSP AccurateAccdetail Repeat : DSP AccurateAccdetail:All Ledger Entries Total : MJ AccurateDrAmt, MJ AccurateCrAmt ;=================================================== [Line : DSP AccurateAccdetail] Fields : DSP AccurateVchDate,ACC VchExplAccount,DSP AccurateExplAmt RightField : DSP VchType,DSP VchNumber,DSP AccurateExplDrAmt, DSP AccurateExplCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt Explode : AccurateDBVCHINVAlloc Explosion : @@DBInvExplodable Explode : VCHLEDNarr Explosion : (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : AccurateDBVCHBILAlloc Explosion : @@DBBillExplodable Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Local : Field : DSP AccurateVchDate : set as : "" Local : Field : DSP VchNumber : set as : "" Local : Field : DSP VchDate : set as : "" Local : Field :MJ AccurateDrAmt: set as : "" Local : Field :MJ AccurateCrAmt: set as : "" Empty : $$PrevLine:$LedgerName = $$Upper:$$AccountName AND $$PrevLine:$Amount = $Amount [Field: ACC VchExplAccount] Use : Name Field width : 37% Page Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash then "Small Bold" else "Normal" Space Left : 1 Set as : $$Upper:$$AccountName QuickSearch : Yes [Field: DSP AccurateExplDrAmt] Use : DSP AccurateDrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then $$AsPositive:$Amount else 0 [Field: DSP AccurateExplCrAmt] Use : DSP AccurateCrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then 0 else $$AsPositive:$Amount ;;************************************************************************** [Field: DSP AccurateExplAmt] Use : Short Name Field Style : Small Bold Align : Right Set as : $$String:$Amount@DrCrFmt [!Part: DSP AccurateAccExplosion] UseSP AccurateAccdetail ;[Part: DSP AccurateAccExplosion] ;UseSP AccurateAccdetail [Part : AccurateDBVCHINVAlloc Explosion] Use : VCHINVAlloc Explosion Option : Non Bold Part Local : Line : STKALL Details : Delete : Explode : STKALL ActualQty Local : Line : STKALL Details : Add : Field : At beginningSP VchDate Local : Field : DSP VchDate : set as : "" [Part : AccurateDBVCHBILAlloc Explosion] Use : VCHBILAlloc Explosion Option : Non Bold Part Local : Line : VCHBILL ExplLine:Indent : @@DBIndentByLevel [Part : AccurateDBBotPart] Line : DSP CBCLBal Invisible : $$InPrintmode [Line : DSP CBCLBal] Lines : DBTotalline, DSP AccurateCBCLBal , DBGrndTotalline ;*************************************************************************** [Line : DBTotalline] Space Top : 0.5 Fields : DSP AccurateVchDate, DSP VchAcctTitle Right Fields : LV SubDrTotal1, LV SubCrTotal1 Border : Thin Column Titles : NOT $$Inprintmode ;; Cash Total : Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : if ##ExplodeFlag then "Cash Total" Else "Sub Total" Space Bottom : 0.1 Space Top : 0.2 Next Page : $$LineNumber = $$LastLineNumber Local:Field : DSP VchAcctTitle : Style : Normal [Field: LV SubDrTotal1] Use : DSP AccurateDrAmt Set as : if ##ExplodeFlag then @@AccurateDrTotal else @@DSPAcratDrTotal Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Full Thin Top:$$Inprintmode Space Right : 1 [Field: LV SubCrTotal1] Use : DSP AccurateCrAmt Set as : if ##ExplodeFlag then @zzz else @xxx Format : "NoZero,Decimals:2" Border : Full Thin Top:$$Inprintmode Width : 15% Page Align : Right xxx : @@MaxTotDrCrAmt02 - $$IfDr@AccurateDYBkbal zzz : @@MaxTotDrCrAmt01 - $$IfDr@AccurateDYBkbal [Line : DSP AccurateCBCLBal] Fields : DSP AccurateVchDate, DSP VchAcctTitle ,DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal , DSP AccurateDrAmt, DSP AccurateCrAmt Border : Thick Box : NOT $$Inprintmode Local:Field : DSP AccurateVchDate : set as : "" Local:Field : DSP VchAcctTitle : Info : "Closing Balance" Local:Field : LV SubCrTotal : set as : $$IfDr@AccurateDYBkbal Local:Field : LV SubDrTotal : set as : $$IfCr@AccurateDYBkbal Local:Field : DSP AccurateCrAmt : set as : $$IfDr@AccurateDYBkbal Local:Field : DSP AccurateDrAmt : set as : $$IfCr@AccurateDYBkbal Local:Field : LV SubDrTotal : Width : 15% Page Local:Field : LV SubDrTotal : space Right : 1 Local:Field : LV SubCrTotal : Width : 15% Page Local:Field : DSP VchAcctTitle:color : Blue Local:Field : LV SubDrTotal:color : Red Local:Field : LV SubCrTotal:color : Blue Space Bottom : 0.1 Space Top : 0.1 Local:Field : DSP VchAcctTitle : Style : Normal Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Local:Field : DSP AccurateCrAmt : Invisible : Yes Local:Field : DSP AccurateDrAmt : Invisible : Yes [Line : DBGrndTotalline] Fields : DSP AccurateVchDate, DSP VchAcctTitle ;;DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : "Grand Total" Local : Field : LV SubDrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : LV SubCrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : DSP VchAcctTitle : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubCrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Width : 15% Page Local : Field : LV SubDrTotal : space Right : 1 Local : Field : LV SubCrTotal : Width : 15% Page Space Bottom : 0.2 Space Top : 0.1 Local : Style : Default: Bold : No Invisible : $$IsEmpty@MaxTotCBDrCrAmt ;;-------------------------------------------------------------------------- ;;;;;;; Print config including daily balancing option ;;;;;;;;;;;;;;;;;;;;;; [Report:AccurateDYBKPrintConfigure] UseYBKPrintConfigure LocalartYBKCFG Print Common:Add:Line:At Beginning:BalancingMethod [Report: DYBKCB Configure] UseYBKConfigure Localart: DYBKCFG Common:add:line:At beginning:BalancingMethod [Button: DYBKCBConfigure] Key : F12 Action : ExecuteYBKCBConfigure Title : Configure [Collection:Mydaybookcollection] Use : Vouchers of Company Delete : FilteraybookFilter Filter : MyDBFilter Filter : MyDBFilter1 Filter : MyDBFilter2 ;Filter : MyDBFilter3 [Button:MyLedger] Title : Ledger Key : F5 Action : DisplayCollection :Monthly Ledger [Button: Optional Button1] Key : Ctrl + O Action : Set : OptionalFlag1 : NOT ##OptionalFlag1 Title : if ##OptionalFlag1 then $$LocaleString:"General" else $$LocaleString:"Optional" Inactive : NOT @@IsOptionalAllowed [Button: Optional Button2] Key : Ctrl + W Action : Set : OptionalFlag2 : NOT ##OptionalFlag2 Title : if ##OptionalFlag2 then $$LocaleString:"With Opeing " else $$LocaleString:"Without Op." [Button: Optional Button3] Key : Ctrl + R Action : Set : OptionalFlag3 : NOT ##OptionalFlag3 Title : if ##OptionalFlag3 then $$LocaleString:"Voucher No" else $$LocaleString:"With Ref. No" [Button: Blank Buttona1] Title : " " [Button: Blank Buttona2] Title : " " [Button: Blank Buttona3] Title : " " [Variable: CashFlag] Type : String [Variable: OptionalFlag1] Type : Logical Volatile : No [Variable: OptionalFlag2] Type : Logical Volatile : No [Variable: OptionalFlag3] Type : Logical Volatile : No [System:Formula] MyDBFilter : Not @@IsVchInvVch MyDBFilter1 : Not @@IsOrdInvVch MyDBFilter2 : if ##OptionalFlag1 then @@IsOtherVchs else Not @@IsOtherVchs MyLedger : "YES" [System:UDF] TransType:String:1000 [System:Formula] AccurateDrTotal : $$AsPositive:$$Total:MJAccurateDrAmt AccurateCrTotal : $$AsPositive:$$Total:MJAccurateCrAmt DSPAcratDrTotal : $$AsPositive:$$TotalSPAccurateDrAmt DSPAcratCrTotal : $$AsPositive:$$TotalSPAccurateCrAmt ;*************** [System:Formula] IsOrdInvVch : $$IsInventoryVch:$VoucherTypeName AND $$IsSalesOrder:$VoucherTypeName Or $$IsPurcOrder:$VoucherTypeName IsVchAccVch : Not $$IsInventoryVch:$VoucherTypeName AND $$IsContra:$VoucherTypeName and $Ledgername = $$CashAccountname or $$IsPayment:$VoucherTypeName or $$IsPurchase:$VoucherTypeName OR $$IsSales:$VoucherTypeName IsOtherVchs : $$IsRevJrnl:$VoucherTypeName OR $$IsMemo:$VoucherTypeName OR $IsOptional ;;OR ($$IsPayment:$VoucherTypeName AND $IsOptional) IsOptnlVchs : if ##OptionalFlag1 then Not $IsOptional Else $IsOptional CshLed1 : $$IsLedOfGrp@CName1:$$GroupCash CshLed2 : $$IsLedOfGrp@CName2:$$GroupCash CName1 : $$CollectionField:$LedgerName:1:LedgerEntries CName2 : $$CollectionField:$LedgerName:2:LedgerEntries Cname : if $$IsJournal:$VoucherTypeName then @@Cname2 else + if $$IsContra:$VoucherTypeName then @@Cname2 else + if $$IsReceipt:$VoucherTypeName then @@Cname2 else + if $$IsPayment:$VoucherTypeName then @@Cname2 else + "ABC" CashLed1 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed1 CashLed2 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed2 ContraCr : $$IsContra:$VoucherTypeName AND (@@CashLed1 = "Yes") CrNotesCr : $$IsCreditNote:$VoucherTypeName AND (@@CashLed1 = "Yes") DrNotesDr : $$IsDebitNote:$VoucherTypeName AND (@@CashLed1 = "Yes") JournalDr : $$IsJournal:$VoucherTypeName AND (@@CashLed1 = "Yes") SalesDr : $$IsSales:$VoucherTypeName AND (@@CashLed1 = "Yes") PurchaseCr : $$IsPurchase:$VoucherTypeName AND (@@CashLed1 = "Yes") RevJornlDr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) RevJornlCr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) IsMemoDr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) IsMemoCr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) [System:Formula] AccurateDYBkbal : $$NettAmount@AccurateCrTotal@AccurateDrTotal OpeningCBDrCrAmt : if $$IsVoucher OR $IsForexLine then $$PrevLine@AccurateDYBkbal else @@CBOpening CBOpening : if NOT ##DSPWithOpening then $$AsAmount:0 else + if NOT $$IsEmpty:$$ParentPeriodFrom AND $$ParentPeriodFrom < @@DSPFromDate then + $$FromValue:$$ParentPeriodFrom:$$ToValue@DSPFromDateLessOne:$TBalClosing:Group:$$GroupCash else + $TBalOpening:Group:$$GroupCash MaxTotCBDrCrAmt : $$Max@AccurateCrTotal@AccurateDrTotal MaxTotDrCrAmt01 : $$Max@AccurateCrTotal@AccurateDrTotal MaxTotDrCrAmt02 : $$Max@DSPAcratCrTotal@DSPAcratDrTotal [Button:CashBankBook] Key : F1 Action : Display:Bank Group Summary [#Key: IncrementDate] Keys : Plus ;;, PgUp [#Key: DecrementDate] Key : Minus ;;------------------------------------------------------------ DAY BOOK OVER ;;__________________________________________________________________________
Code: ;;************************************************************************** ;;------------------------------------------ DAY BOOK START ---------------- ;;__________________________________________________________________________ [System: Formula] MyDayBook : "Day Book with Balance" [#Menu: banking ] Add : Item : after : @@locDayBook: @@MyDayBook : Display : IdealDaybook : NOT $$IsEmpty:$$SelectedCmps ;Control : @@MyDayBook: $AssesseeTaxCode:Company:##SVCurrentCompany contains "D" [Report:IdealDaybook] Use : DSP Template Variables : SV CurrentCompany, SV FromDate, SV ToDate, SV SortMethod Variable : ExplodeFlag, ExplodeNarrFlag, VoucherTypeName, FamilyVoucherFlag Variable : OnlyAccVouchers, OnlyInvVouchers Variables : DBBillExplodeFlag, DBCostExplodeFlag, DBInvExplodeFlag, OptionalFlag1, OptionalFlag2, OptionalFlag3 Set : ExplodeFlag : if $$InPrintMode then "Yes" else "No" Set : SV From Date : if $$InPrintMode then $$MonthStart:##SVCurrentDate else ##SVCurrentDate Set : SV To Date : if $$InPrintMode then $$MonthEnd:##SVCurrentDate else ##SVCurrentDate Set : VoucherTypeName : $$SysName:AllItems Set : SV Sort Method : "Default" Set : BalancingMethod : "Daily" Set : IsRestoreMode : No Set : ExplodeFlag : Yes Set : OptionalFlag1 : if @@InCopyMode then $IsOptional:VoucherType:##SVVoucherType else $IsOptional Local : Collection : Specific Vouchers of Company : Filter : ForexVouchers Local : Collection : Filtered Vouchers of Company : Filter : ForexVouchers Filtered : Yes Print : AccurateDYBKPrintConfigure Form : IdealDaybook PrintSet : Report Title : "Day Book" Title : "Day Book with Cash Balance" [Form:IdealDaybook] Use : Extra VchKeys ;; insert,or add or duplicate voucher Fullwidth : yes BackGround : White,Light Autumn Green Button : ExplodeFlag, PrintButton, UploadButton, MailButton, ChangePeriod Button : ChangeDybkDate,ChangeCompany, DYBK ChgVchType,MyLedger BottomButton : Optional Button3, Blank Buttona3, Optional Button2, Blank Buttona2, Optional Button1, Blank Buttona1, InvReports BottomButton : AcctReports, DYBKCBConfigure, FilterButton Local:Button: DYBKConfigure:Action : Execute:DYBKConfigure ;;*Not use this...... Use : DSP Template Height : 100% Page Width : 100% Page Space Bottom : 0 MMS Part : DSP AccTitles, DSP AccurateVchTitle, AccurateDybkpart, DSP AccurateAccdetail BottomPart : AccurateDBBotPart Page Break : DB ClPageBreak, DB OpPageBreak Balancing : DSP CBCLBal : @@BalancingBreak OpeningBal : DSP CBOPBal Keys : IncrementDate, DecrementDate Option : DBKPageSetting : $$InPrintmode [!Form : DBKPageSetting] Space Left : 1% Page Space Right : 1% Page [#Part : DSP AccTitles] Space top : 1 [Part : DB ClPageBreak] Line : DSP ContLine order : Full Thin Top [Part : DB OpPageBreak] Parts : DSP OpCompanyName, DSP OpReportTitle, DSP AccurateVchTitle Vertical : Yes Space Top : 1 ;;3 [Part : DSP AccurateVchTitle] Line : DSP AccurateDBDate, Accurate DBMainTitle1 [Line : DSP AccurateDBDate] RightField : DSP AccurateDBDateTitle, DSP Dateline Invisible : $$InPrintmode [Field: DSP AccurateDBDateTitle] set as : "for" style : Normal Bold [Field: DSP Dateline] set as : @@DSPTODATE style : Normal Bold [Line : AccurateDBMainTitle1] Field : DSP AccurateVchDateTitle, DSP AccurateVchDBAcctTitle RightField : DSP AccurateVchTypeTitle, DSP AccurateVchNumberTitle,DSP AccurateDYDRTitle,DSP AccurateDYCRTitle Border : Thin Column Titles [Field: DSP AccurateVchDateTitle] Use : Short Date Field Info : " Date" Style : Normal Bold width : 10% Page Align : Centre ;;Left [Field: DSP AccurateVchDBAcctTitle] Use : Name Title Field Info : "Particulars" ;Indent : 4 Style : Normal Bold Space left : 1 Width : 35% Page Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchTypeTitle] Info : "Type " Style : Normal Bold Width : 13% Page Space left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchNumberTitle] Info : "Number" Style : Normal Bold Align : Right width : 10% Page Space Right : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateDYDRTitle] Use : Amount Title Field Info : "Debit" Style : Normal Bold Width : 15% Page Space Right : 1 Border : Thin Left Right : NOT $$Inprintmode [Field: DSP AccurateDYCRTitle] Use : Amount Title Field Info : "Credit " Style : Normal Bold Width : 15% Page ;------------------------------------------------------------- [Part : AccurateDybkpart] Line : DSP CBOPBal, DSP AccurateVCHDBDetail Repeat : DSP AccurateVCHDBDetail: Mydaybookcollection Scroll : Vertical Total : MJ AccurateDrAmt, MJ AccurateCrAmt, DSP AccurateDrAmt, DSP AccurateCrAmt Balancing : Yes Common Borders : Yes Float : Yes ;;Yes = means avoid blank lines No = full page Option : SPC Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND (NOT ##FamilyVoucherFlag OR NOT $IsReserved:VoucherType:##VoucherTypeName)) Option : FLT Accuratepart : NOT ##TallyAudit AND (NOT $$IsSysName:##VoucherTypeName AND ##FamilyVoucherFlag) Option : AccurateDyk PrintClBal: $$InPrintMode [!Part: SPC Accuratepart] Repeat : DSP AccurateVchDBDetail : Specific Vouchers of Company ;;;; to filter the vouchers under particular vch type eg. only my sale voucher among all salesvch under salesvchtype [!Part: FLT Accuratepart] Repeat : DSP AccurateVchDBDetail : Filtered Vouchers of Company ;;;; to filter the vouchers of particular vch type eg. all purchase vouchers [!Part: AccurateDyk PrintClBal] Add : Bottom Line : DSP CBCLBal Add : Lines : Before : DSP AccurateVchDBDetail : DSP CBOPBal [Line : DSP CBOPBal] Fields : DSP AccurateVchDate, DSP AccurateAccname RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDrAmt, DSP AccurateCrAmt, + MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Local:Field : DSP AccurateVchDate : set as: "" Local:Field : DSP AccurateVchNumber : set as: "" Local:Field : DSP AccurateVchType : set as: "" Local:Field : DSP AccurateAccname : set as: "Opening Balance" Local:Field : DSP AccurateDrAmt : set as: $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : MJ AccurateDrAmt : set as: if ##OptionalFlag2 then 0 else $$IfDr:mad:@OpeningCBDrCrAmt Local:Field : MJ AccurateCrAmt : set as: if ##OptionalFlag2 then 0 else $$IfCr:mad:@OpeningCBDrCrAmt Local:Field : DSP AccurateAccname:color : Blue Local:Field : DSP AccurateCrAmt:color : Red Local:Field : DSP AccurateDrAmt:color : Blue Local:Field : DSP AccurateDrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : DSP AccurateCrAmt:Style : If $$InPrintmode then "Large Bold" else "Normal bold" Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Invisible : $$IsEmpty:mad:@OpeningCBDrCrAmt Space Top : 0.25 ;Space Bottom : 0.25 Next Page : $$LineNumber = $$LastLineNumber Invisible : if ##OptionalFlag2 then "Yes" else "No" [Line : DSP AccurateVCHDBDetail] Fields : DSP VchDate,DSP AccurateVchDate, DSP AccurateAccname ;;DSP AccurateVchDate RightField : DSP AccurateVchType, DSP AccurateVchNumber, DSP AccurateDBAmt, DSP AccurateDrAmt, DSP AccurateCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt ;;, SUB AccurateDrAmt, SUB AccurateCrAmt Next Page : NOT $$DoExplosionsFit OR (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Explode : DSP AccurateAccdetail : $$IsVoucher AND NOT $IsDeleted AND NOT $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP AccurateAccExplosion : $$IsVoucher AND NOT $IsDeleted AND $$InPrintMode AND ($$KeyExplode OR ##ExplodeFlag) Explode : DSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : MJDSP NarrExplode : $$IsVoucher AND (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Add: Explode : At beginning : DBFirstBIL Explosion : @@DBFirstBillExplodable Add: Explode : At Beginning : DBFirstNAR Explosion : ($$KeyExplode OR ##ExplodeFlag) AND ($$KeyExplode OR ##ExplodeNarrFlag) AND NOT $$IsEmpty:$$CollectionField:$Narration:1:AllLedgerEntries Add: Explode : At Beginning : DBFirstINV Explosion : @@DBFirstInvExplodable Add: Explode : At Beginning : DBFirstCST Explosion : @@DBFirstCostExplodable Option : DSP AccurateVChDate2 : $$InPrintmode Local:Field : DSP VchDate : Invisible : Yes ;;********************************************************************** Option : AlterOnEnter : $$IsVoucher AND NOT $IsDeleted ;; manu jose Option : AlterOnEnter : ##ExplodeFlag AND $$IsVoucher AND NOT $IsDeleted ;;********************************************************************** [!Line: DSP AccurateVchDate2] Local:Field:DSP VCH Date:set as:$Date [Field: DSP AccurateVchDate2] Use : Short Date Field width : 10% Page Style : If $$InPrintmode then "Normal" else "Normal bold" Space left : 1 Set as : if NOT $$IsVoucher then @@DSPToDate else + if NOT $$InPrintMode or not ##IsDaybook then $Date else + if $$LineNumber = $$FirstLineNumber then $Date else + if $$PrevLineVisible AND $$PrevLine:$Date = $Date then "" else $Date [Field: DSP AccurateVchDate] Use : Short Date Field width : 10% Page Set as : $Date ;;If $$InPrintmode then " " else $Date Align : Centre style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" [Field: DSP AccurateAccname] Set as : $$Upper:$DSPAccName:Ledger:$LedgerName Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Small Bold" else "Normal" width : 37% Page Space Left : 1 Border : Thin Left : NOT $$Inprintmode [Field: DSP AccurateVchType] width : 13% Page Border : Thin Left : NOT $$Inprintmode Style : Normal ;;If $$InPrintmode then "Normal" else "Normal Bold" Space Left : 1 Set as : if NOT $$IsVoucher then "" else + if NOT $$InPixelMode then $AdditionalName:VoucherType:$VoucherTypeName else $CurLangVoucherTypeName [Field: DSP AccurateVchNumber] Width : 10% Page Border : Thin Left : NOT $$Inprintmode Space Right : 1 Style : Normal ;;If $$InPrintmode then "Normal" else "Normal bold" Align : Right Set as : If $$IsPurchase:$VoucherTypeName then @MjVchNo Else + If NOT $$IsVoucher then "" else @OptStr + $VoucherNumber MjVchNo : if ##OptionalFlag3 then $Reference else $VoucherNumber OptStr : if $IsOptional then $$LocaleString:"(Optional) " else " " Invisible : ##BankRecMode OR NOT $$InPixelMode Option : DSP VchNumberSpace : ##IsDayBook ;;************************ [Field: DSP AccurateDrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal Bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Thin Left Right : NOT $$Inprintmode Space Right : 1 set as : if ##ExplodeFlag then @manuDr else @babuDr manuDr : if $$IsDr:$Amount then $$AsPositive:$Amount else 0 babuDr : If @@JournalDr then $$AsPositive:mad:DrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositive:mad:DrValAmt2 else + If @@SalesDr then $$AsPositive:mad:DrValAmt2 else + If @@ContraCr then 0 else + If @@CrNotesCr then 0 else + If @@PurchaseCr then 0 else $$AsPositive:mad:DrValAmt100 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount [Field: DSP AccurateCrAmt] Use : AmountField Style : If $$InPrintmode then "Normal" else "Normal bold" Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash AND ##ExplodeFlag then "Normal Bold" else "Normal" Format : "NoZero,Decimals:2" Width : 15% Page Align : Right set as : if ##ExplodeFlag then @manuCr else @babuCr manuCr : if $$IsDr:$Amount then 0 else $$AsPositive:$Amount babuCr : If @@ContraCr then $$AsPositive:mad:CrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositive:mad:CrValAmt2 else + If @@PurchaseCr then $$AsPositive:mad:CrValAmt2 else + If @@JournalDr then 0 else + If @@DrNotesDr then 0 else + If @@SalesDr then 0 else $$AsPositive:mad:CrValAmt2 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount ;;xxxxxxxxxxxxxxxxxx [Field: MJ AccurateDrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@JournalDr then $$AsPositive:mad:DrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @DrValAmt1 else + If @@DrNotesDr then $$AsPositive:mad:DrValAmt2 else + If @@SalesDr then $$AsPositive:mad:DrValAmt2 else + 0 DrValAmt1 : If $$IsDr:$Amount then 0 else $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount DrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsDr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositive:mad:DrValAmt2 else 0 [Field: MJ AccurateCrAmt] Use : AmountField Set As : if ##OptionalFlag1 then @ABCD2 else @ABCD1 ABCD1 : If @@ContraCr then $$AsPositive:mad:CrValAmt2 else + If $$FilterCount:AllLedgerEntries:HasCashEntry > 0 then @CrValAmt1 else + If @@CrNotesCr then $$AsPositive:mad:CrValAmt2 else + If @@PurchaseCr then $$AsPositive:mad:CrValAmt2 else + 0 CrValAmt1 : If $$IsDr:$Amount then $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount else 0 CrValAmt2 : $$FilterAmtTotal:AllLedgerEntries:IsCr:$Amount Invisible : Yes ABCD2 : if ##OptionalFlag1 then $$AsPositive:mad:CrValAmt2 else 0 ;;********************************** [Field: DSPAccurateDBAmt] Use : Amount Field Invisible : Yes Storage : Amount : All Ledger Entries : First Width : 5 [Field: DSPAccurateDBDrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfDr:#DSPAccurateDBAmt Style : Small Bold [Field: DSPAccurateDBCrAmt] Use : Amount Field Set as : if $IsCancelled OR $IsDeleted then 0 else $$IfCr:#DSPAccurateDBAmt Style : Small Bold ;; Narration ;; ========= [Part : MJDSP NarrExplode] Lines : MJDSP VchNarr [Line : MJDSP VchNarr] Indent : @@ShortDateWidth + 9 Fields : MJDSP VchNarr Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) [Field: MJDSP VchNarr] Use : Name Field Width : 37% Page Lines : 0 Set as : $Narration Style : Small Italic Align : Justified ;;############################ [Part : DSP AccurateAccdetail] Line : DSP AccurateAccdetail Repeat : DSP AccurateAccdetail:All Ledger Entries Total : MJ AccurateDrAmt, MJ AccurateCrAmt ;=================================================== [Line : DSP AccurateAccdetail] Fields : DSP AccurateVchDate,ACC VchExplAccount,DSP AccurateExplAmt RightField : DSP VchType,DSP VchNumber,DSP AccurateExplDrAmt, DSP AccurateExplCrAmt, MJ AccurateDrAmt, MJ AccurateCrAmt Explode : AccurateDBVCHINVAlloc Explosion : @@DBInvExplodable Explode : VCHLEDNarr Explosion : (##ExplodeNarrFlag OR $$KeyExplode) AND NOT $$IsEmpty:$Narration Explode : AccurateDBVCHBILAlloc Explosion : @@DBBillExplodable Next Page : (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet) Local : Field : DSP AccurateVchDate : set as : "" Local : Field : DSP VchNumber : set as : "" Local : Field : DSP VchDate : set as : "" Local : Field :MJ AccurateDrAmt: set as : "" Local : Field :MJ AccurateCrAmt: set as : "" Empty : $$PrevLine:$LedgerName = $$Upper:$$AccountName AND $$PrevLine:$Amount = $Amount [Field: ACC VchExplAccount] Use : Name Field width : 37% Page Style : if $$IsLedOfGrp:$Ledgername:$$GroupCash then "Small Bold" else "Normal" Space Left : 1 Set as : $$Upper:$$AccountName QuickSearch : Yes [Field: DSP AccurateExplDrAmt] Use : DSP AccurateDrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then $$AsPositive:$Amount else 0 [Field: DSP AccurateExplCrAmt] Use : DSP AccurateCrAmt Style : If $$IsLedOfGrp:$Ledgername:$$GroupCash then "Normal Bold" else "Normal" Set as : If $$IsDr:$Amount then 0 else $$AsPositive:$Amount ;;************************************************************************** [Field: DSP AccurateExplAmt] Use : Short Name Field Style : Small Bold Align : Right Set as : $$String:$Amount:mad:@DrCrFmt [!Part: DSP AccurateAccExplosion] Use:DSP AccurateAccdetail ;[Part: DSP AccurateAccExplosion] ;Use:DSP AccurateAccdetail [Part : AccurateDBVCHINVAlloc Explosion] Use : VCHINVAlloc Explosion Option : Non Bold Part Local : Line : STKALL Details : Delete : Explode : STKALL ActualQty Local : Line : STKALL Details : Add : Field : At beginning:DSP VchDate Local : Field : DSP VchDate : set as : "" [Part : AccurateDBVCHBILAlloc Explosion] Use : VCHBILAlloc Explosion Option : Non Bold Part Local : Line : VCHBILL ExplLine:Indent : @@DBIndentByLevel [Part : AccurateDBBotPart] Line : DSP CBCLBal Invisible : $$InPrintmode [Line : DSP CBCLBal] Lines : DBTotalline, DSP AccurateCBCLBal , DBGrndTotalline ;*************************************************************************** [Line : DBTotalline] Space Top : 0.5 Fields : DSP AccurateVchDate, DSP VchAcctTitle Right Fields : LV SubDrTotal1, LV SubCrTotal1 Border : Thin Column Titles : NOT $$Inprintmode ;; Cash Total : Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : if ##ExplodeFlag then "Cash Total" Else "Sub Total" Space Bottom : 0.1 Space Top : 0.2 Next Page : $$LineNumber = $$LastLineNumber Local:Field : DSP VchAcctTitle : Style : Normal [Field: LV SubDrTotal1] Use : DSP AccurateDrAmt Set as : if ##ExplodeFlag then @@AccurateDrTotal else @@DSPAcratDrTotal Format : "NoZero,Decimals:2" Width : 15% Page Align : Right Border : Full Thin Top:$$Inprintmode Space Right : 1 [Field: LV SubCrTotal1] Use : DSP AccurateCrAmt Set as : if ##ExplodeFlag then @zzz else @xxx Format : "NoZero,Decimals:2" Border : Full Thin Top:$$Inprintmode Width : 15% Page Align : Right xxx : @@MaxTotDrCrAmt02 - $$IfDr:mad:@AccurateDYBkbal zzz : @@MaxTotDrCrAmt01 - $$IfDr:mad:@AccurateDYBkbal [Line : DSP AccurateCBCLBal] Fields : DSP AccurateVchDate, DSP VchAcctTitle ,DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal , DSP AccurateDrAmt, DSP AccurateCrAmt Border : Thick Box : NOT $$Inprintmode Local:Field : DSP AccurateVchDate : set as : "" Local:Field : DSP VchAcctTitle : Info : "Closing Balance" Local:Field : LV SubCrTotal : set as : $$IfDr:mad:@AccurateDYBkbal Local:Field : LV SubDrTotal : set as : $$IfCr:mad:@AccurateDYBkbal Local:Field : DSP AccurateCrAmt : set as : $$IfDr:mad:@AccurateDYBkbal Local:Field : DSP AccurateDrAmt : set as : $$IfCr:mad:@AccurateDYBkbal Local:Field : LV SubDrTotal : Width : 15% Page Local:Field : LV SubDrTotal : space Right : 1 Local:Field : LV SubCrTotal : Width : 15% Page Local:Field : DSP VchAcctTitle:color : Blue Local:Field : LV SubDrTotal:color : Red Local:Field : LV SubCrTotal:color : Blue Space Bottom : 0.1 Space Top : 0.1 Local:Field : DSP VchAcctTitle : Style : Normal Local:Field : LV SubDrTotal : Style : Large Bold Local:Field : LV SubCrTotal : Style : Large Bold Local:Field : DSP AccurateCrAmt : Invisible : Yes Local:Field : DSP AccurateDrAmt : Invisible : Yes [Line : DBGrndTotalline] Fields : DSP AccurateVchDate, DSP VchAcctTitle ;;DSP AccurateAccname Right Fields : LV SubDrTotal, LV SubCrTotal Local : Field : DSP AccurateVchDate : Set as : "" Local : Field : DSP VchAcctTitle: Info : "Grand Total" Local : Field : LV SubDrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : LV SubCrTotal : Set as : if @@ExplodeFlag then @@MaxTotDrCrAmt01 else @@MaxTotDrCrAmt02 Local : Field : DSP VchAcctTitle : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubCrTotal : Border : Flush Totals:$$Inprintmode Local : Field : LV SubDrTotal : Width : 15% Page Local : Field : LV SubDrTotal : space Right : 1 Local : Field : LV SubCrTotal : Width : 15% Page Space Bottom : 0.2 Space Top : 0.1 Local : Style : Default: Bold : No Invisible : $$IsEmpty:mad:@MaxTotCBDrCrAmt ;;-------------------------------------------------------------------------- ;;;;;;; Print config including daily balancing option ;;;;;;;;;;;;;;;;;;;;;; [Report:AccurateDYBKPrintConfigure] Use:DYBKPrintConfigure Local:part:DYBKCFG Print Common:Add:Line:At Beginning:BalancingMethod [Report: DYBKCB Configure] Use:DYBKConfigure Local:part: DYBKCFG Common:add:line:At beginning:BalancingMethod [Button: DYBKCBConfigure] Key : F12 Action : Execute:DYBKCBConfigure Title : Configure [Collection:Mydaybookcollection] Use : Vouchers of Company Delete : Filter:DaybookFilter Filter : MyDBFilter Filter : MyDBFilter1 Filter : MyDBFilter2 ;Filter : MyDBFilter3 [Button:MyLedger] Title : Ledger Key : F5 Action : DisplayCollection :Monthly Ledger [Button: Optional Button1] Key : Ctrl + O Action : Set : OptionalFlag1 : NOT ##OptionalFlag1 Title : if ##OptionalFlag1 then $$LocaleString:"General" else $$LocaleString:"Optional" Inactive : NOT @@IsOptionalAllowed [Button: Optional Button2] Key : Ctrl + W Action : Set : OptionalFlag2 : NOT ##OptionalFlag2 Title : if ##OptionalFlag2 then $$LocaleString:"With Opeing " else $$LocaleString:"Without Op." [Button: Optional Button3] Key : Ctrl + R Action : Set : OptionalFlag3 : NOT ##OptionalFlag3 Title : if ##OptionalFlag3 then $$LocaleString:"Voucher No" else $$LocaleString:"With Ref. No" [Button: Blank Buttona1] Title : " " [Button: Blank Buttona2] Title : " " [Button: Blank Buttona3] Title : " " [Variable: CashFlag] Type : String [Variable: OptionalFlag1] Type : Logical Volatile : No [Variable: OptionalFlag2] Type : Logical Volatile : No [Variable: OptionalFlag3] Type : Logical Volatile : No [System:Formula] MyDBFilter : Not @@IsVchInvVch MyDBFilter1 : Not @@IsOrdInvVch MyDBFilter2 : if ##OptionalFlag1 then @@IsOtherVchs else Not @@IsOtherVchs MyLedger : "YES" [System:UDF] TransType:String:1000 [System:Formula] AccurateDrTotal : $$AsPositive:$$Total:MJAccurateDrAmt AccurateCrTotal : $$AsPositive:$$Total:MJAccurateCrAmt DSPAcratDrTotal : $$AsPositive:$$Total:DSPAccurateDrAmt DSPAcratCrTotal : $$AsPositive:$$Total:DSPAccurateCrAmt ;*************** [System:Formula] IsOrdInvVch : $$IsInventoryVch:$VoucherTypeName AND $$IsSalesOrder:$VoucherTypeName Or $$IsPurcOrder:$VoucherTypeName IsVchAccVch : Not $$IsInventoryVch:$VoucherTypeName AND $$IsContra:$VoucherTypeName and $Ledgername = $$CashAccountname or $$IsPayment:$VoucherTypeName or $$IsPurchase:$VoucherTypeName OR $$IsSales:$VoucherTypeName IsOtherVchs : $$IsRevJrnl:$VoucherTypeName OR $$IsMemo:$VoucherTypeName OR $IsOptional ;;OR ($$IsPayment:$VoucherTypeName AND $IsOptional) IsOptnlVchs : if ##OptionalFlag1 then Not $IsOptional Else $IsOptional CshLed1 : $$IsLedOfGrp:mad:@CName1:$$GroupCash CshLed2 : $$IsLedOfGrp:mad:@CName2:$$GroupCash CName1 : $$CollectionField:$LedgerName:1:LedgerEntries CName2 : $$CollectionField:$LedgerName:2:LedgerEntries Cname : if $$IsJournal:$VoucherTypeName then @@Cname2 else + if $$IsContra:$VoucherTypeName then @@Cname2 else + if $$IsReceipt:$VoucherTypeName then @@Cname2 else + if $$IsPayment:$VoucherTypeName then @@Cname2 else + "ABC" CashLed1 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed1 CashLed2 : if $IsOptional OR $$IsMemo:$VoucherTypeName OR $$IsRevJrnl:$VoucherTypeName then "Yes" else @@CshLed2 ContraCr : $$IsContra:$VoucherTypeName AND (@@CashLed1 = "Yes") CrNotesCr : $$IsCreditNote:$VoucherTypeName AND (@@CashLed1 = "Yes") DrNotesDr : $$IsDebitNote:$VoucherTypeName AND (@@CashLed1 = "Yes") JournalDr : $$IsJournal:$VoucherTypeName AND (@@CashLed1 = "Yes") SalesDr : $$IsSales:$VoucherTypeName AND (@@CashLed1 = "Yes") PurchaseCr : $$IsPurchase:$VoucherTypeName AND (@@CashLed1 = "Yes") RevJornlDr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) RevJornlCr : $$IsRevJrnl:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) IsMemoDr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "Yes" OR @@CashLed1 = @@CashLed2) IsMemoCr : $$IsMemo:$VoucherTypeName AND (@@CashLed1 = "No" OR @@CashLed1 = @@CashLed2) [System:Formula] AccurateDYBkbal : $$NettAmount:mad:@AccurateCrTotal:mad:@AccurateDrTotal OpeningCBDrCrAmt : if $$IsVoucher OR $IsForexLine then $$PrevLine:mad:@AccurateDYBkbal else @@CBOpening CBOpening : if NOT ##DSPWithOpening then $$AsAmount:0 else + if NOT $$IsEmpty:$$ParentPeriodFrom AND $$ParentPeriodFrom < @@DSPFromDate then + $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$TBalClosing:Group:$$GroupCash else + $TBalOpening:Group:$$GroupCash MaxTotCBDrCrAmt : $$Max:mad:@AccurateCrTotal:mad:@AccurateDrTotal MaxTotDrCrAmt01 : $$Max:mad:@AccurateCrTotal:mad:@AccurateDrTotal MaxTotDrCrAmt02 : $$Max:mad:@DSPAcratCrTotal:mad:@DSPAcratDrTotal [Button:CashBankBook] Key : F1 Action : Display:Bank Group Summary [#Key: IncrementDate] Keys : Plus ;;, PgUp [#Key: DecrementDate] Key : Minus ;;------------------------------------------------------------ DAY BOOK OVER ;;__________________________________________________________________________