please help to get opening billed qty in customiz stock report

Discussion in 'Requests' started by Naitesh, Oct 21, 2019.

    
  1. Naitesh

    Naitesh Member


    hello sir
    please help me to get opening billed qty
    i use this code
    thank you

    [#Menu: Gateway of Tally]
    Add: Item: Stock Billed Qty : Display: MySalesSummaryA

    [Report :MySalesSummaryA]
    Use : DSP Template
    Form :MySalesSummaryA
    Title: "Stock Billed Qty Summary"
    Variable:SVFromDate,SVToDate
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate

    [Form :MySalesSummaryA]
    Part : MyReportTitleA,My SalesSummaryTL0A,My SalesSummaryTLA,My SalesSummaryA
    Button : Print Button,Export Button,Change Period
    Bottom Part : MySalesSummaryBTMA
    Background : @@SV_UNYELLOW

    [Style:nFSA]
    Height:20
    Bold: Yes

    [Part : MyReportTitleA]
    Line :MyReportTitleA
    [Line :MyReportTitleA]
    Field : Simple Field
    Local : Field : Simple Field : Full Width:Yes
    Local : Field : Simple Field : Set As :"ALL PRODUCT LIST" + " " + $$String:##SVFromDate + " TO " + $$String:##SVToDate
    Local : Field : Simple Field : Style : nFSA
    Local : Field : Simple Field : Color: Red
    Local : Field : Simple Field : Align: Left
    Local : Field : Simple Field : Border:BorBottomUL

    [Part : MySalesSummaryTL0A]
    Use : MySalesSummaryA
    Delete : Repeat
    Delete : Scroll
    Local : Field : Default : Type : string
    Local :Field : Default : Style : Small

    Local : Field : MyProductA : Set As : ""
    Local : Field : MyProductA : Width : 25

    Local : Field : MyTotPQA: Set As : "Inward"
    Local : Field : MyTotPAA: Set As : ""

    Local : Field : MyTotSQA: Set As : "Outward"
    Local : Field : MyTotSAA: Set As : ""

    Local : Field : MyTotBAA: Set As : "Closing"
    Local : Field : MyClsValueA : Set As : ""


    [Part : MySalesSummaryTLA]
    Use : MySalesSummaryA
    Delete : Repeat
    Delete : Scroll
    Border : thintop
    Local : Field : Default : Type : string

    Local : Field : MyProductA : Set As : "Product"
    Local : Field : MyProductA : Width : 25

    Local : Field : MyTotOpPPcsA: Set As : "Op.BilledQty"

    Local : Field : MyTotPQA: Set As : "Billed Qty"
    Local : Field : MyTotPAA: Set As : "Value"

    Local : Field : MyTotSQA: Set As : "Billed Qty"
    Local : Field : MyTotSAA: Set As : "Value"

    Local : Field : MyTotBAA: Set As : "Cl.Billed Qty"
    Local : Field : MyClsValueA : Set As : "Cl.Value"

    Local :Field : Default : Style : Small

    [Part :MySalesSummaryA]
    Line : MySalesSummaryA
    Repeat : MySalesSummaryA :MySalesItemsA
    Scroll : Vertical
    Total : MyTotPQA,MyTotPAA,MyTotSQA,MyTotSAA,MyTotBAA,MyClsValueA
    CommonBorder: Yes
    [Line :MySalesSummaryA]
    Field : MyProductA
    Right Field : MyTotOpPPcsA,MyTotPQA,MyTotPAA,MyTotSQA,MyTotSAA,MyTotBAA,MyClsValueA
    Border : Thin bottom
    [Field : MyProductA]
    Set As : $Stockitem
    Style : Small
    Width:25

    [Field : MyTotOpPPcsA]
    Use : Number Field
    Set As : "0";$TotOpPQ-$TotOpSQ
    Style : Small
    Align:Center
    Border:ThinLeft
    Width:10

    [Field : MyTotPQA]
    Use : Number Field
    Set As : $TotPBillQ
    Style : Small
    Align:Right
    Width:10
    Border:ThinLeft

    [Field : MyTotPAA]
    Use : Number Field
    Set As : $TotPA
    Style : Small
    Align:Right
    Width:15

    [Field : MyTotSQA]
    Use : Number Field
    Set as : $TotSBillQ
    Style : Small
    Align:Right
    Width:10
    Border:ThinLeft

    [Field : MyTotSAA]
    Use : Amount Field
    Set As :$TotSA
    Style : Small
    Align:Right
    Width:15

    [Field : MyTotBAA]
    Use : Number Field
    Set As :$TotPBillQ - $TotSBillQ
    Style : Small
    Align:Right
    Width:15
    Border:ThinLeft

    [Field : MyClsValueA]
    Use : Amount Field
    Set As : $$AsAmount:($$Number:$TotPBillQ-$$Number:$TotSBillQ) *( $$Number:$TotPA /$$Number:$TotPBillQ)
    Style : Small
    Align:Right
    Width:15


    [Part:MySalesSummaryBTMA]
    Line : MySalesSummaryBTMTOTALA

    [Line:MySalesSummaryBTMTOTALA]
    Border : Totals
    Use : MySalesSummaryA
    Local : Field : Default : Type : String
    Local : Field : Default : Align : Right
    Local : Field : Default : Style : SMALL
    Local : Field : MyProductA : Set as : "Total :"
    Local : Field : MyProductA : Align : Left

    [Collection : MySalesSummaryCollectionA]
    Type : Voucher
    Belongs to : yes
    Fetch : Date,StockItemName,BilledQty,Amount
    Filter : FilterVch

    [Collection : MySalesItemsA]
    Source Collection : MySalesSummaryCollectionA
    Walk : All Inventory Entries
    By : Stockitem : $StockitemName

    Aggr Compute : TotPBillQ : Sum :If $$IsPurchase:$VoucherTypeName Then $BilledQty Else 0
    Aggr Compute : TotPA : Sum :If $$IsPurchase:$VoucherTypeName Then $Amount Else 0

    Aggr Compute : TotSBillQ : Sum :If $$IsSales:$VoucherTypeName Then $BilledQty Else 0
    Aggr Compute : TotSA : Sum :If $$IsSales:$VoucherTypeName Then $Amount Else 0

    Sort : Default : $Stockitem

    [System: Formula]
    FilterVch : $$IsSales:$VoucherTypeName or $$IsPurchase:$VoucherTypeName
     

    Attached Files:



  2. Murali.R

    Murali.R Member


    $OpeningBalance:stockitem:$StockItemName

    [Field : MyTotOpPPcsA]
    Use : Number Field
    Set As :$OpeningBalance:stockitem:$StockItemName;$TotOpPQ-$TotOpSQ
    Style : Small
    Align:Center
    Border:ThinLeft
    Width:10
     


  3. udaya

    udaya Active Member


    Dear All Support Experts...

    I am Using simple stock list as shown... i need 2 aps in one page.... can any one assist me to achive?
    upload_2022-1-16_12-37-34.png
    But I want like this
    upload_2022-1-16_12-38-54.png
     


  4. Abisha

    Abisha New Member


    Hi, I'm having doubt in fetching inventory details. My below code result will fetch the whole inventory details under individual bills, but i need to get only the inventory details of particular Voucher Number.
    How to apply filter in the "GetInvColl" collection?

    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>Export</TALLYREQUEST>
    <TYPE>Data</TYPE>
    <ID>DaybookGR</ID>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <EXPLODEFLAG>Yes</EXPLODEFLAG>
    <CURRENTCOMPANY>${company}</CURRENTCOMPANY>
    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
    <SVFROMDATE>${fromDate}</SVFROMDATE>
    <SVTODATE>${toDate}</SVTODATE>
    </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>

    <REPORT NAME="DaybookGR">
    <FORMS>DaybookGR</FORMS>
    <TITLE>DaybookGR </TITLE>
    </REPORT>

    <FORM NAME="DaybookGR">
    <TOPPARTS>DaybookGR</TOPPARTS>
    <XMLTAG>"TallyGraphs"</XMLTAG>
    </FORM>

    <PART NAME="DaybookGR">
    <TOPLINES>Daybook Line Title, Daybook Details </TOPLINES>
    <REPEAT>Daybook Details : GetLedgerCollAmt</REPEAT>
    <SCROLLED>Vertical</SCROLLED>
    <COMMONBORDERS>Yes</COMMONBORDERS>
    </PART>

    <LINE NAME="Daybook Line Title">
    <USE>Daybook Details</USE>
    <LOCAL>Field : Default : Type : String </LOCAL>
    <LOCAL>Field : Field Amount : Set as: "Amount"</LOCAL>
    </LINE>

    <LINE NAME="Daybook Details">
    <LEFTFIELDS>PartyLedgerName</LEFTFIELDS>
    <RIGHTFIELDS>vchType,GrossRevenue,GrossProfit,VoucherNumber,Amount,costcentre,Salesman,Date,Vchcost,IsDeemedPositive,Narration</RIGHTFIELDS>
    <XMLTAG>Voucher</XMLTAG>
    <EXPLODEFLAG>Yes</EXPLODEFLAG>
    <EXPLODE>LedgerExplodePart</EXPLODE>
    </LINE>

    <FIELD NAME="PartyLedgerName">
    <USE>Name Field</USE>
    <SET>$LedgerName</SET>
    </FIELD>

    <FIELD NAME="Date">
    <USE>Name Field</USE>
    <SET>$Date</SET>
    </FIELD>

    <FIELD NAME="VoucherNumber">
    <USE>Name Field</USE>
    <SET>$VoucherNumber</SET>
    </FIELD>

    <FIELD NAME="Amount">
    <USE>Amount Field</USE>
    <SET>$Amt</SET>
    </FIELD>

    <FIELD NAME="GrossRevenue">
    <USE>Amount Field</USE>
    <SET>If ($$IsSalesorder:$VoucherTypeName)OR($$IsSales:$VoucherTypeName)Then $GrossRevenue else 0</SET>
    </FIELD>

    <FIELD NAME="GrossProfit">
    <USE>Amount Field</USE>
    <SET>If ($$IsSalesorder:$VoucherTypeName)OR($$IsSales:$VoucherTypeName)Then $GrossProfit else 0</SET>
    </FIELD>

    <FIELD NAME="costcentre">
    <USE>Name Field</USE>
    <SET>$CostcentreName</SET>
    </FIELD>

    <FIELD NAME="Salesman">
    <USE>Name Field</USE>
    <SET>$SalesmanName</SET>
    </FIELD>

    <FIELD NAME="Vchcost">
    <USE>Amount Field</USE>
    <SET>If ($$IsSalesorder:$VoucherTypeName)OR($$IsSales:$VoucherTypeName)Then $Cost else 0</SET>
    </FIELD>

    <FIELD NAME="IsDeemedPositive">
    <USE>Name Field</USE>
    <SET>$ISDEEMEDPOSITIVE</SET>
    </FIELD>

    <FIELD NAME="Narration">
    <USE>Name Field</USE>
    <SET>$Narration</SET>
    </FIELD>

    <PART NAME="LedgerExplodePart">
    <TOPLINES>Daybook Details1</TOPLINES>
    <REPEAT>Daybook Details1 : GetInvColl</REPEAT>
    <SCROLLED>Vertical</SCROLLED>

    </PART>
    <LINE NAME="Daybook Details1">
    <LEFTFIELDS>Field Name</LEFTFIELDS>
    <XMLTAG>inventory</XMLTAG>
    </LINE>

    <FIELD NAME="Field Name">
    <USE>Name Field</USE>
    <SET>$Name</SET>
    </FIELD>

    <COLLECTION NAME="AllVouchers" ISMODIFY="No">
    <TYPE>Ledger</TYPE>
    <BELONGSTO>YES</BELONGSTO>
    </COLLECTION>

    <COLLECTION NAME="GetLedgerCollAmt" ISMODIFY="No">
    <TYPE>Voucher</TYPE>
    <compute>Date : $Date </compute>
    <compute>LedgerName :$LedgerName</compute>
    <compute>GrossRevenue :$GrossRevenue</compute>
    <compute>CostcentreName : $CostCentreName </compute>
    <compute>SalesmanName :$VchSalesmanName</compute>
    <compute>GrossProfit :$GrossProfit</compute>
    <Compute>Cost:$GrossCost </Compute>
    <compute>Narration :$Narration</compute>
    <compute>Amt : $Amount </compute>
    <FILTER>IsOptionalFilter</FILTER>
    <FETCH>VoucherNumber,LedgerName,Date,Amount,VoucherTypeName,GrossRevenue,IsDeemedPositive,NARRATION</FETCH>
    </COLLECTION>

    <COLLECTION NAME="GetInvColl" ISMODIFY="No">
    <TYPE>StockItem</TYPE>
    <FETCH>*.*</FETCH>
    </COLLECTION>

    <SYSTEM TYPE="Formulae" NAME="IsOptionalFilter">NOT $IsOptional</SYSTEM>

    </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>
     


Share This Page