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:
      142


  7. santoshonlyone

    santoshonlyone New Member


    COST CENTRE EMPTY
     


  8. Bipin Damania

    Bipin Damania 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
     


Share This Page