Columnar Purchase Register and Sales Register with HSN code, Sales/Purchase Ledger and GST rate

Discussion in 'Free Source Codes' started by garima, Dec 27, 2018.

    
  1. praveen_pan

    praveen_pan New Member


    [Field: STKGodown]
    Use : Name Field
    Set as : "";$$CollectionField:$GodownName:(1):StockGodownColl
    Width : 15
     


  2. pravin bhau

    pravin bhau New Member


    GST Rate , HSN Not getting in Report....Please Help me ?????


    upload_2020-8-5_8-15-7.png

    ;[#Part: SalesDataExport]
    ;
    ; Line : SalesDataExportTitle, SalesDataExport
    ; Repeat : SalesDataExport : SalesDataSrcColl
    ; Scroll : Both

    [#Menu : Gateway of Tally]

    Add : Item : "PartyWise ItemWise Sales Register" : Display : PartyItemSaleReg


    [Report : PartyItemSaleReg]
    Use : DSP Template
    Form : PartyItemSaleReg

    [Form : PartyItemSaleReg]
    Use : DSP Template
    Use : Day Book
    Part : PartyItemSaleReg, PartyItemSaleRegBody
    Height : 100 % screen
    Width : 100 % screen

    [Part : PartyItemSaleReg]
    Line : PartyItemSaleRegTit

    [Line : PartyItemSaleRegTit]
    Field : PartyItemSaleRegTit

    [Field : PartyItemSaleRegTit]
    Use : Name Field
    Set as : "PartyWise ItemWise Sales Register"
    Full Width : Yes
    Align : Center
    Style : Large Bold
    Color : Red

    [Part : PartyItemSaleRegBody]
    Line : PartyItemSaleRegBodyTit, PartyItemSaleRegBody
    Repeat : PartyItemSaleRegBody :partyItemSaleRegBodyColl; SalesDataSrcColl;
    Scrolled : Vertical
    Vertical : Yes
    Float : No
    Common Border : Yes

    [Line : PartyItemSaleRegBodyTit]

    Use : PartyItemSaleRegBody
    Local : Field : Default : Type : String
    Local : Field : Default : Color : White
    Local : Field : Default : Background : @@SV_VchType

    Local : Field : SAEVoucherNumber : Set as : "Vch no."
    Local : Field : SAEDate : Set as : "Vch Date"
    Local : Field : SAEVoucherType : Set as : "Vch Type"
    Local : Field : SAEPartyLedger : Set as : "Party"
    Local : Field : SAEStockItemName : Set as : "StockItem"
    Local : Field : SAEBilledQty : Set as : "Qty"
    Local : Field : SAERate : Set as : "Rate"
    Local : Field : SAEUnits : Set as : "Unit"
    Local : Field : SAEAmount : Set as : "Amount"
    Local : Field : SAGSTINNo : Set as : "GSTIN"
    Local : Field : SAGSTHSNCode : Set as : "HSN"
    Local : Field : SAGSTTaxRate : Set as : "GST %"
    Border : Thin Top Bottom

    [Line : PartyItemSaleRegBody]

    Field : SAEVoucherNumber, SAEDate, SAEVoucherType,SAEPartyLedger,
    field : SAEStockItemName,
    Right Field : SAEBilledQty,SAERate, SAEUnits, +
    SAEAmount, SAGSTINNo, SAGSTHSNCode, SAGSTTaxRate

    Local : Field : Default : Border : Thin Right
    Local : Field : SAEStockItemName : Full Width : Yes


    ; Option : SalesDataExport_GST : ##SACGSTDetails

    [Field: SAGSTTaxRate22]

    Use : Name Field
    Set as : $GSTLedItemIGSTRateEx;@@Setgstrate;$SAGSTClsfnIGSTRate

    [Field: SAGSTHSNCode22]

    Use : Name Field
    Set as : $SAGSTIsTransLed

    [Collection : PartyItemSaleRegBodyColl]

    Source Collection : PartyItemSaleRegBodyCollSrc

    Fetch : *.*


    ;[#Collection : SalesDataSrcCollSrc]

    [Collection: PartyItemSaleRegBodyCollSrc]

    Source Collection : SRC Filtered Vouchers of CompanyPI

    Fetch : Date

    WALK : AllInventoryEntries, BatchAllocations




    By : MasterID : $...MasterID
    By : StockItemName : $..StockItemName
    By : GodownName : $GodownName
    By : BatchName : $BatchName

    Compute : StockItemAlias : $OnlyAlias:StockItem:$..StockItemName
    Compute : StockPartNo : $PartNo:StockItem:$..StockItemName
    Compute : StockItemGrp : $Parent:StockItem:$..StockItemName
    Compute : CompanyName : ##SVCurrentCompany
    Compute : SalesLedger : $..AccountingAllocations[1].LedgerName
    Compute : TaxClass : $..AccountingAllocations[1].TaxClassificationName
    Compute : Rate : $Rate
    Compute : Discount : $Discount
    Compute : StandardCost : @@StdPurCost
    Compute : StandardRate : @@StdSalesPrice
    Compute : StockItemCat : $Category:StockItem:$..StockItemName
    Compute : PartyLedger : $...PartyLedgerName
    Compute : PartyLedgerAlias : $OnlyAlias:Ledger:$...partyLedgerName
    Compute : PartyState : $$GetPartyState:$...PartyLedgerName
    Compute : PartyNarration : $Narration:Ledger:$...PartyLedgerName
    Compute : PartyGroup : $Parent:Ledger:$...PartyLedgerName
    Compute : PartyAddress : $$FullList:partyAddress:$Address
    Compute : PartyLedgerContact: $LedgerContact:Ledger:$...PartyLedgerName
    Compute : PartyLedgerPhone : $LedgerPhone:Ledger:$...PartyLedgerName
    Compute : PartyLedgerMobile : $LedgerMobile:Ledger:$...PartyLedgerName
    Compute : PartyLedgerFax : $LedgerFax:Ledger:$...PartyLedgerName
    Compute : PartyEMail : $EMail:Ledger:$...PartyLedgerName
    Compute : PartyPinCode : $PinCode:Ledger:$...PartyLedgerName
    Compute : VoucherNumber : $...VoucherNumber
    Compute : Reference : $...Reference
    Compute : Date : $...Date
    Compute : VoucherType : $...VoucherTypeName
    Compute : Narration : $...Narration
    Compute : ItemNarration : $Narration:StockItem:$..StockItemName
    Compute : ItemTCSNOG : $TCSCategory:StockItem:$..StockItemName
    Compute : ItemTariff : $BasicTariffType:StockItem:$..StockItemName
    Compute : ItemCommodity : $VATCommodity:StockItem:$..StockItemName
    Compute : ItemVATRate : $RateOfVAT:StockItem:$..StockItemName
    Compute : ItemMRP : If $$IsEmpty:mad:@DbkStockItemMRPRate Then $RateofMRP:StockItem:$..StockItemName Else @@DbkStockItemMRPRate
    Compute : ItemDescription : if $$IsEmpty:mad:@FullDesc then $Description:StockItem:$..StockItemName else @@FullDesc
    Compute : BuyerTINNo : $...BasicBuyersSalesTaxNo
    Compute : BuyerCSTNo : $...BuyersCSTNumber
    Compute : BasicBuyerName : $...BasicBuyerName
    Compute : PartyName : $...PartyName

    ;; Total Inventory Amount in a Voucher
    Compute : InvAmount : $...TotInvAmt

    ;; Additional Ledger Amount is GrossRevenue - TotalInventoryAmount (Gross Revenu method defined in Voucher obj)
    Compute : AddlLedAmt : $$AmountSubtract:($$Abs:$...GrossRevenue):($$Abs:$...TotInvAmt)

    ;; Item Closing Rate calculated on the Voucher Date
    Compute : PurchaseRate : $$ToValue:$Date:$ClosingRate:StockItem:$..StockItemName

    Aggr Compute : ActualQty : Sum : $ActualQty
    Aggr Compute : BilledQty : Sum : $BilledQty
    Aggr Compute : Amount : Sum : $Amount
    Aggr Compute : DiscountValue : Sum : ($BilledQty * $Rate) * $Discount / 100

    Compute : SAPartyGSTIN : $...PartyGSTIN
    Compute : SAGSTClsfnIGSTRate : $..GSTClsfnIGSTRateEx
    Compute : SAGSTItemHSNCode : $..GSTItemHSNCodeEx
    Compute : SAGSTIsTransLed : $..GSTIsTransLedEx
    Compute : eCommerceOperatorGSTIN : If $IseCommOperator:Ledger:$...BasicBuyerName Then $$GetPartyGSTIN:$...LedgerName Else ""

    ;[System : Formulae]

    ;Setgstrate : $GSTIGSTRate:StockItem:$StockItemName


    [Collection:SRC Filtered Vouchers of CompanyPI]

    Type : Vouchers : VoucherType
    Child of : $$VchTypeSales
    Fetch : Name,
    Belongs To : Yes
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $(Stockitem,$stockitem).GSTIGSTRate for RATE
    $GSTHSNCode:StockItem:$StockItemName for CODE
     


  4. kaushal4487

    kaushal4487 New Member


    Dear Sir

    I am new. how to make TDL with your code.
    can you guide me or provide me TDL file for my work
     


  5. svn

    svn Member


    SIR,
    CAN I ADD GST RATE OF TAX % IN HSN/SAC SUMMARY-12 ?
     


  6. love

    love Member


    if we want full details of inventory i.e , 10 inventory lines in a voucher are shown in 10 lines in report irrespective of same item /hsn, what should be done
     


  7. kaushal4487

    kaushal4487 New Member


    Hi sir
    how to add batch details in this report.
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You need to add an EXPLODE for Inventory details.
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As per above code, if all SALES are single item invoice, then you can add in a column. But if there are multiples, then you need to add EXPLODE for StockItems and add your batch fields in that.
     


  10. love

    love Member


    thnx sir i exploded it ok , now i have a scenario that in purchase register , i have added a select button for selection of purchases ( working ok ) , i now want to explode the "selected ledgers only" into a new report ( let's say party wise item wise report as posted by @parvin bhau above) for that i have to fetch the selected ledger collection to the new report , plz guide me how to do it , as i am not conversant with data fetch/explode from one custom report to another
     


  11. Himanshu-2002

    Himanshu-2002 Active Member


    Create a Key
    Example:
    [Key: MyKey]
    Key:Enter
    Action : Call: MyFunc

    Create a collection which will hold current line values
    Example:
    [Collection:CurrentLineColl]
    Data Source: Report: Current Line
    Fetch: PartyLedgerName

    Now, When User click Enter...Your Can Call a function which will open new report

    Example:
    [Function:MyFunc]
    000: Display: Day Book

    You have to add a filter in collection of your new report
    Example:
    [Collection:MyNewRepColl]
    Type: StockItem
    Fetch:*.*
    Filter: MyNewRepFil

    Define The Filter
    [System: Formulas]
    MyNewRepFil:$Parent =MyVariable

    Now, Define this variable

    [Variable: MyVariable]
    Type: String

    [System: Variable]
    MyVariable:""

    Now, Change the value of this variable when your key is triggered

    Example:
    [Function:MyFunc]
    000: Set: MyVariable:$Parent
    010: Display: MyNewReport
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Small Correction ---- It should be ------- Data Source : Report : Selected Lines
     


  13. love

    love Member


    ;creation of key

    [Button : REMOVE UNSELECTED]
    Title : "SHOW SELECTED"
    Key : Alt + 5
    Action :Call: selected12 Voucher Object
    Mode : Display
    Scope : UnSelected Lines

    ;collection to hold values


    Collection:Selected Master]

    Data Source : Report : Selected lines
    Fetch: partyledgername

    ;function to open new report with variable value

    [Function: selected12 Voucher Object]

    001 : If : Not $$IsEmpty:($$NumItems:SelectedMaster)
    005 : Start Progress : ($$NumItems:SelectedMaster) :"COMPANY VOUCHERS IS DELETING": ##SVCURRENTCOMPANY : "**************DELETE PROCESSING**************"
    010 : Start Batch Post: 500
    020 : Walk Collection : Selected Master
    030 : Show Progress : $$LoopIndex:$$Sprintf:"PURCHASE SELECTING : %s - - %s - - %s":$Date:$VoucherNumber:$VoucherTypeName
    040 : Set Target
    050 : Remove Line
    060: Walk Collection:Selected Master
    070 : set:myselectedlines:$parent
    080:Display:pQREPORT
    090:End Walk
    0100:End Walk
    0110 : End Batch Post
    0120 : End Progress
    200 : End If


    [System: Formulas]
    myselectedvariable:$parent:myselcetedlines


    [variable: myselectedlines]
    Type: String

    [System: variable]
    myselectedlines: ""


    ;collections of the new report

    Collection: PQRSalesManVouchersColl]
    Type:Vouchers:VoucherType
    Child Of:$$VchTypePurchase

    Belongs To:Yes
    Fetch:myvchorderbyname,myvchorderbyname1,*.*
    Filter: myselectedvariable


    [Collection:Sales AllVoucher]
    Source Collection:pQRSalesManVouchersColl
    Walk:Inventory Entries

    Compute : PQRPartySalesMan :$myvchorderbyname
    Compute : PQRPartyVchNo :$REFERENCE
    Compute : PQRPartyDate :$Date
    Compute : PQRPartyName :$PartyLedgerName
    Compute : PQRItemName :$StockItemName
    Compute : PQRHSNCode :$(Stockitem,$stockitem).GstDetails[Last].hsncode
    Compute : PQRGSTRate :$(Stockitem,$stockitem).GSTIGSTRate
    Compute : PQRQty :$BilledQuantity
    Compute : PQRNewdisc :$myVCHorderbyName1
    Compute : PQRMycomm :$myVCHorderbyName1
    Compute : PQRUnit :$Rate
    Compute : PQRIGRate :(100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100
    Compute : PQRRate :$Rate
    Compute : PQRAmount :$Amount
    Compute : PQRIGAmount :$BilledQuantity * (100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100


    plz guide what i am missing , as values are still not fetched
     


  14. Himanshu-2002

    Himanshu-2002 Active Member


    First Check Lines are selected or not and If selected then log the values which you want to fetch

    Example:
    [Collection:MySelLineColl]
    Data Source: Report: Selected Lines
    Fetch: PartyLedgerName

    Create a key to trigger function
    [Key: MyKey]
    Key: F4
    Action: Call: MyFunc

    Log Values Using Function

    [Function: MyFunc]
    00: Log: $PartyLedgerName
     


  15. love

    love Member


    selection part is working correctly, now when i added log into function the same is logging in calculator pane and that too only first line of inventory part , still no value is fetched in new report
     


  16. Himanshu-2002

    Himanshu-2002 Active Member


    Forget About Multiple Lines Currently and Focus on single line data

    You want to filter the collection using current line value ? if yes then

    Then try to Learn from my previous posts

    Solution is already given
     


  17. garima

    garima Well-Known Member



    Good Work..
     


  18. Sagar Kumar

    Sagar Kumar New Member


    Dear Sir,
    What is the Code for open voucher in this Report using Enter key
     


  19. saranfca

    saranfca New Member


    Extremely Useful TDL. How to get the GST Registration Type of Supplier/Customer in columnar purchase/sales register.
    I have tried but not able to fetch ot as there was no source collection.
    Please help how to get this in a column.
    Thanks
     


  20. Ashu001

    Ashu001 New Member


    Hey there,
    I want to add cost centre in sales & purchase columnar report. Kindly help to modify above tdl.
     


  21. Ashu001

    Ashu001 New Member


    I have created tdl for Cost Centre for columnar report but unable to fetch the data of Cost centre, kindly guide me in which collection I have to make changes and fetch collection. Support needed !!
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Since CC is inside a sub-collection .... you will need to make a function to walk through all the relevant sub-collections and retrieve your values.
     


Share This Page