want to add brokerage percent by another created form via UDF its not working

Discussion in 'Tally Developer' started by Umesh s vaghela, Sep 8, 2012.

    
?

add brokerage percent by another created form via UDF

  1. It is Usefull

    2 vote(s)
    100.0%
  2. it is not Usefull

    0 vote(s)
    0.0%

  1. want to add brokerage percent by another created form via UDF its not working there is button added in my agent from ctrl + B and given field in the form for entering percentage i want enter percentage is multiply BrokerageAmt : ($Amount - $$TaxAmountatVchLevel) * ;;LIKE $pre instant of "3" / 100 in my system formula please solve the issue

    [Report: AgentWiseSaleReport]
    Form : AgentForm

    [Form : AgentForm ]
    Buttons : ExplodeFlag,ChangeDybkDate,ChangePeriod
    BottomButton: BlankButton, RelReports, InvReports, AcctReports, Report Operations, StatRegConfigure, FilterButton, ValueButton
    Buttons : PrintButton, ExportButton, UploadButton, MailButton
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn2_EditVch, BottomToolBarBtn3, BottomToolBarBtn4, BottomToolBarBtn5, BottomToolBarBtn6, BottomToolBarBtn7, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12
    Top Part :MainTitle
    Part : AgentForm
    Option : SmallWidthForm : $$InPrintMode
    Option : SmallSizeForm : NOT $$InPrintMode

    [Part : MainTitle]
    Top Lines : MainTitle
    Space Bottom : 1
    Space Top : 1
    Border : Thin Box

    [Part : AgentForm]
    Line: Agent Titles, Party Details
    Bottom Lines : COlTotals
    Repeat : Party Details : AgentWiseSaleReportColl
    Scroll: Vertical
    Common Border : Yes
    Total :AmtWTax, AmtWOTax,Total,Brokrage,Qty,AltQty

    [line:MainTitle]
    Field :party NameF
    Right Field : MainDateTitle
    Local : Field : Party NameF : Set as : $$LocaleString:"Broker Name : " +$Name:Ledger:#LedgerName
    Local : Field : Default : Object : Ledger : #LedgerName
    Local : Field : MainDateTitle :Set as : @@DSPDateStr
    Local : Field : Default : Style : Normal Bold

    [Field: MainDateTitle]
    Use : Name Field
    Style : Normal Bold
    Align : Right
    Skip : Yes
    Cells : 5


    [Field : Party NameF]
    Align : Center
    Width : 25

    [Line :Agent Titles]
    Use : Party Details
    Local : Field : Vouchar Date: Set as: "Date"
    Local : Field : Party Name: Set as: "Party Name"
    Local : Field : VCHRefno : Set as : "Bill No"
    Local : Field : Vouchar : Set as: "Vouchar"
    Local : Field : AmtWTax : Set as: "Tax Amount"
    Local : Field : AltQty : Set as: "Atl. Quantity"
    Local : Field : Qty : Set as: "Quantity"
    Local : Field : AmtWOTax: Set as: "Value"
    Local : Field : Total : Set as: "Total"
    Local : Field : Brokrage: Set as: "Brokrage"
    Local : Field : Default : Align : Centre
    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Color : Blue
    Local : Field : Default :Type : String
    Border: Thin Top Bottom

    [Line: Party Details]

    Field : Vouchar Date,Party Name
    Right Fields: VCHRefno,Vouchar, AmtWTax, AmtWOTax,Total,Brokrage,AltQty,Qty
    Option : Alter on enter
    Option : DisplayOnAltEnter

    [Field : Vouchar Date ]
    use : short Date Field
    Set as : $Date
    Border : Thin Left Right
    Alter : Voucher
    Display : Voucher

    [Field : Party Name]
    Use : Name Field
    Set as: $PartyLedgerName
    Border : Thin Right

    [Field: VCHRefno]

    Use : Short Name Field
    Set as : $Reference
    Width : 0
    Scroll : Yes
    Border : Thin Right

    [Field : Vouchar]
    Use : Name Field
    Set as: $VoucherTypeName
    Border : Thin Right
    Width : 10

    [Field : AmtWTax]
    Use : Amount Field
    Set as : $$TaxAmountatVchLevel
    [Field :AmtWOTax ]

    Use : Amount Field
    Set as : $TaxAmt
    Border : Thin Right


    [Field : Total]
    Use : Amount Field
    Set AS : $Amount
    Border : Thin Right

    [Field : Qty]
    use : qty primary field
    Set AS : $$CollQtyTotal:InventoryEntries:$BilledQty
    Border : Thin Right

    [Field : AltQty]
    use : qty secondary field
    Set AS : $$CollQtyTotal:InventoryEntries:$BilledQty
    Border : Thin Right

    [Field : Brokrage]
    Use : Amount Field
    Set AS : $BrokerageAmt;; here is brokerage field
    Border : Thin Left Right


    code :for add button in my form

    [#Form : AgentForm ]
    Add :Button : At End : Set Percentage

    [Button :Set Percentage]
    Key : ctrl + B
    Action : Alter :My Report

    [Report : My Report]
    Object : Company : ##SVCurrentCompany
    Title : "Set Brokrage Percentege"
    Form : BRKPre

    [Form : BRKpre]

    top Parts : TitelSTR
    parts : BodyPart
    Width : 30% Screen
    Height : 30% Screen
    Background : Soft Violet

    [Part : TitelSTR]
    Line : TitelSTR
    [Line : TitelSTR]
    Field : BRK Subtitles

    [Field: BRK Subtitles]
    Set as : $$LocaleString:"Broker Module"
    Border : Thin Bottom
    Style : Normal Bold
    Skip : Yes


    [Part : BodyPart]
    Line : BodyPart
    Width : 30% screen

    [Line : BodyPart]
    Field : medium prompt,percent
    Local : Field : medium prompt : Info: "Enter Brokrage percentage" + " %"
    Indent : 1.5
    Space top : 2

    [Field : percent]
    Set as : "3"
    Storage : per


    [System: UDF]
    per : string : 10001 ;; this is UDF

    [System : Formula]
    SelBrokersOnly : $BrokerName = ##LedgerName
    BrokerageAmt : ($Amount - $$TaxAmountatVchLevel) * 3 / 100

    ;;above system formula used to get brokerage value i want my UDF 's value in stand of 3

    TaxAmt : $Amount - $$TaxAmountatVchLevel
     


  2. Girdhar

    Girdhar Member


    Try this

    [System : Formula]
    SelBrokersOnly : $BrokerName = ##LedgerName
    BrokerageAmt : ($Amount - $$TaxAmountatVchLevel) * ($per:Company:##SVCUrrentCompany) / 100

    and at Brokerage field use @@BrokerageAmt not $BrokerageAmt.


    If works, then ok, otherwise try it:-

    instead of udf in company, use variable concept, it makes it easy.

    I cannt check, bcoz u havenot attached the whole code,
    i request u to plz attach whole code as a file next time.

    Plz revert back the status.
     



  3. sir its not working this is the file with full code i don' t know how to use variable concept please guide through this error.txt file using modified
     

    Attached Files:



  4. Girdhar

    Girdhar Member


    Plz use this.

    following errors:-
    UDF is of string type, made as number.
    use @@ for accessing System Formula, not $
    dont name ur file error (personal advice).

    i think u hv to read the developer manual thorouly, otherwise u will stuck somewhere always.
     

    Attached Files:

    laxman likes this.



  5. thanks admin sir and mr girdhar thanks so much for replay have nice day
     


  6. laxman

    laxman Member


    Dear Sir, Broker Commission Is Not taken In Reporting Please Guide us.
     
    meenukumar likes this.


  7. laxman

    laxman Member



    Sir Please Provide This Code In Sales Order ....

    Thanks..advance
     


Share This Page