Item Wise Price list with Godown in explode level (combine Godown closingBlaance Issue))

Discussion in 'Free Source Codes' started by suyash, Aug 9, 2020.

    
  1. suyash

    suyash New Member


    Dear Experts and All ,

    some issue in filter the Godown wise ClosingBalance (Combine ClosingBalance Godown Wise)

    please refer the code and help me
    [​IMG]



    [Collection: MISM_PLHistorycoll]
    Title : $$LocaleString:"Price List Name"
    Type : Price Level : Company
    Childof : ##SVCurrentCompany
    Trigger : PLHistoryTri
    Variable: PLHistoryVar
    Report : MISM_PLHistory


    [#Menu: GateWay of Tally]
    Add : Item : Price Drop Report : Display : MISM_PLHistory


    [Report : PLHistoryTri]
    Form : PLHistoryTri
    Title : $$LocaleString:"Price List Name"

    [Form: PLHistoryTri]
    No Confirm : Yes
    Space Top : 0.5
    Space Left : 1
    Space Right : 1

    Full Width : No
    Full Height : No

    Vertical Align : Centre

    Parts : PLHistoryTri

    Local : Line : Default : Space Bottom : 0.5

    [Part:pLHistoryTri]
    Line : PLHistoryTriT, PLHistoryTri1

    [Line : PLHistoryTriT]
    Field : PLHistoryTriT
    Height : 0.5 cms

    [Field : PLHistoryTriT]
    Use : NAme Field
    Set as : "Price List Name"
    Set Always : Yes
    Style : Small Bold
    Full Width : Yes
    Align : Center
    Skip : Yes

    [Line : PLHistoryTri1]
    Field : PLHistoryTri1

    [Field : PLHistoryTri1]
    Use : Name Field
    Table : PriceListName
    Show Table : Always
    modifies : PLHistoryVar

    [Variable: PLHistoryVar]
    Type : String



    [Collection : PriceListName]
    Title : $$LocaleString:"List of Price Levels"
    Type : Price Level : Company
    Childof : ##SVCurrentCompany
    Format : $PriceLevel,40
    Option : Refresh Price Levels Coll : ##PriceLevelsIsRefresh
    Sort : @@Default : $PriceLevel

    [Report : MISM_PLHistory]
    Use : DSP Template
    Title : @@MISM_PLHistory
    Family : @@MISM_PLHistory
    Variable : LedgerName,PriceLevelVar
    Variable : vMI : Logical
    Variable : vItemwise : Logical: Yes
    Set : vMI : Yes
    Set : LedgerName : $$SysName:AllItems
    Set : SVFromDate : $$CurrentDate
    Set : SVToDate : $$CurrentDate
    PrintSet : Report Title : @@MISM_PLHistory
    Variable : kd12
    Set : kd12 : " All Items"
    Set : PriceLevelVar : " All Items"

    [Button : MISM_B1]
    Title : If ##vItemwise Then "Price Level wise" Else "Item wise"
    Key : Alt+1
    Action : Set: vItemwise : Not ##vItemwise

    [Form : MISM_PLHistory]
    Use : DSP Template
    Parts : MISM_PLHTitleA,MISM_PLHTitle,MISM_PLHInfo
    Delete : Bottom Button
    Delete : Button : F2ChangePeriod, ChangeCompany
    ; Delete : Keys : ChangePeriod

    Button : item, PriceLevel, ExplodeFlag;,ChangePeriod ;MISM_B1,

    Background : White
    Space Top : if $$InPrintMode then ##SVSpaceTop else 0.05 inches
    Space Bottom : if $$InPrintMode then 0.5 else 0 inches
    Space Left : if $$InPrintMode AND $$InPixelMode then 0.25 else 0 inches
    Space Right : if $$InPrintMode AND $$InPixelMode then 0.25 else 0 inches
    Delete : Page Break
    Add : Page Break : MISM_PLH CLPB,MISM_PLH OPPB

    [Part: MISM_PLHTitleA]
    Line: MISM_PLHTitleA_Ln1

    [Line: MISM_PLHTitleA_Ln1]
    Field : Name Field

    Local : Field : Name Field : Set as : $$LocaleString:"Price List Report"
    Local : Field : Name Field : Full Width: Yes
    Local : Field : Name Field : Style : Verdana Bold12
    Local : Field : Name Field : Align : Centre
    Local : Field : Name Field : Skip : Yes
    Space Bottom : 0.50

    [Style : Verdana Bold12]
    Font : if $$SysInfo:IsWindows then "Verdana" else "Helvetica"
    Bold : Yes
    Height : 12

    [Part: MISM_PLH CLPB]
    Line : DSP ContLine
    Border : Full Thin Top

    [Part: MISM_PLH OPPB]
    Parts : DSP OpCompanyName, DSP OpReportTitle,MISM_PLHTitle
    Vertical: Yes

    [Part: MISM_PLHTitle]
    Line : MISM_PLHTitle
    Border : Column Titles
    Background : @@SV_Field9

    [Line: MISM_PLHTitle]
    Use : MISM_PLHInfo

    Local : Field : Default : Type : String
    Local : Field : Default : Style : Verdana Bold
    Local : Field : Default : Delete : Storage
    Local : Field : Default : Delete : Inactive
    Local : Field : Default : Skip : Yes

    Local : Field : MISM_PLH_Date : Set as : "Sr. No."
    Local : Field : MISM_PLH_Item : Set as : "Particulars"
    Local : Field : M_PLH_Closing : Set as : "Closing Balance"
    Local : Field : MISM_PLH_Date1 : Set as : "Appl.Dt.(Last)"
    Local : Field : MISM_PLH_Rate1 : Set as : "Rate(Last)"
    Local : Field : MISM_PLH_Date : Set as : "Appl.Dt.(Current)"
    Local : Field : MISM_PLH_Rate : Set as : "Rate(Current)"
    Local : Field : MISM_PLH_Differ : Set as : "Diifferece"

    Local : Field : RSPL_PL : Set as : If ##vItemwise Then "Price Level" Else "Item Name"


    [Part: MISM_PLHInfo]
    Line : MISM_PLHInfo
    Repeat : MISM_PLHInfo : MISM_PLHInfoColl
    Scroll : Vertical
    Common Border : Yes
    Float : No
    Border : Thin Bottom

    [Line : MISM_PLHInfo]
    Fields : MISM_PLH_Item ,M_PLH_Closing
    Right Field : MISM_PLH_Rep

    Local : Field : Default : Style : Verdana Normal
    Local : Field : MISM_PLH_Item : Style : Verdana Bold

    Explode : PLGodown: ##ExplodeFlag="Yes"



    [Field : MISM_PLH_Item]
    Use : Name Field
    Set as : $Name;If ##vItemwise Then @LocItem Else @LocPL
    LocItem : If $$Line=1 then $Name Else If $$PrevObj:$Name=$Name Then "" Else $Name
    LocPL : If $$Line=1 then $PriceLevel Else If $$PrevObj:$PriceLevel=$PriceLevel Then "" Else $PriceLevel
    Set Always : Yes
    Border : Thin Left
    Full Width : Yes

    [Field : M_PLH_Closing]
    Use : Name Field
    Set as : @@Clbalace
    Set Always : Yes
    Border : Thin left Right
    Width : 12

    [Field : MISM_PLH_Rep]
    Fields : RSPL_PL, MISM_PLH_Date1,MISM_PLH_Rate1,MISM_PLH_Date,MISM_PLH_Rate,MISM_PLH_Differ

    [Field : RSPL_PL]
    Use : Name Field
    Set as : $PriceLevel ;If ##vItemwise Then $PriceLevel Else $Name
    Set Always : Yes
    Width : 15
    Border : Thin Right

    [Field : MISM_PLH_Date1]
    Use : Short Date Field
    Set as : $$GetPricePrevDate:#MISM_PLH_Item:#RSPL_PL:#MISM_PLH_Date
    Width : 18
    Border : Thin Left Right

    [Field : MISM_PLH_Rate1]
    Use : Rate Field
    Set as : $$GetPriceFromLevel:#MISM_PLH_Item:#RSPL_PL:($$Date:#MISM_PLH_Date1):"100"
    Width : 18
    Align : Right
    Border : Thin Right

    [Field : MISM_PLH_Date]
    Use : Short Date Field
    Set as : $$GetPricePrevDate:#MISM_PLH_Item:#RSPL_PL:##SVTodate
    Width : 18
    Border : Thin Left Right

    [Field : MISM_PLH_Rate]
    Use : Rate Field
    Set as : $$GetPriceFromLevel:#MISM_PLH_Item:#RSPL_PL:($$Date:#MISM_PLH_Date):"100"
    Width : 18
    Align : Right
    Border : Thin Right

    [Field : MISM_PLH_Differ]
    Use : Rate Field
    Set as : #MISM_PLH_Rate1-#MISM_PLH_Rate;$$GetPriceFromLevel:#MISM_PLH_Item:#RSPL_PL:($$Date:#MISM_PLH_Date):"100"
    Width : 18
    Align : Right
    Border : Thin Right
    Set Always : Yes


    [Part: PLGodown]
    Line : PLGodown ;,PLGodownTotal
    Repeat : PLGodown : SCCGodown;PLGodownCollD
    Total : M_PLH_Closing1


    [Line: PLGodown]
    Fields : MISM_PLH_Item ,M_PLH_Closing1
    Right Field : RSPL_PL, MISM_PLH_Date1,MISM_PLH_Rate1,MISM_PLH_Date,MISM_PLH_Rate,MISM_PLH_Differ
    Local : Field : MISM_PLH_Item : Style : Normal

    Local : Field : MISM_PLH_Date : Set as : ""
    Local : Field : RSPL_PL : Set as : ""
    Local : Field : MISM_PLH_Item : Set as : $GodownNameS;if $GodownNameS="Main Location" then $GodownNameS else ""
    Local : Field : MISM_PLH_Item : Align : Right
    ;Local : Field : M_PLH_Closing1 : Set as : if $GodownNameS="Main Location" then $ClosingBalance else "" ;
    Local : Field : MISM_PLH_Date1 : Set as : ""
    Local : Field : MISM_PLH_Rate1 : Set as : ""
    Local : Field : MISM_PLH_Date : Set as : ""
    Local : Field : MISM_PLH_Rate : Set as : ""
    Local : Field : MISM_PLH_Differ : Set as : ""


    [Line: PLGodownTotal]
    Fields : MISM_PLH_Item ,M_PLH_Closing1
    Right Field : RSPL_PL, MISM_PLH_Date1,MISM_PLH_Rate1,MISM_PLH_Date,MISM_PLH_Rate,MISM_PLH_Differ

    Local : Field : MISM_PLH_Item : Style : Normal
    Local : Field : MISM_PLH_Date : Set as : ""
    Local : Field : RSPL_PL : Set as : ""
    Local : Field : MISM_PLH_Item : Set as : "Main Location"
    Local : Field : MISM_PLH_Item : Align : Right
    Local : Field : M_PLH_Closing1 : Set as : $$Total:M_PLH_Closing1
    Local : Field : MISM_PLH_Date1 : Set as : ""
    Local : Field : MISM_PLH_Rate1 : Set as : ""
    Local : Field : MISM_PLH_Date : Set as : ""
    Local : Field : MISM_PLH_Rate : Set as : ""
    Local : Field : MISM_PLH_Differ : Set as : ""

    [Field : M_PLH_Closing1]
    Use : Number Field
    Set as : $ClosingBalance
    Set Always : Yes
    Border : Thin left Right
    Width : 12

    [Collection: SCGodownSrc]
    Type : Batch ;: Godown
    Fetch : Name, Parent, ExpiryPeriod, ClosingBalance, GodownName, MfdOn, ClosingAsOnDate
    Child of : #MISM_PLH_Item

    [Collection: SCCGodown]
    Use : SCGodownSrc
    By : GodownName : $GodownName
    By : StockItemName : $StockItemName
    Compute : GodownNameS : $GodownName
    Filter : SCnozero ;,IsGodownNameS
    Sort : @@Default : $GodownName


    [System: Formula]
    SCnozero : $ClosingBalance!=0
    IsGodownNameS : $GodownName="Main Location"

    [Collection: PLGodownCollD]
    Type : Godown
    Child of : #DSStkGroupName

    Fetch : Name, Closing Rate, Opening Balance, Opening Value, Opening Rate,+
    Inward Quantity, Outward Quantity, Inward Value, Outward Value,ClosingBalance,ClosingQuantity,StockItemName

    ;Compute : GodownName : $Name


    ParmVAR : pvsGodownName : String : If $$ExplodeLevel=0 AND $IsStockGroup Then ##DSPGodownName Else +
    If $$IsEmpty:$GodownName Then #DSPGodownName Else $GodownName

    ParmVAR : DSStkGroupName : String : $$FieldVar:MISM_PLH_Item

    ; Compute : StkClBalance : $ClosingBalance ;$$AsSignedQty:$$GodownItemValue:##pvsGodownName:$Name:$ClosingBalance
    ; Filter : Pvsgodown

    [System: Formula]
    Pvsgodown : #StockItemName=#MISM_PLH_Item


    [Collection : MISM_PLHInfoColl_Src]
    Type : Stock Item
    Fetch : MasterID

    [Collection : MISM_PLHInfoColl]
    Source Collection : MISM_PLHInfoColl_Src
    Walk : FullPriceList,PriceLevelList
    By : Name : $().Name
    By : PriceLevel : $..PriceLevel
    Compute : Name : $().Name
    Compute : Date : $Date
    Compute : PriceLevel : $..PriceLevel
    Compute : Rate : $Rate
    Compute : GodownName : $GodownName
    Filter : MISM_Blank
    Sort : @@Default : $Name;;,$PriceLevel
    Fetch : MasterID,ClosingBalance,StkClBalance,GodownName
    Filter : PDSstkfilt,PDSpricefilt

    [System : Formulae]
    MISM_Blank : Not $$IsEmpty:$Rate
    MISM_PLHistory : "Price Level History"

    [System: Formula]
    Clbalace : $$ToValue:$MachineDate:$StkClBalance:StockItem:#MISM_PLH_Item

    [System : Formulae]

    PDSstkfilt : $().Name=##kd12 or $$SysName:AllItems contains ##kd12
    PDSpricefilt : $..PriceLevel=##PriceLevelVar or $$SysName:AllItems contains ##PriceLevelVar ;$().Name=##kd12 or $$SysName:AllItems contains ##kd12
    ;;::::::::::;alter stockitem

    [Button : StkAlterButon]
    Title : $$LocaleString:"Alter Stock"
    Key : Enter
    Action : Call : FunOpenStk
    [Function : FunOpenStk]
    1001 : Walk Collection : SelectedVchID;Daybook Vouchers of Company
    101 : Call : FungetAlterstk:("ID:"+$$LocaleString:$MasterID)
    102 : End Walk
    [Function : FungetAlterstk]
    Parameter : GetMasID : String
    100 : Alter : NewStock
    [Report : NewStock]
    Use : Stockitem
    Object : Stockitem : ##GetMasID
    Form : Stockitem
    ; Local: Field :Default : On :Focus:Yes: Trigger Key:Enter
    ; Local: Field :Default : On :Focus:Yes: Trigger Key:Ctrl + A
    ;


    ;;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;

    [Button: PriceLevel]
    Key : alt + L
    Title : "PriceList-wise"
    Action : Alter : PriceLevel

    [Report: PriceLevel]
    Form : PriceLevel

    [Form: PriceLevel]
    Part: PriceLevel

    [Part: PriceLevel]
    Line:priceLevel

    [Line: PriceLevel]
    Field: PriceLevel

    [Field: PriceLevel]
    Use : Name Field
    ;Key : Create Group
    ; Set as : ##kd1;if ##GroupName = "" then $$SysName:primary else ##GroupName
    Modifies : PriceLevelVar
    Table : PriceListName,All items
    Show Table : Always
    ;CommonTable : No

    [Variable: PriceLevelVar]
    Type: String
    Persistent: yes

    [System: Variable]
    PriceLevelVar: " "
     

    Attached Files:



Share This Page