Free Code : Cost Center Name In Billwise Reports

Discussion in 'Free Source Codes' started by drive, Mar 16, 2019.

    
  1. drive

    drive Active Member


    ;;Free Code For Billwise Report's (Receivable, Payable, Ledger & Group Outstanding)


    [#Line: BILLCol1]
    Add: Option: O00xBillCostT1: Yes

    [!Line: O00xBillCostT1]
    Add : Right Field : F00xBillCost
    Local: Field: F00xBillCost : Set as:"Cost"

    [#Line: BILLCol2]
    Add: Option: O00xBillCostT2: Yes
    [!Line: O00xBillCostT2]
    Add : Right Field : F00xBillCost
    Local: Field: F00xBillCost : Set as:"Center"



    [#Line: BILL Detail]
    Add: Option: O00xBillCost: Yes
    [!Line: O00xBillCost]
    Add :Right Field: F00xBillCost


    [Field: F00xBillCost]
    Use: Name Field
    Width: 10
    Skip: YES
    Align: Center
    Color: Blue
    Set as: if $$IsEmpty:$ObjCostNameI Then $ObjCostNameL Else $ObjCostNameI
    Border: Thin Left
    Style: Normal

    [Function: Func_GetCostCenterName]
    Parameter: pMasterID : String
    Parameter: pIsItemWise : Logical
    Fetch Object: Voucher : ##pMasterID : COSTCENTRENAME;LedgerEntries, Category Allocations
    Variable: vCCName : String : "Empty"
    Return: String

    001 : SET OBJECT : (Voucher , ##pMasterID).
    002 : If: ##pIsItemWise
    010 : WALK COLLECTION : LedgerEntries
    020 : Walk Collection : InventoryEntries
    030 : Walk Collection : AccountingAllocations
    040 : Walk Collection : Category Allocations
    050 : Walk Collection : CostCentreAllocations
    100 : Set: vCCName : $Name
    110 : End Walk ; Cost Centre Allocations
    120 : End Walk ; Category Allocations
    130 : End Walk ; AccountingAllocations
    140 : End Walk ; InventoryEntries
    150 : End Walk ; LedgerEntries
    200 : Else
    210 : WALK COLLECTION : LedgerEntries
    240 : Walk Collection : Category Allocations
    250 : Walk Collection : CostCentreAllocations
    300 : Set: vCCName : $Name
    310 : End Walk ; Cost Centre Allocations
    320 : End Walk ; Category Allocations
    350 : End Walk ; LedgerEntries
    400 : End if
    900 : Return: ##vCCName

    [#Object: Bill]
    ObjMstID : $$CollectionField:$MasterID:First:LedgerEntries
    ObjCostNameL : $$Func_GetCostCenterName:$ObjMSTID:No
    ObjCostNameI : $$Func_GetCostCenterName:$ObjMSTID:YES

    [#Collection: Ledger Bills]
    Fetch: ObjMSTID,ObjCostNameL,ObjCostNameI

    [#Collection: Group LedgerBills]
    Fetch: ObjMSTID,ObjCostNameL,ObjCostNameI

    [#Collection: Company Receivables]
    Fetch: ObjMSTID,ObjCostNameL,ObjCostNameI


    [#Collection: Company Payables]
    Fetch: ObjMSTID,ObjCostNameL,ObjCostNameI



    ;;============================================================================================================
    ;; Add In Range Filter ( Alt + F12 )
    ;;============================================================================================================

    [#Collection: MethodTable]
    Add: Option: O00xAddInMethod : YES

    [!Collection: O00xAddInMethod]
    Add: Object: O00xCostCenterL,O00xCostCenterI

    [Object: O00xCostCenterL]
    User Method Name : $$LocaleString:"CostCenter_1"
    Method Name : "ObjCostNameL"
    Collection Source : ""
    Method Type : "String"
    Secondary Object : ""
    [Object: O00xCostCenterI]
    User Method Name : $$LocaleString:"CostCenter_2"
    Method Name : "ObjCostNameI"
    Collection Source : ""
    Method Type : "String"
    Secondary Object : ""
     


  2. nasir

    nasir Member


    GRTAE MY BRO WELDONE
     



  3. Hello Sir,
    Thank you for sharing knowledge.
    Its working perfet for single Cost center. Is it possible to get full list of Cost center name if voucher has multiple cost center allocation??
    Thank you
     


  4. velan

    velan New Member


    How to see report.....share screenshot
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Go to Display > Statement of Accounts > Outstandings > receivables or payables....... u will see on Right side of screen, IF cost centres is active for the current company.
     


  6. velan

    velan New Member


    NICE WORKING
    HOW TO ADD FIELD GIVE REFERENCE
     

    Attached Files:

    • cost.jpg
      cost.jpg
      File size:
      219.9 KB
      Views:
      512


  7. santoshonlyone

    santoshonlyone New Member


    COST CENTRE EMPTY
     


  8. Bipin Damania

    Bipin Damania Active Member


    Driviji

    Superb...

    Keep posting & sharing...

    Thank you.
     


  9. Sravan.kodoori

    Sravan.kodoori New Member





    Hi Sir, this Code working Super and it helps me a very lot. but only one issue, I have some sales without Stock items for those sales Cost Center in not appearing in O/S Report.
    Display>SOA>Outstanding>Receivable(or)Payable>Bill Party Wise(Alt+F7) > Range. report is showing Empty.

    Can you please make these two features available.

    Thanks in Advance
     


  10. mukeshb

    mukeshb Member


    Dear Drive,
    Thanks to share.
    How to Add Sorting method for the same in F12 key ?
     


  11. mahbu

    mahbu Member


    How can fetch LedgerEntries discount value in billwise report same this methode ??
     


  12. NIYAS P

    NIYAS P New Member


    Contact me if anyone need cost center wise report for bills payable and Bills receivable .It will get for every vouchers
     

    Attached Files:

    • cost.png
      cost.png
      File size:
      87.7 KB
      Views:
      157


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    This code already existing in the forum.........
     


  14. NIYAS P

    NIYAS P New Member


    that code only work for inventory wise entry
     


  15. Rubazi

    Rubazi New Member


    Well done!
     


  16. subash pal

    subash pal Member


    Can Anyone Provide Cost center opening balance TDL
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Why would the CostCentre have a Opening Balance ??
     


  18. subash pal

    subash pal Member


    Actually, i maintain accounting like this we have 5 types of loan a/c 01) Demand Loan 02) TR Loan 03) FT Loan 04) HP Loan 05) CCR Loan and each title Hase more the 40 deals, so i used cost center as Loan Deal therefor costcenter opening balance necessary, same wase i used LC Entry TDS Entry and many more. it will do by grouping but it is increase no. of Ledger which is not good.
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Tally or any other accounting software has to be used the way it is meant to be. Objects like groups, ledgers, CC, budgets etc are made and given characteristics as per accounting norms and their functions with regards to accounts and accounting policies.

    You will need to plan it accordingly ..... just because # of ledgers is increasing you cannot use CC as a ledger substitute. You saved making 100 ledgers, instead you opened 100 CC, so what is the difference?

    The argument you are making is a weak argument (regarding number of ledgers).

    So Accounting software should be tuned based on the output of reports that you need and not the other way around.
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    When you go to cost Centre reports --- simply change the beginning date and you will have all the data.
     


  21. subash pal

    subash pal Member


    My arguments are week I know that, but if any ledger have only 4 or 5 transactions then its suitable for, we use CC, for reporting we have to say ledger wise balance not CC wise report, but we have to know actually which Loan Deal is settled or pending. Many softwires providing opening balance for CC.
     


  22. Mohibur

    Mohibur New Member


    please give me the code
     


Share This Page